Variants
POST https://api.ecartapi.com/api/v2/products/{{productId}}/variants
Creates a variation of an available product.
Important information:
Request Body
{"variant"=>{"price"=>"22", "sku"=>"XS7890", "inventory"=>{"quantity"=>"100"}, "option1"=>"xxs"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |
RESPONSES
status: OK
{"success":true,"variant":{"id":"11754587","productId":null,"name":null,"price":"22","sku":"XS7890","imageId":null,"fulfillmentService":null,"option1":"xxs","option2":null,"option3":null,"dimensions":{"width":null,"height":null,"length":null,"weight":"1"},"units":{"width":null,"height":null,"length":null,"weight":null},"inventory":{"itemId":null,"quantity":"100"},"requireShipping":null,"dates":{"createdAt":null,"updatedAt":null},"sellOutStock":"true"}}