Get variants of a product
GET https://api.ecartapi.com/api/v2/products/19721631/variants
Retrieves all variants of a product.
The productId must exist.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
page | number | Current page | |
limit | number | Results per page |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string |
RESPONSES
status: OK
{"success":true,"variants":[{"id":"134288148","productId":"19721631","name":"Product test update EcartApi update test 2 v2 Azul S","upc":null,"price":"20.00","currency":null,"sku":"SKU-TEST-ECART-API1","imageId":null,"fulfillmentService":null,"option1":"Azul","option2":"S","option3":null,"dimensions":{"width":"1","height":"3","length":"1","weight":"2"},"units":{"width":null,"height":null,"length":null,"weight":null},"inventory":{"itemId":null,"quantity":"15"},"requireShipping":null,"bundled":null,"dates":{"createdAt":"2023-07-06T00:34:27.000Z","updatedAt":"2023-07-13T01:57:47.000Z"}},{"id":"134288149","productId":"19721631","name":"Product test update EcartApi update test 2 v2 Azul XL","upc":null,"price":"20.00","currency":null,"sku":"SKU-TEST-ECART-API1","imageId":null,"fulfillmentService":null,"option1":"Azul","option2":"XL","option3":null,"dimensions":{"width":"1","height":"3","length":"1","weight":"2"},"units":{"width":null,"height":null,"length":null,"weight":null},"inventory":{"itemId":null,"quantity":"50"},"requireShipping":null,"bundled":null,"dates":{"createdAt":"2023-07-06T00:34:27.000Z","updatedAt":"2023-07-13T01:34:24.000Z"}}]}