The deal object

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

Attributes


Id integer

Unique identifier for the object referred to as the impact.com Deal Id.


Name string

Name of the deal.


CampaignId integer

Id of the campaign associated with the deal.


State enum

What state of use the deal is in.

View possible enum values
ACTIVEDeal is currently active.
EXPIREDDeal is not currently active.
PENDINGDeal is currently waiting for approval.

Type enum

What the deal does.

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.

Scope enum

To what extent the deal applies to the store.

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.

Products array

If Scope: "PRODUCT", then an array of product info objects appears. Child attributes will also appear.

View child attributes

ProductName string

Name of the product that the deal applies to.


ProductImageURL string

URL that leads to the product's image.


ProductBeforePriceAmount integer

Product's price prior to the deal applying.


ProductBeforePriceCurrency string

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


ProductAfterPriceAmount integer

Product's price after the deal applies.


ProductAfterPriceCurrency string

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


Categories string

If Scope: "CATEGORY", then category info appears.

Discount attributes

View discount parameters

DiscountType enum

Type of deal discount.

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.

DiscountAmount decimal

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


DiscountCurrency string

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


DiscountPercent percentage

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


DiscountMaximumPercent percentage

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


DiscountPercentRangeStart percentage

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


DiscountPercentRangeEnd percentage

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


Gift attributes

View gift attributes

Gift string

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


Rebate attributes

View rebate parameters

RebateAmount decimal

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


RebateCurrency string

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


BOGO attributes

View BOGO attributes

BogoBuyQuantity integer

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


BogoBuyScope enum

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

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

BogoBuyName string

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


BogoBuyImageUrl string

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


BogoGetQuantity integer

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


BogoGetScope enum

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

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

BogoGetDiscountType enum

If Type="BOGO", the "get" discount type appears. Will be empty if Type≠"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.

BogoGetName string

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


BogoGetImageUrl string

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


BogoGetDiscountAmount decimal

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


BogoGetDiscountCurrency string

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


BogoGetDiscountPercent percentage

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


PurchaseLimitQuantity integer

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


RestrictedMediaPartners array

Array of partner names that can use the deal.


RestrictedMediaPartnerGroups array

Array of partner groups that can use the deal.


Uri string

Deal's direct URI to view only one specific deal.

More attributes

View more attributes

Description string

Description of the deal. Can be empty.


DefaultPromoCode string

Deal's default promo code.


MinimumPurchaseAmount decimal

Deal's minimum purchase amount.


MinimumPurchaseAmountCurrency string

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


MaximumSavingsAmount integer

Deal's maximum purchase savings.


MaximumSavingsCurrency string

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


StartDate string

Deal's start date. See ISO 8601.


EndDate string

Deal's end date. See ISO 8601.


SynchAdsPromoCodes boolean

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

{
  "Id": "00003",
  "Name": "AcmeDeal3",
  "Description": "",
  "CampaignId": "10000",
  "State": "ACTIVE",
  "Type": "GENERAL_SALE",
  "Scope": "PRODUCT",
  "Products": [
    {
      "ProductName": "Gray Anvil",
      "ProductImageUrl": "/images/Gray_Anvil.png",
      "ProductBeforePriceAmount": "50.00",
      "ProductBeforePriceCurrency": "USD",
      "ProductAfterPriceAmount": "45.00",
      "ProductAfterPriceCurrency": "USD"
      },
    ...
  ],
  "Categories": "",
  "DiscountType": "FIXED",
  "DiscountAmount": "5.00",
  "DiscountCurrency": "USD",
  "DiscountPercent": "",
  "DiscountMaximumPercent": "",
  "DiscountPercentRangeStart": "",
  "DiscountPercentRangeEnd": "",
  "Gift": "",
  "RebateAmount": "",
  "RebateCurrency": "",
  "DefaultPromoCode": "APlusAnvils",
  "MinimumPurchaseAmount": "",
  "MinimumPurchaseAmountCurrency": "",
  "MaximumSavingsAmount": "",
  "MaximumSavingsCurrency": "",
  "BogoBuyQuantity": "0",
  "BogoBuyScope": "",
  "BogoBuyName": "",
  "BogoBuyImageUrl": "",
  "BogoGetQuantity": "0",
  "BogoGetScope": "",
  "BogoGetDiscountType": "",
  "BogoGetName": "",
  "BogoGetImageUrl": "",
  "BogoGetDiscountAmount": "",
  "BogoGetDiscountCurrency": "",
  "BogoGetDiscountPercent": "",
  "PurchaseLimitQuantity": "0",
  "StartDate": "",
  "EndDate": "",
  "SynchAdsPromoCodes": "false",
  "RestrictedMediaPartners": [],
  "RestrictedMediaPartnerGroups": [],
  "Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
}
{
  "Id": "98765",
  "Name": "Acme Deal2",
  "Description": "",
  "CampaignId": "10000",
  "State": "ACTIVE",
  "Type": "GENERAL_SALE",
  "Scope": "CATEGORY",
  "Products": [],
  "Categories": "Anvils",
  "DiscountType": "FIXED",
  "DiscountAmount": "20.00",
  "DiscountCurrency": "USD",
  "DiscountPercent": "",
  "DiscountMaximumPercent": "",
  "DiscountPercentRangeStart": "",
  "DiscountPercentRangeEnd": "",
  "Gift": "",
  "RebateAmount": "",
  "RebateCurrency": "",
  "DefaultPromoCode": "Acme20",
  "MinimumPurchaseAmount": "",
  "MinimumPurchaseAmountCurrency": "",
  "MaximumSavingsAmount": "",
  "MaximumSavingsCurrency": "",
  "BogoBuyQuantity": "0",
  "BogoBuyScope": "",
  "BogoBuyName": "",
  "BogoBuyImageUrl": "",
  "BogoGetQuantity": "0",
  "BogoGetScope": "",
  "BogoGetDiscountType": "",
  "BogoGetName": "",
  "BogoGetImageUrl": "",
  "BogoGetDiscountAmount": "",
  "BogoGetDiscountCurrency": "",
  "BogoGetDiscountPercent": "",
  "PurchaseLimitQuantity": "0",
  "StartDate": "",
  "EndDate": "",
  "SynchAdsPromoCodes": "false",
  "RestrictedMediaPartners": [],
  "RestrictedMediaPartnerGroups": [],
  "Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
}
{
  "Id": "00004",
  "Name": "ACME BOGO Deal",
  "Description": "",
  "CampaignId": "10000",
  "State": "ACTIVE",
  "Type": "BOGO",
  "Scope": "",
  "Products": [],
  "Categories": "",
  "DiscountType": "",
  "DiscountAmount": "",
  "DiscountCurrency": "",
  "DiscountPercent": "",
  "DiscountMaximumPercent": "",
  "DiscountPercentRangeStart": "",
  "DiscountPercentRangeEnd": "",
  "Gift": "",
  "RebateAmount": "",
  "RebateCurrency": "",
  "DefaultPromoCode": "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",
  "StartDate": "2020-12-23T00:11:00-08:00",
  "EndDate": "2020-12-24T14:53:00-08:00",
  "SynchAdsPromoCodes": "false",
  "RestrictedMediaPartners": [],
  "RestrictedMediaPartnerGroups": [],
  "Uri": "/Advertisers/<AccountSID>/PromoCodes/7777777"
        }