Promotions
A promotion is a discount rule that Expressoft applies automatically. Use loyalty.promotion to read the promotions.
Query
query GetPromotions($date: DateTime, $first: Int, $after: String) {
loyalty {
promotion(date: $date, first: $first, after: $after) {
totalCount
pageInfo {
hasNextPage
endCursor
}
items {
publicKey
name
active
promotionType
weekDay
beginDate
endDate
}
}
}
}Variables
{
"date": "2026-10-15T00:00:00",
"first": 30,
"after": null
}cURL
curl --location 'https://sandbox.expressoft.eu/connect/api/interopgql' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data '{"query": "query GetPromotions($date: DateTime, $first: Int, $after: String) { loyalty { promotion(date: $date, first: $first, after: $after) { totalCount pageInfo { hasNextPage endCursor } items { publicKey name active promotionType weekDay beginDate endDate } } } }", "variables": {"date": "2026-10-15T00:00:00", "first": 30, "after": null}}'Response
{
"data": {
"loyalty": {
"promotion": {
"totalCount": 1,
"pageInfo": {
"hasNextPage": false,
"endCursor": "MQ=="
},
"items": [
{
"publicKey": "00000000-0000-0000-0000-000000000501",
"name": "Happy hour",
"active": true,
"promotionType": "PRODUCT_DISCOUNT",
"weekDay": 31,
"beginDate": "2026-09-01",
"endDate": "2026-12-31"
}
]
}
}
}
}date returns the promotions that are active on that date. You can also filter by name and by publicKey (a list), and sort with orderBy.
Field | Meaning |
|---|---|
promotionType | The type of the promotion. See the values below. |
weekDay | The days of the week when the promotion applies. It is a bitwise value (flags). |
beginDate, endDate | The validity period. |
active | Whether the promotion is active. |
Promotion types
PRODUCT_DISCOUNT, PRODUCT_SALE_PRICE, CUSTOMER_DISCOUNT, BUY_X_GET_Y, BUY_X_AND_Y_GET_DISCOUNT, BUY_X_GET_Y_FREE_LOWEST_PRICE_ITEM, BUY_PRODUCT_COMBINATION_GET_SPECIAL_PRICES, CUSTOMER_DISCOUNT_ON_PAYMENT_METHOD, BUY_CERTAIN_VALUE_GET_PRODUCTS_WITH_DISCOUNTS_OR_SPECIAL_PRICES, COMPANY_DISCOUNT