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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
The ID of the promotional code to retrieve
The promotional code string to retrieve
The external ID (e.g., Stripe promotion code ID)
Get all promotional codes for a specific coupon
Get all promotional codes for a specific affiliate
Get all promotional codes for an affiliate by email
Response
A list of promotional codes or a single promotional code
- object
- object[]
The promotional code ID
The actual promotional code string
The parent coupon ID
The affiliate ID this code is assigned to
External ID (e.g., Stripe promotion code ID)
Whether the promotional code is active
Expiration date for the code
Maximum number of times this code can be used
Number of times this code has been redeemed
Whether this code is limited to first-time orders
Minimum purchase amount required
Currency for minimum amount
Whether code is limited to specific customers
Specific customer ID this code is limited to
Whether only the affiliate can use this code
Whether this code was auto-generated
Timestamp when the code was created
Timestamp when the code was last updated
The parent coupon details
Affiliate details