Get Promotional Codes
Returns promotional codes for your program. A promotional code is the string a customer types at checkout; it inherits its discount from the coupon it belongs to, and can be assigned to an affiliate so redemptions are credited to them.
id, code and externalId return a single code. couponId, affiliateId and affiliateEmail return every matching code, newest first. With no parameters, every code in the program is returned.
Each code comes back with its parent coupon and the affiliate it is assigned to.
Requires promotional-codes:read. This legacy endpoint uses the key’s original program and its existing response format.
Understanding Promotional Codes
Promotional codes are the actual discount codes that customers enter at checkout. Each promotional code is linked to a coupon, which defines the discount structure (amount, type, duration, etc.).Key Concepts
- Promotional codes are the customer-facing codes (e.g., “JOHN20”, “SAVE20”, “AFFILIATE10”)
- They inherit their discount properties from the parent coupon
- Multiple promotional codes can share the same coupon (same discount, different codes)
- Each promotional code can be assigned to a specific affiliate for tracking
Query Options
You can retrieve promotional codes by:- id: Get a specific promotional code by ID
- code: Get a promotional code by the actual code string
- externalId: Get by external ID (e.g., Stripe promotion code ID)
- couponId: Get all promotional codes for a specific coupon
- affiliateId: Get all promotional codes for a specific affiliate
- affiliateEmail: Get all promotional codes for an affiliate by email
Authorizations
Query Parameters
Response
A single promotional code when filtering by id, code or externalId (null if no match), otherwise an array.
- object
- object[]
A code customers enter at checkout. Its discount comes from the coupon it belongs to.