Create a promo code

Creates a new promo code.

Parameters


AssignedPartnerId required

The partner account's Id.


CampaignId required

The program Id.


CreditPolicy required

The promo code's credit policy.

View possible enum values
ALWAYSThe promo code's assigned partner will always be credited with the sale.
INVOLVEDThe promo code's assigned partner will be credited with the sale if they were involved in driving it.
WINNERThe promo code's assigned partner will be credited with the sale if they drove the last click.

Code required

The promo code.


Type required

The type of promo code.

View possible enum values
LIEXACT match type. Will only track promo codes as they are exactly recorded in the impact.com platform.
REREGEX match type. Can accept promo codes without proper case-sensitivity and spacing.

StartDate optional

Specifies 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

Specifies 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

The associated deal's Id.


DealName optional

The 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"
}