v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-015891,4406.1 MB

Update a promotion code

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

post/v1/promotion_codes/{promotion_code}

Path parameters

promotion_codestring required

Response

Successful response.

activeboolean required

Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid.

codestring required

The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), digits (0-9), and dashes (-).

createdinteger required

Time at which the object was created. Measured in seconds since the Unix epoch.

customer_accountstring nullable

The account representing the customer who can use this promotion code.

expires_atinteger nullable

Date at which the promotion code can no longer be redeemed.

idstring required

Unique identifier for the object.

livemodeboolean required

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

max_redemptionsinteger nullable

Maximum number of times this promotion code can be redeemed.

metadataobject nullable

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

object'promotion_code' required

String representing the object's type. Objects of the same type share the same value.

times_redeemedinteger required

Number of times this promotion code has been used.