HomeGuidesAPI ReferenceAPI Changelog
Log In
API Reference

The promo code object

The promo code object holds information about a promo code being used in your program. You can create, retrieve, update, and delete a promo code, as well as list all promo codes.

Attributes


Id integer

Unique identifier for the object referred to as the impact.com Promo Code Id_.


Code string

The promo code.


Type enum

Matching type of the promo code.

View possible enum values
LIEXACT match type. When a customer enters a promo code on a store page, it must exactly match how it was entered in impact.com to be tracked.
REREGEX match type. When a customer enters a promo code on a store page, it must match the regular expression of how the promo code was entered in impact.com to be tracked. Learn more about regular expression. Test a regular expression.

CreditPolicy enum

Promo code's credit policy.

View possible enum values
ALWAYSPromo code's assigned partner will always be credited with the sale.
INVOLVEDPromo code's assigned partner will be credited with the sale if they were involved in driving it.
WINNERPromo code's assigned partner will be credited with the sale if they drove the last click.

CampaignId integer

Program Id associated with the promo code.


CampaignName string

Program name associated with the promo code.


AssignedPartnerId integer

Partner Id that was assigned the promo code.


AssignedPartnerName string

Partner name that was assigned the promo code.


CreatedDate string

Date and time the promo code was created. See ISO 8601.


StartDate string

Date and time the promo code starts. See ISO 8601.


EndDate string

Date and time the promo code ends. See ISO 8601.


State enum

State of a promo code.

View possible enum values
ACTIVEPromo is currently live.
INACTIVEPromo code is not currently active.

DealId integer

Deal Id associated with the promo code.


Uri string

Promo code's direct URI to view only one specific promo code.

More attributes

Click to view...

DealNamestring

Deal associated with the promo code.


DealDescriptionstring

Deal description associated with the promo code.


DealStateenum

Deal state associated with the promo code. Will be empty if no deal is associated with the promo code.

View possible enum values
ACTIVE

Deal is currently active.

EXPIRED

Deal is not currently active.

PENDING

Deal is currently waiting for approval.


DealTypeenum

Deal type associated with the promo code. Will be empty if no deal is associated with the promo code.

View possible enum values
GENERAL_SALEDeal applies a general discount to the products identified in DealScope.
FREE_SHIPPINGDeal applies free shipping to the order.
GIFT_WITH_PURCHASEA gift will come with the order.
REBATEA rebate will be available to the customer upon purchase.
BOGODeal will apply a buy-one-get-one deal to the order.

DealScopeenum

Deal scope associated with the promo code. Will be empty if no deal is associated with the promo code or if DealType=BOGO.

View possible enum values
CATEGORYDeal applies to a category of products.
ENTIRE_STOREDeal applies to the entire store.
PRODUCTDeal only applies to a specific product or a specific group of products.

DealProductsarray

If DealScope: "PRODUCT", then product info appears. Child attributes will also appear.

View child attributes

ProductNamestring

Product's name.


ProductImageURLstring

Product's image URL


ProductBeforePriceAmountinteger

Product's price prior to the deal applying.


ProductBeforePriceCurrencystring

Product's currency code prior to the deal applying. See ISO 4217.


ProductAfterPriceAmountinteger

Product's price after the deal applies.


ProductAfterPriceCurrencystring

Product's currency code after the deal applies. See ISO 4217.


DealCategoriesstring

If DealScope="CATEGORY", then category info appears.


DiscountTypeenum

Type of deal discount associated with the promo code.

View possible enum values
FIXEDDeal applies a fixed discount to the deal scope.
PERCENTDeal applies a percentage off of the deal scope.
PERCENT_RANGEDeal applies a percent within the percentage range off of the deal scope.
PERCENT_MAXIMUMDeal applies up to a certain percentage off of the deal scope.

DiscountAmountdecimal

If DiscountType="FIXED", then the discount amount appears.


DiscountCurrencystring

If DiscountType="FIXED", then the discount currency code appears. See ISO 4217.


DiscountPercentinteger

If DiscountType="PERCENT", then the discount percent appears.


DiscountMaximumPercentinteger

If DiscountType="PERCENT_MAXIMUM", then the maximum discount percentage appears.


DiscountPercentRangeStartinteger

If DiscountType="PERCENT RANGE", then the discount range beginning appears.


DiscountPercentRangeEndinteger

If DiscountType="PERCENT_RANGE", then the discount range end appears.


Giftstring

If DealType="GIFT_WITH_PURCHASE", then the gift's name appears.


RebateAmountinteger

If DealType="REBATE", then the rebate's amount appears.


RebateCurrencystring

If DealType="REBATE", then the rebate's currency code appears. See ISO 4217.


DealDefaultPromoCodestring

Associated deal's default promo code.


MinimumPurchaseAmountinteger

Associated deal's minimum purchase amount.


MinimumPurchaseAmountCurrencystring

