Update a Promotional Code
Updates a promotional code identified by promotionalCodeId, and fires the promotional_code.updated webhook.
Set active to false to switch a code off without deleting it — this is the safe way to retire a code an affiliate has already shared. Changing code renames it, and the new string must be unique within the program.
Every field you send is applied directly to the code, so sending a field that is not listed below will fail the request.
Updating Promotional Codes
Update an existing promotional code’s properties. You can modify settings like activation status, expiration, and redemption limits.Common Updates
- Change the code string itself
- Activate or deactivate a code
- Update expiration dates
- Modify redemption limits
- Change affiliate assignment
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Fields to update
The promotional code ID to update
Rename the code. Must be unique within the program.
Set to false to retire the code without deleting it
Expiration date
Maximum redemptions
Limit to first-time orders
Minimum purchase amount
Currency for minimum amount
Limit to specific customers
Specific customer ID
Only affiliate can use
The code's ID in the connected billing provider
Response
The updated promotional code.
A code customers enter at checkout. Its discount comes from the coupon it belongs to.
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
How many times this code can be redeemed. null means unlimited. Redemptions are also capped by the parent coupon's own limit.
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 assigned affiliate may redeem this code
Whether this code was generated from a codeStructure rather than supplied by hand
Timestamp when the code was created
Timestamp when the code was last updated
The coupon this code takes its discount from
Affiliate details
Whether the affiliate created this code themselves from their portal