Create promotion
Enables you to create a promotion
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
The x-site-context
header is a JSON object that contains information about the source you wish to pull from. The mandatory account
is the 24 character identifier found in Copilot. The channel
(Sales channel ID), stage
(environment name), and date
attributes can be used to further narrow the scope of your data source.
"{\"date\": \"2023-01-01T00:00:00.000Z\", \"channel\": 12, \"account\": \"1234abcd5678efgh9ijklmno\",\"stage\":\"production\"}"
Body
Following example shows creation of a promotion to get 10% off on any item sold with quantity 2 . If type is PRODUCT
and kind is SKU
, value as *
indicates that all products are selected for the discount to be applied.
Promotion title
3 - 120
"CREATE PROMO"
Start date of the promotion
"2019-08-24T14:15:22Z"
End date of the promotion
"2019-08-25T14:15:22Z"
A flag indicating whether a coupon can be stacked with an existing promotion. Set it to true
to prevent the coupon from being applied to items that already have promotions and false
to allow coupon to be applied with existing promotions.
true
Promotion type.<br /> Product: SKU promotion. Promotion or discount on SKUs based on the value mentioned in discount object<br />CART: Cart promotion. Promotion or discount on minimum order amount of cart based on the ORDER_VALUE that is set in condition object<br />QUANTITY: Quantity promotion provides discounts on items based on the quantity requirement set in the promotion<br />BOGO: Buy One Get One promotion provides discounts based on the Buy conditions and Get discounts<br />SHIPPING: Shipping promotion provides discounts on the shipping cost<br />BUYGET: BuyGet promotion specifies the Buy conditions and Get discounts<br />SPEND_GET: SpendGet promotion can specify the requirement of cart order value and the corresponding Get discounts
PRODUCT
, CART
, QUANTITY
, BOGO
, SHIPPING
, BUYGET
, SPEND_GET
"PRODUCT"
It is used to define operator between different Buy conditions (different conditions as mentioned in the condition
object)
AND
, OR
"OR"
Defines the rules for how a promotion can be combined with other promotions. This field determines whether a specific promotion can be applied in conjunction with other active promotions during a transaction or if it must be used exclusively. Possible values: - STACKABLE
: This promotion can be combined with other stackable promotions, allowing multiple
discounts to be applied together. The order in which stackable promotions are applied
is determined by the level
field, with promotions having a higher priority (lower numeric value)
being applied before those with a lower priority.
EXCLUSIVE
: This promotion cannot be combined with any other promotions. Thelevel
field is used to determine which exclusive promotion will be evaluated and applied first. Once an exclusive promotion is applied, no other promotions can be used in the same transaction.TYPE_EXCLUSIVE
: This promotion cannot be combined with other promotions of the same type. Thelevel
field is used to determine which promotion within the same type will be evaluated and applied first.UNIVERSAL
: This promotion can be combined with any other promotions without restrictions. Universal promotions will be evaluated last. We don't need to definelevel
for this type.
STACKABLE
, EXCLUSIVE
, TYPE_EXCLUSIVE
, UNIVERSAL
"STACKABLE"
The promotion execution order. Promotion types are assigned default execution orders. Initial evaluation begins with level 1 promotions. The result of level 1 is used as the base price for level 2. Similarly, the result of level 2 becomes the base price for level 3, and so on.
1
Message description for the promotion
The IDs of the shipping methods. They are required for promotions related to shipping.
IDs of the price lists to which this promotion is applied
Array of limits for the promotion to be applied
Promotion note or description
"Independence day sale!"
A placeholder for additional attributes, in key-value pairs.
Details of additional attributes.
Response
A 24-character system-generated promotion ID.
"abcdefg1ee7ce20123456789"
A unique identifier of the promotion, for external use.
100013
A list of coupon codes that are applicable only for coupons. For coupons, the response includes promo codes associated with the coupon. For promotions, the response includes an empty array.
["SUMMER100", "SUMMER20"]
Promotion status. <br /> ACTIVE
indicates that the promotion is applied to SKUs or items for which it is set as Active. Active promotions cannot be disabled.<br />SCHEDULED
indicates that the promotion is scheduled to be applied to SKUs or items based on the defined start date.<br />DISABLED
indicates that the promotion is set as disabled and is not in use. Only Disabled promotions can be enabled.<br />EXPIRED
indicates that the promotion is stopped by setting the expiration date. That is, the start date and end date as the current date. Only those promotions that are not expired can be enabled.
ACTIVE
, SCHEDULED
, DISABLED
, EXPIRED
"SCHEDULED"
A flag indicating whether an offer is applied automatically. Set it to true
for promotions, which should be applied automatically and false
for coupons, which must be applied explicitly.
true
Title of the promotion
"CREATE PROMO"
It is used to define operator between different Buy conditions (different conditions as mentioned in the condition
object)
AND
, OR
"OR"
Start date of the promotion
"2019-08-24T14:15:22Z"
End date of the promotion
"2019-08-25T14:15:22Z"
A flag indicating whether a coupon can be stacked with an existing promotion. Set it to true
to prevent the coupon from being applied to items that have promotions and false
to allow coupon to be applied with existing promotions.
true
Promotion type.<br /> Product: SKU promotion. Promotion or discount on SKUs based on the value mentioned in discount object<br />CART: Cart promotion. Promotion or discount on cart amount based on the ORDER_VALUE that is set in condition object<br />QUANTITY: Quantity promotion provides discounts based on the quantity requirement set in the promotion<br />BOGO: Buy One Get One promotion provides discounts based on the Buy conditions and Get discounts<br />SHIPPING: Shipping promotion provides discounts on the shipping cost<br />BUYGET: BuyGet promotion specifies the Buy conditions and Get discounts<br />SPEND_GET: SpendGet promotion can specify the requirement of cart order value and the corresponding Get discounts
PRODUCT
, CART
, QUANTITY
, BOGO
, SHIPPING
, BUYGET
, SPEND_GET
"PRODUCT"
Defines the rules for how a promotion can be combined with other promotions. This field determines whether a specific promotion can be applied in conjunction with other active promotions during a transaction or if it must be used exclusively. Possible values: - STACKABLE
: This promotion can be combined with other stackable promotions, allowing multiple
discounts to be applied together. The order in which stackable promotions are applied
is determined by the level
field, with promotions having a higher priority (lower numeric value)
being applied before those with a lower priority.
EXCLUSIVE
: This promotion cannot be combined with any other promotions. Thelevel
field is used to determine which exclusive promotion will be evaluated and applied first. Once an exclusive promotion is applied, no other promotions can be used in the same transaction.TYPE_EXCLUSIVE
: This promotion cannot be combined with other promotions of the same type. Thelevel
field is used to determine which promotion within the same type will be evaluated and applied first.UNIVERSAL
: This promotion can be combined with any other promotions without restrictions. Universal promotions will be evaluated last. We don't need to definelevel
for this type.
STACKABLE
, EXCLUSIVE
, TYPE_EXCLUSIVE
, UNIVERSAL
"STACKABLE"
The promotion execution order. Promotion types are assigned default execution orders. Initial evaluation begins with level 1 promotions. The result of level 1 is used as the base price for level 2. Similarly, the result of level 2 becomes the base price for level 3, and so on.
1
Message description for the promotion
Required for Shipping type promo to provide eligible shipment Methods
Shipping method IDs of the shipping methods to which promotion is applicable
IDs of the price lists to which this promotion is applied
Array of limits for the promotion to be applied
Promotion note or description
"Independence day sale!"
Creation date of the record
"2019-08-20T14:15:22Z"
Last updated date of the record
"2019-08-20T14:15:22Z"
Was this page helpful?