Products
Update a variant
Prices, identifiers and stock. Setting inventory_quantity records a stock adjustment in the store's inventory history, exactly like a change made in the dashboard.
Path parameters
- variant_idstringRequired
starts with var_
Body
- image_idstring or null
The variant's own image, one of its product's images. null: none (the product's images show).
starts with img_
- pricestring
An amount as a decimal string in the store's currency, with no more decimals than the currency has ("3500.00" in DZD, "12.500" in TND).
- compare_at_pricestring or null
- coststring or null
- skustring or null
up to 100 characters
- barcodestring or null
up to 100 characters
- inventory_quantityinteger
The new stock count. Recorded as a stock adjustment in the store's inventory history. For a reason other than an adjustment, use POST /v1/inventory/adjustments.
0–1000000
- inventory_trackedboolean
- allow_backorderboolean
Let it be ordered past zero. Turning it off is refused while units are still owed.
- incomingobject
A delivery on its way. Pre-orders can claim it. quantity 0 clears it; POST /v1/variants/{id}/receive_incoming books it into stock when it lands.
2 child fields
- quantityintegerRequired
0–1000000
- due_in_daysinteger
How many days from today it is expected.
0–365
- at_courierinteger
Units kept at the courier's warehouse (for couriers that ship from their own stock). Can't exceed what is available.
0–1000000
Returns
200 OK · The updated variant. Variant
- idstringRequired
starts with var_
- objectstringRequired
always "variant"
- product_idstringRequired
- titlestringRequired
The option values joined, e.g. "Black / M". "Default" for a product without options.
- optionsobjectRequired
Option name → value.
- skustring or null
- barcodestring or null
- priceMoneyRequired
An amount of money.
amountis a decimal STRING with exactly the currency's number of decimals ("1250.00" in DZD, "12.500" in TND) — never parse it into a float.2 child fields
- amountstringRequired
- currencystringRequired
- compare_at_priceMoney or null
2 child fields
- amountstringRequired
- currencystringRequired
- costMoney or null
Only present when the key has the
products:read_costsscope.2 child fields
- amountstringRequired
- currencystringRequired
- inventory_quantityintegerRequired
Units in stock. Negative when units are owed to pre-orders.
- inventory_trackedboolean
- incoming_quantityinteger
Units on their way from a supplier.
- incoming_due_atstring or null
When the incoming delivery is expected.
ISO 8601 date-time, UTC
- allow_preorderboolean
Orderable past zero
- allow_backorderboolean
Orderable past zero without limit; the merchant owes the units.
- at_courierinteger
Units kept at the courier's warehouse.
- image_urlstring or null
- livemodebooleanRequired
- created_atstringRequired
ISO 8601 date-time, UTC
- updated_atstringRequired
ISO 8601 date-time, UTC
Errors
Every error has the same shape. This endpoint can answer with:
