Creates a new promo code.
Parameters
AssignedPartnerId required
AssignedPartnerId requiredThe partner account's Id.
CampaignId required
CampaignId requiredThe program Id.
CreditPolicy required
CreditPolicy requiredThe promo code's credit policy.
| View possible enum values | |
|---|---|
ALWAYS | The promo code's assigned partner will always be credited with the sale. |
INVOLVED | The promo code's assigned partner will be credited with the sale if they were involved in driving it. |
WINNER | The promo code's assigned partner will be credited with the sale if they drove the last click. |
Code required
Code requiredThe promo code.
Type required
Type requiredThe type of promo code.
| View possible enum values | |
|---|---|
LI | EXACT match type. Will only track promo codes as they are exactly recorded in the impact.com platform. |
RE | REGEX match type. Can accept promo codes without proper case-sensitivity and spacing. |
StartDate optional
StartDate optionalSpecifies the date and time (with timezone) when the promo code starts (i.e., becomes active), in ISO 8601 format. If unspecified, the promo code will begin the minute it is created.
EndDate optional
EndDate optionalSpecifies the date and time (with timezone) when the promo code ends (i.e., becomes active), in ISO 8601 format. If unspecified, the promo code will be active indefinitely.
DealId optional
DealId optionalThe associated deal's Id.
DealName optional
DealName optionalThe associated deal's name.
Returns
Returns the status of the request and the URI of the newly created promo code. Returns an error if create parameters are invalid or if a required parameter is missing.
Example Request
curl 'https://api.impact.com/Advertisers/<AccountSID>/PromoCodes' \
-X POST \
-u '<AccountSID>:<AuthToken>' \
-H 'Accept: application/json' \
-d 'AssignedPartnerId=10000' \
-d 'CampaignId=1000' \
-d 'CreditPolicy=ALWAYS' \
-d 'Code=PromoCode' \
-d 'Type=RE' \
-d 'DealId=0003' \
-d 'DealName=AcmeDeal3' \
-d 'StartDate=2021-12-17T00:00:00+07:00' \
-d 'EndDate=2021-12-31T00:00:00+07:00'Example Response
{
"Status": "OK",
"Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
}