Creates a new promotional code linked to a coupon. Supports both manual codes and auto-generated codes based on structure.
SAVEJOHN8X4Z
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Promotional code details
The coupon ID this promotional code belongs to
The promotional code string (required if not auto-generated)
The affiliate ID to assign this code to
The affiliate email (alternative to affiliateId)
External ID (e.g., Stripe promotion code ID)
Whether the code is active (default: true)
Expiration date
Maximum redemptions
Limit to first-time orders (default: false)
Minimum purchase amount
Currency for minimum amount
Limit to specific customers (default: false)
Specific customer ID
Only affiliate can use (default: false)
Whether to auto-generate the code (default: false)
Structure for auto-generated codes (required if isAutoGenerated is true)
Prefix for auto-generated codes
Length of random characters (default: 4)
Case for random characters (default: mixed)
uppercase, lowercase, mixed Promotional code created successfully
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