Retrieve a promotion code

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

get/v1/promotion_codes/{promotion_code}

Path parameters

promotion_codestring required

Query parameters

expandstring[]

Specifies which fields in the response should be expanded.

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), and digits (0-9).

createdinteger required

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

expires_atinteger nullable

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

idstring required

Unique identifier for the object.

livemodeboolean required

Has the value true if the object exists in live mode or the value false if the object exists in test mode.

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.

Changes