Variant

PUT https://api.ecartapi.com/api/v2/products/{{productId}}/variants/{{id}}

Creates a variation of an available product.

Important information:

Request Body

{"variant"=>{"price"=>"100", "sku"=>"IMAC002", "weight"=>"1", "inventory"=>{"quantity"=>"5"}}}

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring
Content-Typestring

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"}}