Update a variant
Partial: omitted fields keep their value, an explicit null clears a
nullable one (clear_compare_at: true also clears the compare-at
price). Use it to change a price (price_cents, compare_at_cents)
or to hide a variant (is_active). Price,
availability and title changes are pushed to the Meta catalog when the
store has one.
Authorization
bearer_auth Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.
In: header
Path Parameters
Store id
uuidVariant id
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{}'{
"available_quantity": 0,
"backorderable": true,
"barcode": "string",
"compare_at_cents": 0,
"cost_cents": 0,
"created_at": "2019-08-24T14:15:22Z",
"expected_availability_at": "2019-08-24T14:15:22Z",
"fulfillment_mode": "stocked",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"is_active": true,
"lead_time_days": 0,
"position": 0,
"price_cents": 0,
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"reserved_quantity": 0,
"sku": "string",
"stock_quantity": 0,
"title": "string",
"updated_at": "2019-08-24T14:15:22Z",
"uses_components": true
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}