Update Variant

PUT {{baseUrl}}/products/variants/:variant?sku=<string>&barcode=<string>&price=<number>&sale_price=<number>&regular_price=<string>&stock_quantity=<string>

This endpoint allows you to update variant details by providing the ID of the variant you want to update its details in the variant path parameter.

Request Params

KeyDatatypeRequiredDescription
skustringThe sku value of product variant. Example: 23-TD23-32
barcodestringThe barcode value of product variant. Example: abc01
pricestringThe price of the product variant. Example: 96.33
sale_pricestringThe sale price of the product variant. Example: 90.50
regular_pricestringThe regular price of the product variant. Example: 100.33
stock_quantitystringAmount of the product variant total stock quantity. Only updated if the store feature manage product by branches is not activated. Example: 4

Request Body

{"sku"=>"<string>", "barcode"=>"<string>", "price"=>"<number>", "sale_price"=>"<number>", "regular_price"=>"<number>", "stock_quantity"=>"<number>", "weight"=>"<number>", "mpn"=>"<number>", "gtin"=>"<number>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;status&quot;:&quot;\u003cnumber\u003e&quot;,&quot;success&quot;:&quot;\u003cboolean\u003e&quot;,&quot;data&quot;:{&quot;id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;price&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;},&quot;regular_price&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;},&quot;sale_price&quot;:{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;\u003cstring\u003e&quot;},&quot;stock_quantity&quot;:&quot;\u003cinteger\u003e&quot;,&quot;barcode&quot;:&quot;\u003cstring\u003e&quot;,&quot;sku&quot;:&quot;\u003cstring\u003e&quot;,&quot;related_option_values&quot;:[&quot;\u003cinteger\u003e&quot;,&quot;\u003cinteger\u003e&quot;],&quot;is_default&quot;:&quot;\u003cboolean\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;weight_type&quot;:&quot;\u003cstring\u003e&quot;,&quot;weight_label&quot;:&quot;\u003cstring\u003e&quot;}}