Add a variant to a variable product
POST https://api.ecartapi.com/api/v2/products/429/variants
Request Body
{"variant"=>{"name"=>"variant w global attributos", "price"=>"252", "sku"=>"testA429-2", "options"=>[{"name"=>"Color2", "value"=>"Blue"}, {"name"=>"Size2", "value"=>"S"}]}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string |
RESPONSES
status: OK
{"success":true,"variant":{"id":"435","productId":"429","name":"\u003cp\u003evariant w global attributos\u003c/p\u003e\n","upc":null,"price":"252","currency":null,"sku":"testA429-2","imageId":"428","fulfillmentService":null,"option1":"Blue","option2":"S","option3":null,"dimensions":{"width":"10","height":"10","length":"10","weight":"1"},"units":{"width":null,"height":null,"length":null,"weight":null},"inventory":{"itemId":null,"quantity":"188"},"requireShipping":null,"bundled":null,"dates":{"createdAt":"2024-10-02T17:38:20","updatedAt":"2024-10-02T17:38:20"}}}