Create a variant
Creates a new variant for a product.
/products/{product_id}/variantsAuthorizationBearer token (JWT) · headerrequiredproduct_idstringrequiredapplication/jsonidintegerPre-assign a specific variant ID (rarely used; usually omitted).
positionintegerOrdering position within the product (lower comes first). On a chained_variants product, omitting it defaults to the current highest position instead of 0.
option1stringoption2stringoption3stringoption_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.
skustringbarcode_numberstringregular_priceintegerIn cents. Required if the product has per-variant prices.
sale_priceintegerIn cents
costintegerweight_in_gramsintegerunit_quantitynumbercolorstringavailable_if_no_stockbooleanonline_stockintegerstatusstringvisiblehiddenstocksobject[]Show propertiesHide properties
objectlocation_idintegerunitsintegerVariant created
_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