🔒
📘
The Update Variant API allows users to modify the details of a specific product variant. By providing a valid variant_id in the path parameter, users can update fields such as options, pricing, inventory, and more. This endpoint is essential for managing product variants efficiently, ensuring the most accurate and updated information is reflected in the system.This API is especially useful for:
Update variant-specific attributes like size, color, or SKU.
Adjust pricing or inventory details for a particular variant.
📘
Parameter Type Required Description Example variant_idstring Yes Unique identifier of the variant "var_123456789"
Parameter Type Required Description Example variantobject Yes Variant update data - variant.option1string No First option value "Black"variant.option2string No Second option value "Large"variant.option3string No Third option value ""variant.image_idstring No Associated image ID "img_456789"variant.imageobject No Variant image details - variant.image.srcstring Yes Image URL "https://example.com/image.jpg"variant.image.widthint32 No Image width 800variant.image.heightint32 No Image height 600variant.image.altstring No Alt text "Black variant"variant.image.pathstring No Storage path "/images/variants"variant.compare_at_pricedouble No Original price 199.99variant.pricedouble Yes Selling price 149.99variant.skustring No Stock keeping unit "SKU123-BLK-L"variant.barcodestring No Product barcode "123456789012"variant.notestring No Internal notes "New stock"variant. inventory_quantitystring No Stock quantity "50"variant.weightdouble No Product weight 0.75variant.weight_unitstring No Weight unit "kg"variant.cost_pricedouble No Cost price 89.99variant.whole_pricesarray of objects No Wholesale pricing - variant.whole_prices. pricefloat No Wholesale price 129.99variant.whole_prices. min_quantitystring No Minimum order "10"variant.retail_pricedouble No Retail price 149.99variant.positionstring No Display position "2"variant.extendobject No Extended properties - variant.extend.lengthdouble No Product length 25.5variant.extend.widthdouble No Product width 18.0variant.extend.heightdouble No Product height 8.5variant.extend. dimension_unitstring No Dimension unit "cm"variant.extend. origin_country_codestring No Country of origin "CN"variant.extend.hs_codestring No HS classification code "8518.29.00"
📘
Parameter Type Example Description codestring "200"HTTP status code messagestring "Success"Operation result message data.variantarray of objects -
Parameter Type Example Description idstring "var_987654321"Unique variant identifier product_idstring "prod_123456789"Parent product ID image_idstring "img_456789"Primary image reference created_atstring "2025-01-15T09:00:00Z"Creation timestamp updated_atstring "2025-06-15T14:30:00Z"Last update timestamp titlestring "Large / Black"Variant display title option1string "Black"First option value option2string "Large"Second option value option3string ""Third option value imageobject - Variant image details image.srcstring "https://example. com/image.jpg"Image URL image.widthint32 800Image width in pixels image.heightint32 600Image height in pixels image.altstring "Black variant"Image alt text image.pathstring "/images/variants"Image storage path positionstring "1"Display position compare_at_pricefloat 199.99Original/comparison price pricefloat 149.99Current selling price skustring "SKU123-BLK-L"Stock keeping unit barcodestring "123456789012"Product barcode notestring "New stock"Internal notes inventory_quantitystring "50"Current stock level weightfloat 0.75Product weight weight_unitstring "kg"Weight measurement unit cost_pricefloat 89.99Cost/production price whole_pricesarray of objects - Wholesale pricing tiers whole_prices.pricefloat 129.99Wholesale price whole_prices. min_quantitystring "10"Minimum order quantity retail_pricefloat 149.99Retail price is_discountboolean trueDiscount status flag origin_pricefloat 179.99Original base price extendobject - Extended properties extend.lengthfloat 25.5Product length extend.widthfloat 18.0Product width extend.heightfloat 8.5Product height extend. dimension_unitstring "cm"Dimension unit extend. origin_country_codestring "CN"Country of origin extend.hs_codestring "8518.29.00"Harmonized System code
Field Type Example Description codestring InvalidParameterError http message messagestring `` Error message