Update variant
PUT/openapi/2025-06/variants/:variant_id
Update an existing product variant with the provided details.
Request
Path Parameters
The variant ID
- application/json
- Body
- Example
Bodyrequired
- Array [
- ]
variant objectrequired
The variant details
Option 1
Option 2
Option 3
ID of the variant's image
image object
Image of the variant, required if its product's "need_variant_image" field is true
Image's URL
Image's width in px
Image's height in px
Image's alt
Image's path
Compare at price ( original price )
Price, set it to "0.00" if you want to leave the price empty
SKU
The barcode of the variant
Note or remark
Inventory quantity
Weight
Unit of weight, possible value are: kg, g, lb, oz
Cost price
whole_prices object[]
Wholesale price list
Price
Mini Order Quantity
Retail price of the variant
Position of the variant in the list
extend object
Extend of the variant
Length of the variant
Width of the variant
Height of the variant
Dimension unit, possible value are: cm, in, mm
Origin country of the variant
Harmonized System Code of the variant
{
"variant": {
"option1": "string",
"option2": "string",
"option3": "string",
"image_id": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"path": "string"
},
"compare_at_price": 0,
"price": 0,
"sku": "string",
"barcode": "string",
"note": "string",
"inventory_quantity": 0,
"weight": 0,
"weight_unit": "string",
"cost_price": 0,
"whole_prices": [
{
"price": 0,
"min_quantity": 0
}
],
"retail_price": 0,
"position": 0,
"extend": {
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "string",
"origin_country_code": "string",
"hs_code": "string"
}
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
- Array [
- ]
error code
error message
data object
variant object
The updated variant
The unique identifier of the variant
The product ID this variant belongs to
The image ID of the variant
The time of the variant was created
The time of the variant was updated
Title of the variant
The first option of the variant
The second option of the variant
The third option of the variant
image object
The image of the variant
Image's URL
Image's width in px
Image's height in px
Image's alt
Image's path
The position of the variant in the product
The compare at price of the variant
The price of the variant
The SKU of the variant
The barcode of the variant
The note of the variant
The inventory quantity of the variant
The weight of the variant
The weight unit of the variant, possible value are: kg, g, lb, oz
The cost price of the variant
whole_prices object[]
The whole prices of the variant
Price
Mini Order Quantity
The retail price of the variant
Whether the variant is discount
The origin price of the variant
extend object
Extend of the variant
The length of the variant
The width of the variant
The height of the variant
The dimension unit
Origin_country_code
Hs_code
{
"code": "string",
"message": "string",
"data": {
"variant": {
"id": "string",
"product_id": "string",
"image_id": "string",
"created_at": "string",
"updated_at": "string",
"title": "string",
"option1": "string",
"option2": "string",
"option3": "string",
"image": {
"src": "string",
"width": 0,
"height": 0,
"alt": "string",
"path": "string"
},
"position": 0,
"compare_at_price": 0,
"price": 0,
"sku": "string",
"barcode": "string",
"note": "string",
"inventory_quantity": 0,
"weight": 0,
"weight_unit": "string",
"cost_price": 0,
"whole_prices": [
{
"price": 0,
"min_quantity": 0
}
],
"retail_price": 0,
"is_discount": true,
"origin_price": 0,
"extend": {
"length": 0,
"width": 0,
"height": 0,
"dimension_unit": "string",
"origin_country_code": "string",
"hs_code": "string"
}
}
}
}