Logo
Ecartapi.com Public API Documentation

Variant

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

Creates a variation of an available product.

The Product Id Must exist

For more information, visit the documentation

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Authorization
string




RESPONSES

status OK

{ "success": true, "variant": { "id": "378d79d8-884b-49df-a77a-bcaa385121cd", "productId": "8170ae05-aaa6-4d36-870e-92f194cc7c36", "name": "azul", "upc": null, "price": "100.00", "sku": "12345678", "imageId": "c7c8d026-7fe1-48a1-b931-e974ff7acac5", "fulfillmentService": null, "option1": "azul", "option2": null, "option3": null, "dimensions": { "width": null, "height": null, "length": null, "weight": "10.00" }, "units": { "width": null, "height": null, "length": null, "weight": null }, "inventory": { "itemId": null, "quantity": "10" }, "requireShipping": null, "bundled": null, "dates": { "createdAt": "2021-12-16T17:52:46Z", "updatedAt": "2021-12-16T17:52:46Z" } } }



Curl
curl -X POST 'https://api.ecartapi.com/api/v2/products/id/variants' -H 'Authorization: access_token' -d '{"variant":{"name":"15 x 15 x 13 cm | 26ECTs / 20 piezas","price":"219.04","sku":"CCC003","option1":"20","fulfillmentService":"manual","dimensions":{"width":"2.2","height":"2.2","weight":"5.6"},"units":{"width":"cm","height":"cm","weight":"kg"},"requireShipping":"true"}}'

ENDPOINTS