Promotions

Use the Promotion object to create/update and update information on discounts/promotions you set up for your account.

Request parameters

Parameter
Type / Description

Promotion

Object

Promotion.Name

Required (string) Promotion name

Promotion.Description

Optional (string) Promotion description

Promotion.StartDate

Optional (string) Starting date. The date when you set the promotion to start. Is NULL for promotions that start immediately after they're created.

Format: Y-m-d

Promotion.EndDate

Optional (string) Ending date. The date when you set the promotion to end. Is NULL for promotions that you want active indefinitely.

Format: Y-m-d

Promotion.MaximumOrdersNumber

Optional (integer) 2Checkout stops offering the discount when the promotion reaches the maximum number of orders. Can be NULL if you want the promotion to apply to an unlimited number of orders.

Promotion.MaximumQuantity

Optional (integer) Discount only applies to a specific number of products, smaller than the maximum quantity you defined. Can be NULL if you want the promotion to apply to an unlimited number of units. Any extra quantity added to the cart will be sold at full price.

Promotion.InstantDiscount

Optional (boolean) Selecting the instant discount option will auto-apply the discount for ALL the selected products for all shoppers, without the need to enter the discount coupon.

Coupon

Required (object)

Coupon.Type

String

  • SINGLE: one coupon code-shared by all shoppers

  • MULTIPLE: array of unique coupon codes, each designed for individual use

Coupon.Code/Codes

Array of strings

Varies according to type. Send:

  • Code: 'single_code'; when Type = 'SINGLE';

  • Codes: ['code1', 'code2']; when Type = 'MULTIPLE';

Enabled

Optional (boolean)

Possible values:

  • TRUE - promotion is active.

  • FALSE - promotion is inactive

ChannelType

Required (string)

Possible values:

  • ECOMMERCE

  • CHANNEL_MANAGER

  • ALL

Type

Required (string)

Possible values:

  • REGULAR

  • GLOBAL

  • SPECIAL_PRICE (use in combination with PriceMatrix and DefaultCurrency)

DefaultCurrency

Required (string) Required for SPECIAL_PRICE promotions, represents the default currency of the promotion.

PriceMatrix

Required (array of objects) (only for SPECIAL_PRICE type of promotion) Is generated by the getPriceMatrix call and used to set promotion special prices.

ProductCode

String Code of the product that is used by promotion.

PricingConfigurationCode

String Code of pricing configuration used by promotion; must be related to the product.

OptionHash

String Unique identifier of one combination of price configuration options.

Options

Optional (array of objects) Describes price configuration options identified by OptionHash.

GroupName

String

OptionText

String

Prices

Required (array of objects) Promotion prices by currency; the price for default currency is required.

Value

Required (int) Decimal

Currency

String ISO code

Discount

Required (object)

Discount.Type

String

Discount type:

  • PERCENT, use in combination with Value

  • FIXED, use in combination with Values and DefaultCurrency

Discount.Value/Values

Array of objects

  • Value = Int, determines the discount percentage from 0 to 100

  • Values = Array of Value objects

Discount.Value/Values.Currency

String ISO currency code

Discount.Value/Values.Amount

Integer Discount amount in corresponding currency.

Discount.DefaultCurrency

String ISO code

Products

Optional (object)

Products.Code

Optional (integer) Unique product code that you control.

Products.PricingConfigurationCode

Optional (string) Unique system generated pricing configuration code.

Products.PricingOptionCodes

Optional (array of strings) Array of pricing option codes controlled by you.

PriceThreshold

Optional (object) Limits discount use only when total order value (taxes included) exceeds the threshold you configure.

PriceThreshold.Amount

Optional (decimal) The minimum threshold you defined for the default currency.

PriceThreshold.Currency

Optional (string) Currency code available for the default currency of custom threshold settings.

Translations

Optional (array of objects)

Translations.PromotionTranslation

Optional (object)

Translations.PromotionTranslation.Name

Optional (string) Localized name corresponding to translated language.

Name: Le product

Language: FR

Translations.PromotionTranslation.Language

Optional (string) Language for localization.

Sources

Optional (string array) Array of strings defining the sale source through the SRC parameter.

PublishToAffiliatesNetwork

Optional (integer) 1 - make promotion available in the Affiliates Network

0 - keep promotion unavailable for the Affiliates Network

ApplyRecurring

Required (string)

Choose whether to apply the discount to renewal orders. Possible values:

  • NONE

  • ALL

  • CUSTOM

RecurringChargesNumber

Optional (integer) If ApplyRecurring is set to CUSTOM, you can offer discounts for a number of recurring billing charges beyond the initial purchase.

Last updated

Was this helpful?