Skip to main content
PATCH
Update Variant
There is no per-variant update endpoint on the OAuth App API (/api/v1/).
  • For the first variant only, an installed app can update price, compare_at_price, and inventory_quantity through PUT /api/v1/products/{id}.json by passing a variants[0] object — those values are mirrored onto the product. Per-variant attributes (option value, SKU, weight, image) are not addressable that way.
  • To update an arbitrary variant by ID, use the merchant admin route documented here (PATCH /variants/update-single-variant/{id}). It is also what the MCP update_variant tool calls.

Authentication

Merchant JWT (Authorization: Bearer <merchant-token>); roles MERCHANT, STAFF_ADMIN, SUPER_ADMIN, or MANAGER.

Request Format

Content-Type: multipart/form-data. A variant image may be attached as the mainImage file field; all other fields are sent as form fields.

Path Parameters

id
string
required
The variant ID to update

Body Parameters

All fields are optional — send only what you want to change.
name
string
Option name (e.g. “Size”)
value
string
Option value (e.g. “Medium”)
price
number
Variant price
discountPrice
number
Discounted / sale price
stock
number
Stock quantity
stockStatus
string
Stock status (e.g. IN_STOCK)
skuId
string
SKU
weight
number
Weight
weightUnit
string
Weight unit (g, kg, lb, oz)
mainImage
file
Variant image (multipart file field). When supplied it is uploaded and the resulting URL is stored as mainImageUrl.

Response

The platform response envelope is { status, state, message, data }, where data is the updated variant record.
If the variant is not found the endpoint returns status: 400, state: "error", message: "Variant Not Found".