Variant
POST https://api.ecartapi.com/api/v2/products/{{productId}}/variants
Creates a variation of an available product.
Important information:
Request Body
{"variant"=>{"price"=>"100", "sku"=>"IMAC002", "weight"=>"1", "inventoryQuantity"=>"5"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | ||
Content-Type | string |
RESPONSES
status: OK
{"success":true,"variant":{"id":"92","productId":"2","name":null,"price":"100","sku":"IMAC002","fulfillmentService":null,"createdAt":null,"updatedAt":null,"weight":"1","weightUnit":null,"inventoryItemId":null,"inventoryQuantity":"5"}}