Update Variant (SKU)
POST {{baseUrl}}/products/variants/:variant
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.
OAuth Scopes
orders.read
orders.read_write
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
sku | string | The sku value of product variant. Example: 23-TD23-32 | |
barcode | string | The barcode value of product variant. Example: abc01 | |
price | string | The price of the product variant. Example: 96.33 | |
sale_price | string | The sale price of the product variant. Example: 90.50 | |
regular_price | string | The regular price of the product variant. Example: 100.33 | |
stock_quantity | number | Amount 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"=>"23-TD23-32", "barcode"=>"abc01", "price"=>96.33, "sale_price"=>90.5, "regular_price"=>100.33, "stock_quantity"=>4}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"status":201,"success":true,"data":{"id":652911549,"price":{"amount":13.5,"currency":"SAR"},"sale_price":{"amount":0,"currency":"SAR"},"regular_price":{"amount":0,"currency":"SAR"},"stock_quantity":3000,"barcode":"barcode-ABC","sku":"sku-variant-1551119600","related_options":[667315336]}}