List all promo codes

Returns a list of your promo codes.

Parameters


CampaignId optional

A program Id.


Code optional

A promo code. Must be UTF-8 URL-encoded.


StartDate optional

A filter on the list based on the object StartDate field. The value should include a date, time, and timezone in ISO 8601 format.


EndDate optional

A filter on the list based on the object EndDate field. The value should include a date, time, and timezone in ISO 8601 format.


State optional

The state of a promo code.

View possible enum values
ACTIVEThe promo is currently live.
INACTIVEThe promo code is not currently active.

Returns


Returns an array of promo codes objects up to a limit dictated by @pagesize. Each entry in the array is a separate promo codes object. If no promo codes objects meet the criteria, the resulting array will be empty. This request should never return an error.

Example Request


curl 'https://api.impact.com/Advertisers/<AccountSID>/PromoCodes' \
  -X GET \
  -u '<AccountSID>:<AuthToken>' \
  -H 'Accept: application/json' \
  -d 'CampaignId=1000' \
  -d 'Code=PromoCode' \
  -G

Example Response


{
  "@page": "1",
  ...
  "PromoCodes": [
    { 
      "Id": "7777777",
      "Code": "PromoCode",
      "Type": "LI",
      "CreditPolicy": "ALWAYS",
      "CampaignId": "1000",
      "CampaignName": "Acme Program",
      "AssignedPartnerId": "10000",
      "AssignedPartnerName": "Acme Partner",
      "CreatedDate": "2020-12-09T05:27:44-08:00",
      "StartDate": "2020-12-09T05:27:44-08:00",
      "EndDate": "",
      "State": "ACTIVE",
      "DealId": "",
      "DealName": "",
      "DealDescription": "",
      "DealState": "",
      "DealType": "",
      "DealScope": "",
      "DealProducts": [],
      "DealCategories": "",
      "DiscountType": "",
      "DiscountAmount": "",
      "DiscountCurrency": "",
      "DiscountPercent": "",
      "DiscountMaximumPercent": "",
      "DiscountPercentRangeStart": "",
      "DiscountPercentRangeEnd": "",
      "Gift": "",
      "RebateAmount": "",
      "RebateCurrency": "",
      "DealDefaultPromoCode": "",
      "MinimumPurchaseAmount": "",
      "MinimumPurchaseAmountCurrency": "",
      "MaximumSavingsAmount": "",
      "MaximumSavingsCurrency": "",
      "BogoBuyQuantity": "",
      "BogoBuyScope": "",
      "BogoBuyName": "",
      "BogoBuyImageUrl": "",
      "BogoGetQuantity": "",
      "BogoGetScope": "",
      "BogoGetDiscountType": "",
      "BogoGetName": "",
      "BogoGetImageUrl": "",
      "BogoGetDiscountAmount": "",
      "BogoGetDiscountCurrency": "",
      "BogoGetDiscountPercent": "",
      "PurchaseLimitQuantity": "",
      "DealStartDate": "",
      "DealEndDate": "",
      "SynchAdsPromoCodes": "",
      "DealRestrictedMediaPartners": [],
      "DealRestrictedMediaPartnerGroups": [],
      "Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
    } 
  ]
}