Get promotions

Get all promotions from the store

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

📘

read_promotion scope is required to access this feature

Response

A JSON array with the following fields:

FieldTypeDescription
namestringName for the promotion. It is displayed on the checkout as the discount name.
discountBasestringBase from which discount is calculated on the checkout. Supports only two values: "ITEM" or "SUBTOTAL".
If "ITEM" – discount is applied only for products/categories specified in the targets array.
If "SUBTOTAL" – discount will be applied to all products added to the cart.
enabledbooleantrue if promotion is enabled, false otherwise
discountTypestringDescribes if the discount is calculated as a percent or an absolute value. Supports only two values: "PERCENT" or "ABSOLUTE".
amountnumberDiscount amount. Value is applied as an absolute sum or a percent depending on the "discountType" field.
triggersArrayTriggers that define when the discount is applied. Supports restricting by date, customer group and subtotal in any combination.
targetsArrayLimit the discount by categories, specific products, combinations and even attributes customer group and subtotal in any combination.

Triggers

Set up triggers when the discount from promotion should be applied on the checkout:

FieldTypeDescription
startDatestringDate and time to start the promotion
endDatestringDate and time to end the promotion
customerGroupsArray[number]Customer group IDs for the promotion
subtotalnumberMinimum cost of products added to the cart for the promotion to be applied

Targets

Restrict promotion by specific products, categories, combintaions (product variations), and attributes:

FieldTypeDescription
categoriesArray[number]Restrict promotion by a list of category IDs
productsArray[number]Restrict promotion by a list of product IDs
attributesArrayRestrict promotion by a list of attribute values
combinationsArrayRestrict promotion by a list of product combinations
allbooleanInternal value (read-only)

Attributes

Restrict the promotion by products with specific attribute values

FieldTypeDescription
attributeIdnumberAttribute ID
attributeValuesArray[string]Attribute values in products, for which the promotion should apply

Combinations

Restrict promotion by specific product combinations:

FieldTypeDescription
productIdstringProduct ID
combinationIdsArray[string]Combination IDs for that product, for which the promotion should be applied
Language
Authorization
Query