Light Mode
List Product Variants
GET
/products/{product}/variantsLast modified: a month ago
This endpoint allows you to list all product variants directly from this endpoint by passing the product
as a path parameter.
Request
Path Params
product
integer
required
Unique identification number assigned to a product. List of products IDs can be found here.
Request samples
Responses
Success(200)
Not Found(404)
Unauthorized(401)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
status
number
optional
Response status code, a numeric or alphanumeric identifier used to convey the outcome or status of a request, operation, or transaction in various systems and applications, typically indicating whether the action was successful, encountered an error, or resulted in a specific condition.
success
boolean
optional
Response flag, boolean indicator used to signal a particular condition or state in the response of a system or application, often representing the presence or absence of certain conditions or outcomes.
data
$ref(#/definitions/1307391)[]
optional
#/definitions/1307391
optional
pagination
#/definitions/1307303optional
Example
{
"status": 200,
"success": true,
"data": [
{
"id": 652911549,
"price": {
"amount": 13.5,
"currency": "SAR"
},
"sale_price": {
"amount": 0,
"currency": "SAR"
},
"regular_price": {
"amount": 0,
"currency": "SAR"
},
"stock_quantity": 3000,
"barcode": "barcode-ABC",
"sku": "sku-variant-1551119600",
"related_option_values": [
667315336
],
"weight": 3,
"weight_type": "kg",
"weight_label": "٣ كجم"
}
],
"pagination": {
"count": 1,
"total": 1,
"perPage": 60,
"currentPage": 1,
"totalPages": 1,
"links": []
}
}
Last modified: a month ago