Update a variant
Variant names are set via option1/option2/option3. On update, stocks accepts available_units/total_units in addition to location_id.
/products/{product_id}/variants/{id}AuthorizationBearer token (JWT) · headerrequiredproduct_idstringrequiredidstringrequiredVariant ID or SKU
application/jsonpositionintegerOrdering position within the product (lower comes first).
skustringbarcode_numberstringoption1stringoption2stringoption3stringoption_valuesobjectCustom variant option values, keyed by option1/option2/option3.
option_asset_idsobjectAsset IDs to associate with each option value.
product_asset_idsinteger[]Product image asset IDs to associate with this variant.
colorstringregular_priceintegersale_priceintegercostintegerCost in cents (for margin reporting, not shown to buyers).
statusstringvisiblehiddenavailable_if_no_stockbooleanweight_in_gramsintegerunit_quantitynumberonline_stockintegerstocksobject[]Show propertiesHide properties
objectlocation_idintegeravailable_unitsintegertotal_unitsintegerallows_negativebooleanVariant updated
_linksHalLinksidintegerproduct_idintegernamestringDisplay name, computed from option1/option2/option3.
positionintegerOrdering position within the product. Lower comes first. For products with chained_variants enabled this drives which variant stays visible (lowest position, then cheapest, then lowest id).
statusstringvisiblehiddenskustringbarcode_numberstringoption1stringoption2stringoption3stringcurrency_codestringregular_priceintegerRegular price in cents
sale_priceinteger | nullSale price in cents
priceintegerEffective price in cents (sale_price if set, else regular_price)
online_stockintegerall_stockintegeravailable_if_no_stockbooleanweight_in_gramsintegerunit_quantitynumbercolorstringcostintegerprofitintegerstocksobject[]Per-location stock breakdown
Show propertiesHide properties
objectlocation_idintegeravailable_unitsintegertotal_unitsinteger