Logo
Ecartapi.com Public API Documentation

Variant

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

Creates a variation of an available product.

Important information:

 

Body PARAM

Key Datatype Required Description 



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



Curl
curl -X PUT 'https://api.ecartapi.com/api/v2/products/productId/variants/id' -H 'Authorization: access_token' -H 'Content-Type: application/json' -d '{"variant":{"price":"100","sku":"IMAC002","weight":"1","inventory":{"quantity":"5"}}}'

ENDPOINTS