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
Id
integerUnique identifier for the object referred to as the impact.com Deal Id.
Name
string
Name
stringName of the deal.
CampaignId
integer
CampaignId
integerId
of the campaign associated with the deal.
State
enum
State
enumWhat state of use the deal is in.
View possible enum values | |
---|---|
ACTIVE | Deal is currently active. |
EXPIRED | Deal is not currently active. |
PENDING | Deal is currently waiting for approval. |
Type
enum
Type
enumWhat the deal does.
View possible enum values | |
---|---|
GENERAL_SALE | Deal applies a general discount to the products identified in `DealScope`. |
FREE_SHIPPING | Deal applies free shipping to the order. |
GIFT_WITH_PURCHASE | A gift will come with the order. |
REBATE | A rebate will be available to the customer upon purchase. |
BOGO | Deal will apply a buy-one-get-one deal to the order. |
Scope
enum
Scope
enumTo what extent the deal applies to the store.
View possible enum values | |
---|---|
CATEGORY | Deal applies to a category of products. |
ENTIRE_STORE | Deal applies to the entire store. |
PRODUCT | Deal only applies to a specific product or a specific group of products. |
Products
array
Products
array If Scope: "PRODUCT"
, then an array of product info objects appears. Child attributes will also appear.
View child attributes
ProductName
string
ProductName
stringName of the product that the deal applies to.
ProductImageURL
string
ProductImageURL
stringURL that leads to the product's image.
ProductBeforePriceAmount
integer
ProductBeforePriceAmount
integerProduct's price prior to the deal applying.
ProductBeforePriceCurrency
string
ProductBeforePriceCurrency
stringProduct's currency code prior to the deal applying. See ISO 4217.
ProductAfterPriceAmount
integer
ProductAfterPriceAmount
integerProduct's price after the deal applies.
ProductAfterPriceCurrency
string
ProductAfterPriceCurrency
stringProduct's price's currency code after the deal applies. See ISO 4217.
Categories
string
Categories
stringIf Scope: "CATEGORY"
, then category info appears.
Discount attributes
View discount parameters
DiscountType
enum
DiscountType
enumType of deal discount.
View possible enum values | |
---|---|
FIXED | Deal applies a fixed discount to the deal scope. |
PERCENT | Deal applies a percentage off of the deal scope. |
PERCENT_RANGE | Deal applies a percent within the percentage range off of the deal scope. |
PERCENT_MAXIMUM | Deal applies up to a certain percentage off of the deal scope. |
DiscountAmount
decimal
DiscountAmount
decimalIf DiscountType="FIXED"
, then the discount amount appears.
DiscountCurrency
string
DiscountCurrency
stringIf DiscountType="FIXED"
, then the discount currency code appears. See ISO 4217.
DiscountPercent
percentage
DiscountPercent
percentageIf DiscountType="PERCENT"
, then the discount percent appears.
DiscountMaximumPercent
percentage
DiscountMaximumPercent
percentageIf DiscountType="PERCENT_MAXIMUM"
, then the maximum discount percentage appears.
DiscountPercentRangeStart
percentage
DiscountPercentRangeStart
percentageIf DiscountType="PERCENT_RANGE"
, then the discount range beginning appears.
DiscountPercentRangeEnd
percentage
DiscountPercentRangeEnd
percentageIf DiscountType="PERCENT_RANGE"
, then the discount range end appears.
Gift attributes
Rebate attributes
View rebate parameters
RebateAmount
decimal
RebateAmount
decimalIf Type="REBATE"
, then the rebate's amount appears.
RebateCurrency
string
RebateCurrency
stringIf Type="REBATE"
, then the rebate's currency code appears. See ISO 4217.
BOGO attributes
View BOGO attributes
BogoBuyQuantity
integer
BogoBuyQuantity
integer If Type="BOGO"
, the "buy" amount appears.
BogoBuyScope
enum
BogoBuyScope
enum If Type="BOGO"
, the "buy" scope appears. Will be empty if Type≠BOGO
.
View possible enum values | |
---|---|
PRODUCT | Deal only applies to a specific product or a specific group of products. |
CATEGORY | Deal applies to a category of products. |
BogoBuyName
string
BogoBuyName
stringIf Type="BOGO"
, the "buy" product name appears.
BogoBuyImageUrl
string
BogoBuyImageUrl
stringIf Type="BOGO"
, the "buy" product image URL appears.
BogoGetQuantity
integer
BogoGetQuantity
integerIf Type="BOGO"
, the "get" amount appears.
BogoGetScope
enum
BogoGetScope
enum If Type="BOGO"
, the "get" scope appears. Will be empty if Type≠"BOGO"
.
View possible enum values | |
---|---|
PRODUCT | Deal only applies to a specific product or a specific group of products. |
CATEGORY | Deal applies to a category of products. |
BogoGetDiscountType
enum
BogoGetDiscountType
enumIf Type="BOGO"
, the "get" discount type appears. Will be empty if Type≠"BOGO"
.
View possible enum values | |
---|---|
FREE | Customer will receive the `GET` item for free. |
AMOUNT | Customer will receive a specific amount of money off of the `GET` item's cost. |
PERCENT | Customer will receive a percent off of the `GET` item's cost. |
BogoGetName
string
BogoGetName
stringIf Type="BOGO"
, the "get" product name appears.
BogoGetImageUrl
string
BogoGetImageUrl
stringIf Type="BOGO"
, the "get" product image URL appears.
BogoGetDiscountAmount
decimal
BogoGetDiscountAmount
decimalIf BogoGetDiscountType="AMOUNT"
, the "get" discount amount appears.
BogoGetDiscountCurrency
string
BogoGetDiscountCurrency
stringIf BogoGetDiscountType="AMOUNT"
, the currency of the "get" discount amount appears.
BogoGetDiscountPercent
percentage
BogoGetDiscountPercent
percentageIf BogoGetDiscountType="PERCENT"
, the "get" discount percent appears.
PurchaseLimitQuantity
integer
PurchaseLimitQuantity
integerIf Type="BOGO"
, the amount of "buy" product purchasable at once. If 0
, no purchase limit.
RestrictedMediaPartners
array
RestrictedMediaPartners
arrayArray of partner names that can use the deal.
RestrictedMediaPartnerGroups
array
RestrictedMediaPartnerGroups
arrayArray of partner groups that can use the deal.
Uri
string
Uri
stringDeal's direct URI to view only one specific deal.
More attributes
View more attributes
Description
string
Description
stringDescription of the deal. Can be empty.
DefaultPromoCode
string
DefaultPromoCode
stringDeal's default promo code.
MinimumPurchaseAmount
decimal
MinimumPurchaseAmount
decimalDeal's minimum purchase amount.
MinimumPurchaseAmountCurrency
string
MinimumPurchaseAmountCurrency
stringCurrency of the deal's minimum purchase amount. See ISO 4217.
MaximumSavingsAmount
integer
MaximumSavingsAmount
integerDeal's maximum purchase savings.
MaximumSavingsCurrency
string
MaximumSavingsCurrency
stringCurrency of the deal's maximum purchase savings. See ISO 4217.
StartDate
string
StartDate
stringDeal's start date. See ISO 8601.
EndDate
string
EndDate
stringDeal's end date. See ISO 8601.
SynchAdsPromoCodes
boolean
SynchAdsPromoCodes
booleanHas 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"
}