Currency of the associated deal's minimum purchase amount. See ISO 4217.


MaximumSavingsAmountinteger

Associated deal's maximum purchase savings.


MaximumSavingsCurrencystring

Currency of the associated deal's maximum purchase savings. See ISO 4217.


BogoBuyQuantityinteger

If DealType="BOGO", the "buy" amount appears.


BogoBuyScopeenum

if DealType="BOGO", the "buy" scope appears. Will be empty if DealType≠BOGO.

View possible enum values
CATEGORYDeal applies to a category of products.
ENTIRE_STORE

Deal applies to entire store.

PRODUCTDeal only applies to a specific product or a specific group of products.

BogoBuyNamestring

If DealType="BOGO", the "buy" product name appears.


BogoBuyImageUrlstring

If DealType="BOGO", the "buy" product image URL appears.


BogoGetQuantityinteger

If DealType="BOGO", the "get" amount appears.


BogoGetScopeenum

If DealType="BOGO", the "get" scope appears. Will be empty if DealType≠"BOGO".

        <tr>
            <td>
                <code>CATEGORY</code>
            </td>
            <td>Deal applies to a category of products.</td>
        </tr>
View possible enum values
ENTIRE_STORE

Deal applies to entire store.

PRODUCTDeal only applies to a specific product or a specific group of products.

BogoGetDiscountTypeenum

If DealType="BOGO", the "get" discount type appears. Will be empty if DealType≠"BOGO".

View possible enum values
FREECustomer will receive the GET item for free.
AMOUNTCustomer will receive a specific amount of money off of the GET item's cost.
PERCENTCustomer will receive a percent off of the GET item's cost.

BogoGetNamestring

If DealType="BOGO", the "get" product name appears.


BogoGetImageUrlstring

If DealType="BOGO", the "get" product image URL appears.


BogoGetDiscountAmountdecimal

If BogoGetDiscountType="AMOUNT", the "get" discount amount appears.


BogoGetDiscountCurrencystring

If BogoGetDiscountType="AMOUNT", the currency of the "get" discount amount appears.


BogoGetDiscountPercentinteger

If BogoGetDiscountType="PERCENT", the "get" discount percent appears.


PurchaseLimitQuantityinteger

If DealType="BOGO", the amount of "buy" product purchasable at once. If 0, no purchase limit.


DealStartDatestring

Associated deal's start date. See ISO 8601.


DealEndDatestring

Associated deal's end date. See ISO 8601.


SynchAdsPromoCodesboolean

Has the value true if the associated deal aligns the state and date range of all ads and promo codes to the deal's. Has the value false if the associated deal does not have this.


DealRestrictedMediaPartnersstring

A comma-separated string of the partners that can use the associated deal.


DealRestrictedMediaPartnerGroupsstring

A comma-separated string of the partner groups that can use the associated deal.

