Logo
Ecartapi.com Public API Documentation

Update product variant

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

Updates a product's variation.

Important information:

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Authorization
string




RESPONSES

status OK

{ "success": true, "variant": { "id": "7a45494d-c7c1-4f02-86bd-28b83450dd5f", "productId": null, "name": null, "price": "11.40", "sku": "SQ0557898", "imageId": "5f7b5dfd276e4125dc0a9368", "fulfillmentService": null, "option1": null, "option2": null, "option3": null, "dimensions": { "width": "5", "height": "5", "length": null, "weight": "2" }, "units": { "width": "INCH", "height": "INCH", "length": "INCH", "weight": "POUND" }, "inventory": { "itemId": null, "quantity": "10" }, "requireShipping": null, "dates": { "createdAt": null, "updatedAt": null } } }



Curl
curl -X PUT 'https://api.ecartapi.com/api/v2/products/productId/variants/id' -H 'Authorization: access_token' -d '{"variant":{"sku":"SQ0557898","price":"11.40","currency":"USD","option1":"Jr. Lemon pepper","units":{"weight":"POUND","width":"INCH"},"options":[{"name":"flavor"}],"dimensions":{"weight":"2.0","depth":"7.0","width":"5.0","height":"5.0"}}}'

ENDPOINTS