Update Variant

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

Updates the inventory for a listing identified by a listing ID. The update fails if the supplied values for product sku, offering quantity, and/or price are incompatible

When setting a price, assign a float equal to amount divided by divisor as specified in the Money resource.

More information about ecommerce's resource

Request Body

{"variant"=>{"name"=>"Vestido fresitas prueba", "description"=>"Este es un producto agregado con EcartApi v2", "price"=>"17", "inventory"=>{"quantity"=>"8"}}}

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{"success":true,"variant":{"id":"13213913964","productId":"1344606269","name":"Vestido de pruebas 3","upc":null,"price":"17.00","currency":"MXN","sku":"C0U","imageId":null,"fulfillmentService":null,"option1":"0","option2":"Copper","option3":null,"dimensions":{"width":null,"height":null,"length":null,"weight":null},"units":{"width":null,"height":null,"length":null,"weight":null},"inventory":{"itemId":null,"quantity":"8"},"requireShipping":null,"bundled":null,"dates":{"createdAt":null,"updatedAt":null}}}