Creates a new deal.
Parameters
CampaignId
required
CampaignId
requiredId
of the campaign to be associated with the deal.
Name
required
Name
requiredName of the deal.
Scope
required
Scope
requiredTo what extent the deal applies to the store.
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. |
ENTIRE_STORE | Deal applies to the entire store. |
Type
required
Type
requiredWhat the deal does.
View possible enum values | |
---|---|
BOGO | Deal will apply a buy-one-get-one deal to the order. The following parameters are required: BogoBuyQuantity , BogoBuyName , BogoBuyScope , BogoGetQuantity , BogoGetName , BogoGetScope , BogoGetDiscountType . |
GENERAL_SALE | Deal applies a general discount to the products identified in DealScope . One of the following parameter sets is required:DiscountPercent ,DiscountAmount together with DiscountCurrency ,DiscountMaximumPercent , or DiscountPercentRangeStart together with DiscountPercentRangeEnd . |
FREE_SHIPPING | Deal applies free shipping to the order. |
GIFT_WITH_PURCHASE | A gift will come with the order. Gift parameter is required. |
REBATE | A rebate will be available to the customer upon purchase. RebateAmount and RebateCurrency are required. |
ProductName
optional
ProductName
optionalProducts the deal applies to. Cannot use if Scope≠PRODUCT
.
Categories
optional
Categories
optionalCategories to which this deal belongs. Cannot use if Scope≠"CATEGORY"
.
RestrictedMediaPartners
optional
RestrictedMediaPartners
optionalComma-separated list of Partner Id values.
RestrictedMediaPartnerGroups
optional
RestrictedMediaPartnerGroups
optionalComma-separated list of Media Partner Group Id values.
BOGO parameters
View BOGO parameters
BogoBuyImageFileName
optional
BogoBuyImageFileName
optionalURL to the "buy" product's image. Cannot use if Type≠"BOGO"
.
BogoBuyName
optional
BogoBuyName
optionalName of the "buy" product. Cannot use if Type≠"BOGO"
.
BogoBuyQuantity
optional
BogoBuyQuantity
optional"Buy" product quantity available. Cannot use if Type≠"BOGO"
.
BogoBuyScope
optional
BogoBuyScope
optional"Buy" product scope. Cannot use 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. |
BogoGetDiscountAmount
optional
BogoGetDiscountAmount
optional"Get" product discount amount. Cannot use if Type≠"BOGO"
and BogoGetDiscountType≠"AMOUNT"
.
BogoGetDiscountType
optional
BogoGetDiscountType
optional"Get" product discount type. Cannot use 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. BogoGetDiscountAmount is required. |
PERCENT | Customer will receive a percent off of the `GET` item's cost. BogoGetDiscountPercent is required. |
BogoGetDiscountPercent
optional
BogoGetDiscountPercent
optional"Get" product discount percentage. Cannot use if Type≠"BOGO"
and BogoGetDiscountType≠"PERCENT"
.
BogoGetImageFileName
optional
BogoGetImageFileName
optionalURL to the "get" product's image. Cannot use if Type≠"BOGO"
.
BogoGetName
optional
BogoGetName
optional"Get" product name. Cannot use if Type≠"BOGO"
.
BogoGetQuantity
optional
BogoGetQuantity
optional"Get" product quantity available. Cannot use if Type≠"BOGO"
.
BogoGetScope
optional
BogoGetScope
optional"Get" product scope. Cannot use 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. |
General Sale parameters
View General Sale parameters
DiscountType
optional
DiscountType
optionalWhat kind of discount a consumer will get. Use only if Type="GENERAL_SALE"
.
View possible enum values | |
---|---|
FIXED | Deal gives a fixed amount off. |
PERCENT | Deal gives a percentage off. |
PERCENT_RANGE | Deal gives a percentage range off. |
PERCENT_MAXIMUM | Deal gives up to a certain percentage off. |
DiscountAmount
optional
DiscountAmount
optionalDeal's discount amount. Cannot use if DiscountType≠"FIXED"
.
DiscountCurrency
optional
DiscountCurrency
optionalDeal's discount amount currency code. Cannot use if DiscountType≠"FIXED"
. See impact.com's supported currencies.
DiscountMaximumPercent
optional
DiscountMaximumPercent
optionalMaximum discount percent. Cannot use if DiscountType≠"PERCENT_MAXIMUM"
.
DiscountPercent
optional
DiscountPercent
optionalDeal's discount percent. Cannot use if DiscountType≠"PERCENT"
.
DiscountPercentRangeStart
optional
DiscountPercentRangeStart
optionalBeginning of the discount range. Cannot use if DiscountType≠"PERCENT_RANGE"
.
DiscountPercentRangeEnd
optional
DiscountPercentRangeEnd
optionalEnd of the discount range. Cannot use if DiscountType≠"PERCENT_RANGE"
.
Gift parameters
View Gift parameters
Gift
optional
Gift
optionalName of the gift that comes with a purchase. Cannot use if Type≠"GIFT_WITH_PURCHASE"
.
Rebate parameters
View Rebate parameters
RebateAmount
optional
RebateAmount
optionalPurchase rebate amount. Cannot use if Type≠"REBATE"
.
RebateCurrency
optional
RebateCurrency
optionalPurchase rebate currency code. Cannot use if Type≠"REBATE"
. See impact.com's supported currencies.
DefaultPromoCode
optional
DefaultPromoCode
optionalA promo code partners that have access to this deal can use. This promo code can always be used to activate the deal.
StartDate
optional
StartDate
optionalDate and time the deal begins. See ISO 8601.
EndDate
optional
EndDate
optionalDate and time the deal ends. See ISO 8601.
MinimumSavingsAmount
optional
MinimumSavingsAmount
optionalMinimum savings a consumer will get when this deal is applied.
MinimumSavingsCurrency
optional
MinimumSavingsCurrency
optionalCurrency of the deal's minimum purchase savings. See impact.com's supported currencies.
MaximumSavingsAmount
optional
MaximumSavingsAmount
optionalMaximum savings a consumer will get when this deal is applied.
MaximumSavingsCurrency
optional
MaximumSavingsCurrency
optionalCurrency of the deal's maximum purchase savings. See impact.com's supported currencies.
More parameters
View more parameters
Description
optional
Description
optionalDescription of the deal.
ProductBeforePriceAmount
optional
ProductBeforePriceAmount
optionalProduct's price before the deal applies.
ProductBeforePriceCurrency
optional
ProductBeforePriceCurrency
optionalProduct's price's currency code before the deal applies. See impact.com's supported currencies.
ProductAfterPriceAmount
optional
ProductAfterPriceAmount
optionalProduct's price after the deal applies.
ProductAfterPriceCurrency
optional
ProductAfterPriceCurrency
optionalProduct's price's currency code after the deal applies. See impact.com's supported currencies.
ProductFileName
optional
ProductFileName
optionalName of the file uploaded that contains the product's image.
PurchaseLimitQuantity
optional
PurchaseLimitQuantity
optionalMaximum quantity of "buy" product purchasable in one transaction. Enter 0
to have no purchase limit.
SynchAdsPromoCodes
optional
SynchAdsPromoCodes
optionalUse true
if the deal should align the state and date range of all related ads and promo codes to the deal's. Use false
to prevent the deal does not have this. Defaults to false
.
Returns
Returns the status of the request and the URI of the newly created deal. Returns an error if create parameters are invalid or if a required parameter is missing.
Example Request
curl 'https://api.impact.com/Advertisers/<AccountSID>/Deals' \
-X POST \
-u '<AccountSID>:<AuthToken>' \
-d 'CampaignId=1000' \
-d 'Name=ACME Hammer Bogo' \
-d 'Scope=PRODUCT' \
-d 'Type=BOGO' \
-d 'BogoBuyName=Hammer' \
-d 'BogoBuyQuantity=200' \
-d 'BogoBuyScope=PRODUCT' \
-d 'BogoGetDiscountAmount=20' \
-d 'BogoGetDiscountCurrency=USD' \
-d 'BogoGetDiscountType=AMOUNT' \
-d 'BogoGetName=Anvil' \
-d 'BogoGetQuantity=150' \
-d 'BogoGetScope=PRODUCT' \
-d 'Description=This is a description.' \
-d 'DefaultPromoCode=Get20Off' \
-d 'EndDate=2021-01-31T16:27:04+00:00' \
-d 'PurchaseLimitQuantity=0' \
-d 'StartDate=2021-01-21T16:27:04+00:00' \
-d 'SynchAdsPromoCodes=false'
curl 'https://api.impact.com/Advertisers/<AccountSID>/Deals' \
-X POST \
-u '<AccountSID>:<AuthToken>' \
-d 'CampaignId=1000' \
-d 'Name=ACME Sale' \
-d 'Scope=ENTIRE_STORE' \
-d 'Type=GENERAL_SALE' \
-d 'DiscountType=FIXED' \
-d 'DiscountAmount=25' \
-d 'DiscountCurrency=USD'
curl 'https://api.impact.com/Advertisers/<AccountSID>/Deals' \
-X POST \
-u '<AccountSID>:<AuthToken>' \
-d 'CampaignId=1000' \
-d 'Name=ACME Hammer Rebate' \
-d 'Scope=PRODUCT' \
-d 'Type=REBATE' \
-d 'RebateAmount=30' \
-d 'RebateCurrency=USD'
Example Response
{
"Status": "OK",
"Uri": "/Advertisers/<AccountSID>/Deals/00004"
}