Update Variant
Variants
Update Variant
Update an existing variant
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, andinventory_quantitythroughPUT /api/v1/products/{id}.jsonby passing avariants[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 MCPupdate_varianttool 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
The variant ID to update
Body Parameters
All fields are optional — send only what you want to change.Option name (e.g. “Size”)
Option value (e.g. “Medium”)
Variant price
Discounted / sale price
Stock quantity
Stock status (e.g.
IN_STOCK)SKU
Weight
Weight unit (
g, kg, lb, oz)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".