Vai al contenuto principale
PATCH
Update Variant

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Parametri del percorso

variant_id
string<uuid>
obbligatorio

Corpo

application/json

Partial update: only the fields sent are applied.

An explicit null on sale_price / sale_start / sale_end clears them — that is how the admin removes a promo.

sku used to be missing here, so the field pydantic ignored was dropped without a word: the variant dialog let the operator edit it and the PATCH answered 200 with the old code (BUG-8). It is applied now; a code already used in the same store is a 409 product.sku_taken (router).

sku
string | null
name
string | null
price
compare_at_price
sale_price
sale_start
string<date-time> | null
sale_end
string<date-time> | null
stock
integer | null
track_inventory
boolean | null
allow_backorder
boolean | null
weight
barcode
string | null
attributes
Attributes · object | null
is_active
boolean | null

Risposta

Successful Response

data
ProductVariantOut · object | null
meta
PaginationMeta · object | null
error
string | null
error_code
string | null