Update Variant

Updates a variant. Send only the fields you want to change. Requires a producer access token for the application.

The product must be unpublished or in draft, because a published product can't have its variants edited. The type-specific fields follow the same rules as Create Variants, so a field that doesn't match the product's product_type is rejected. provider_product_id can't be changed after the variant is created.

images and attributes are full replacements. Send the complete list, and send an empty list to clear them. On a unique-code product, coupon_codes replaces the pool of available codes, and redeemed codes are never touched. Omit it to leave the pool alone, or send an empty list to clear the available codes.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The client ID of the application.

uuid
required

The ID of the product.

uuid
required

The ID of the variant.

Body Params
string
length ≤ 255

Name of the variant. Must be unique within the product.

integer | null
≥ 0

Cost to redeem, in units of the product's reward item.

integer | null
0 to 100

Percentage taken off the cost.

integer | null
≥ 0

Redeemable stock. Empty means unlimited.

integer | null
≥ 0

Stock level at or below which the variant reads as few_left.

boolean

Whether this is the default variant shown for the product.

string

Merchandise products only.

string

Merchandise products only. For example #1A2B3C.

string

Merchandise products only.

date-time

Experience products only.

date-time

Experience products only. Must be after event_start.

string

Common-code products only.

coupon_codes
array of strings

Unique-code products only. Replaces the available code pool.

coupon_codes
uuid | null

Badge, multiplier and flair products only.

attributes
array of objects

Full replace. Both key and value are required on every item.

attributes
images
array of objects

Full replace. display_order is required on every image.

images
string

Free text, for example serialized JSON.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json