Variant
PUT https://api.ecartapi.com/api/v2/products/{{productId}}/variants/{{id}}
Updates a product Variant.
Important information.
* Product identifier is required.
* Variant identifier is required.
More information about the ecommerce's resource.
Request Body
{"variant"=>{"price"=>"40.99", "dimensions"=>{"width"=>"1", "height"=>"1", "depth"=>"1", "weight"=>"1"}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | ||
Content-Type | string |
RESPONSES
status: OK
{"success":true,"variant":{"id":"82","productId":"112","name":null,"upc":null,"price":"40.99","sku":"TEST-123-SM-RE-CO-BL","imageId":null,"fulfillmentService":null,"option1":"Small","option2":"Red","option3":"cotton","dimensions":{"width":null,"height":null,"length":null,"weight":null},"units":{"width":"cm","height":"cm","length":"cm","weight":"kg"},"inventory":{"itemId":null,"quantity":"0"},"requireShipping":null,"bundled":null,"dates":{"createdAt":null,"updatedAt":null}}}