{
  "Id": "7777777",
  "Code": "APlusAnvils",
  "Type": "RE",
  "CreditPolicy": "ALWAYS",
  "CampaignId": "1000",
  "CampaignName": "AcmeCampaign",
  "AssignedPartnerId": "10000",
  "AssignedPartnerName": "AcmePartner",
  "CreatedDate": "2020-12-11T10:10:07-08:00",
  "StartDate": "2020-12-11T10:10:07-08:00",
  "EndDate": "",
  "State": "ACTIVE",
  "DealId": "00003",
  "DealName": "AcmeDeal3",
  "DealDescription": "",
  "DealState": "ACTIVE",
  "DealType": "GENERAL_SALE",
  "DealScope": "PRODUCT",
  "DealProducts": [
    {
	    "ProductName": "Gray Anvil",
      "ProductImageUrl": "/images/Gray_Anvil.png",
      "ProductBeforePriceAmount": "50.00",
      "ProductBeforePriceCurrency": "USD",
      "ProductAfterPriceAmount": "45.00",
      "ProductAfterPriceCurrency": "USD"
     }
  ],
  "DealCategories": "",
  "DiscountType": "FIXED",
  "DiscountAmount": "5.00",
  "DiscountCurrency": "USD",
  "DiscountPercent": "",
  "DiscountMaximumPercent": "",
  "DiscountPercentRangeStart": "",
  "DiscountPercentRangeEnd": "",
  "Gift": "",
  "RebateAmount": "",
  "RebateCurrency": "",
  "DealDefaultPromoCode": "APlusAnvils",
  "MinimumPurchaseAmount": "",
  "MinimumPurchaseAmountCurrency": "",
  "MaximumSavingsAmount": "",
  "MaximumSavingsCurrency": "",
  "BogoBuyQuantity": "0",
  "BogoBuyScope": "",
  "BogoBuyName": "",
  "BogoBuyImageUrl": "",
  "BogoGetQuantity": "0",
  "BogoGetScope": "",
  "BogoGetDiscountType": "",
  "BogoGetName": "",
  "BogoGetImageUrl": "",
  "BogoGetDiscountAmount": "",
  "BogoGetDiscountCurrency": "",
  "BogoGetDiscountPercent": "",
  "PurchaseLimitQuantity": "0",
  "DealStartDate": "",
  "DealEndDate": "",
  "SynchAdsPromoCodes": "false",
  "DealRestrictedMediaPartners": [],
  "DealRestrictedMediaPartnerGroups": [],
  "Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
}
{
  "Id": "7777777",
  "Code": "Acme20",
  "Type": "LI",
  "CreditPolicy": "ALWAYS",
  "CampaignId": "1000",
  "CampaignName": "AcmeCampaign",
  "AssignedPartnerId": "10000",
  "AssignedPartnerName": "AcmePartner",
  "CreatedDate": "2020-09-10T10:51:23-07:00",
  "StartDate": "2020-12-11T10:12:39-08:00",
  "EndDate": "2020-12-11T10:13:06-08:00",
  "State": "ACTIVE",
  "DealId": "98765",
  "DealName": "Acme Deal2",
  "DealDescription": "",
  "DealState": "ACTIVE",
  "DealType": "GENERAL_SALE",
  "DealScope": "CATEGORY",
  "DealProducts": [],
  "DealCategories": "Anvils",
  "DiscountType": "FIXED",
  "DiscountAmount": "20.00",
  "DiscountCurrency": "USD",
  "DiscountPercent": "",
  "DiscountMaximumPercent": "",
  "DiscountPercentRangeStart": "",
  "DiscountPercentRangeEnd": "",
  "Gift": "",
  "RebateAmount": "",
  "RebateCurrency": "",
  "DealDefaultPromoCode": "Acme20",
  "MinimumPurchaseAmount": "",
  "MinimumPurchaseAmountCurrency": "",
  "MaximumSavingsAmount": "",
  "MaximumSavingsCurrency": "",
  "BogoBuyQuantity": "0",
  "BogoBuyScope": "",
  "BogoBuyName": "",
  "BogoBuyImageUrl": "",
  "BogoGetQuantity": "0",
  "BogoGetScope": "",
  "BogoGetDiscountType": "",
  "BogoGetName": "",
  "BogoGetImageUrl": "",
  "BogoGetDiscountAmount": "",
  "BogoGetDiscountCurrency": "",
  "BogoGetDiscountPercent": "",
  "PurchaseLimitQuantity": "0",
  "DealStartDate": "",
  "DealEndDate": "",
  "SynchAdsPromoCodes": "false",
  "DealRestrictedMediaPartners": [],
  "DealRestrictedMediaPartnerGroups": [],
  "Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
}
{
  "Id": "7777777",
  "Code": "Acme BOGO10",
  "Type": "LI",
  "CreditPolicy": "ALWAYS",
  "CampaignId": "1000",
  "CampaignName": "AcmeCampaign",
  "AssignedPartnerId": "10000",
  "AssignedPartnerName": "AcmePartner",
  "CreatedDate": "2020-12-11T11:43:37-08:00",
  "StartDate": "2020-12-11T11:43:37-08:00",
  "EndDate": "",
  "State": "ACTIVE",
  "DealId": "00004",
  "DealName": "ACME BOGO Deal",
  "DealDescription": "",
  "DealState": "ACTIVE",
  "DealType": "BOGO",
  "DealScope": "",
  "DealProducts": [],
  "DealCategories": "",
  "DiscountType": "",
  "DiscountAmount": "",
  "DiscountCurrency": "",
  "DiscountPercent": "",
  "DiscountMaximumPercent": "",
  "DiscountPercentRangeStart": "",
  "DiscountPercentRangeEnd": "",
  "Gift": "",
  "RebateAmount": "",
  "RebateCurrency": "",
  "DealDefaultPromoCode": "ACME BOGO",
  "MinimumPurchaseAmount": "",
  "MinimumPurchaseAmountCurrency": "USD",
  "MaximumSavingsAmount": "",
  "MaximumSavingsCurrency": "",
  "BogoBuyQuantity": "1",
  "BogoBuyScope": "PRODUCT",
  "BogoBuyName": "Gray Anvil",
  "BogoBuyImageUrl": "",
  "BogoGetQuantity": "1",
  "BogoGetScope": "Product",
  "BogoGetDiscountType": "AMOUNT",
  "BogoGetName": "Hammer",
  "BogoGetImageUrl": "",
  "BogoGetDiscountAmount": "10.00",
  "BogoGetDiscountCurrency": "USD",
  "BogoGetDiscountPercent": "",
  "PurchaseLimitQuantity": "4",
  "DealStartDate": "2020-12-23T00:11:00-08:00",
  "DealEndDate": "2020-12-24T14:53:00-08:00",
  "SynchAdsPromoCodes": "false",
  "DealRestrictedMediaPartners": [],
  "DealRestrictedMediaPartnerGroups": [],
  "Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
        }