younifyd
Menu

List the promotions

List the promotions

GET/v1/promotions

Use it in a workflow

  1. Add a step and choose the SCAYLE Storefront connector.
  2. Pick the List the promotions action (under promotions).
  3. Fill in the fields below, then reference the result from later steps as {{listThePromotions.response.data}}.

Request

Query parameters

shopIdinteger

The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique `shopId`. **Priority:** `shopId` (or the `X-Shop-Id` header) takes precedence over all other shop identification parameters. When `shopId` is present, `shopKey`, `countryCode`, and `locale` are ignored entirely. **Alternative:** If neither `shopId` nor `X-Shop-Id` is provided, you must supply all three of `shopKey`, `countryCode`, and `locale` together to identify the shop.

shopKeystring

The unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `countryCode` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

countryCodestring

The ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `shopKey` and `locale`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

localestring

The locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `shopKey` and `countryCode`** as a query-parameter alternative to `shopId`. All three parameters are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `shopId` or the `X-Shop-Id` header is present.

pageinteger

The number of the page to retrieve. The combined value of `page * perPage` must not exceed `500000`, which is the maximum number of items that can be returned. _Note: This parameter is mutually exclusive with `offset` and `limit`._

Default 1

perPageinteger

The number of items to retrieve per page. The combined value of `page * perPage` must not exceed `500000`, which is the maximum number of items that can be returned. _Note: This parameter is mutually exclusive with `offset` and `limit`._

Default 100

idsarray<string>

Restrict results to promotions that match the specified comma-separated list of IDs. _Note: This filter is mutually exclusive with all others._

activeAtstring

Restrict results to promotions that are active at the specified time. The time is truncated to the full minute, so `2026-10-28T12:00:45Z` returns the promotions active at `2026-10-28T12:00:00Z`.

witharray<string>

Include additional data in the response. The following table describes all the possible parameters that can be used: Parameter | Description --- | --- entities.customData:key() | Include custom data of the promotions with empty object. entities.customData:key(keyA\|...) | Include custom data of the promotions with only the specified keys.

Headers

X-Shop-Idinteger

The numeric ID of the shop to resolve the request against. Every shop in a multi-shop setup has a unique shop ID. **Priority:** `X-Shop-Id` (or the `shopId` query parameter) takes precedence over all other shop identification parameters. When this header is present, `X-Shop-Key`, `X-Country-Code`, and `X-Locale` are ignored entirely. **Alternative:** If neither `X-Shop-Id` nor `shopId` is provided, you must supply all three of `X-Shop-Key`, `X-Country-Code`, and `X-Locale` together to identify the shop.

X-Shop-Keystring

The unique string key identifying the shop (e.g. `sa`, `de`). **Must be provided together with `X-Country-Code` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Country-Codestring

The ISO 3166-1 alpha-2 country code of the shop (e.g. `DE`, `AT`). Automatically normalised to uppercase. **Must be provided together with `X-Shop-Key` and `X-Locale`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Localestring

The locale of the shop (e.g. `en_GB`, `de_DE`). Used to validate that the resolved shop's locale matches the requested locale. **Must be provided together with `X-Shop-Key` and `X-Country-Code`** as a header-based alternative to `X-Shop-Id`. All three headers are mandatory when using this identification method — omitting any one of them results in a validation error. Ignored when `X-Shop-Id` or the `shopId` query parameter is present.

X-Customer-Tokenstring

A JWT token identifying the customer. When provided, promotions are filtered by the customer's segment memberships. Segment-gated promotions that do not match the customer's segments are excluded from the response. When omitted, the request is treated as a guest request and all promotions with segment configuration are suppressed.

Response

Returns 200 with an object. Read it in later steps with {{listThePromotions.response.data.<field>}}.

paginationobject

Information to aid in pagination.

currentintegerrequired

The number of items on the current page.

totalintegerrequired

The total number of items available regardless of pagination.

firstintegerrequired

The number of the first available page.

lastintegerrequired

The number of the last available page.

nextintegerrequired

The number of the next available page.

previntegerrequired

The number of the previous available page.

pageintegerrequired

The number of the current page.

perPageintegerrequired

The maximum number of items to return per page.

entitiesarray<object>

List of promotions.

idstringrequired

A unique identifier for the promotion.

namestringrequired

The name of the promotion.

displayNamestring | nullrequired

The name of the promotion shown to the customer.

isActivebooleanrequired

Flag indicating whether the promotion is active or not.

prioritynumberrequired

The priority of the promotion compared to other promotions. This can be used to decide which promotion to apply if there is a conflict between two.

scheduleobjectrequired2 fields

Promotion's initial and end date.

effectobjectrequired

The discount to be applied when all conditions are satisfied. The `free_shipping` effect is only returned by `GET /v1/promotions`; it is never applied to nor surfaced on a basket, so basket promotions never carry it.

conditionsarray<object>required3 fields

The conditions that must be met for the promotion to be applied.

tiersarray<object>required4 fields

The tiers that provide a discount once a specified spending threshold is met (MOV).

customDataobjectrequired8 fields

Additional data relevant for the promotion.

json
{
  "pagination": {
    "current": 0,
    "total": 0,
    "first": 0,
    "last": 0,
    "next": 0,
    "prev": 0,
    "page": 0,
    "perPage": 0
  },
  "entities": [
    {
      "id": "string",
      "name": "string",
      "displayName": "string",
      "isActive": false,
      "priority": 0,
      "schedule": {
        "from": "2023-01-26T09:30:15Z",
        "to": "2023-01-26T09:30:15Z"
      },
      "effect": {},
      "conditions": [
        {
          "key": "string",
          "level": "global",
          "condition": "string"
        }
      ],
      "tiers": [
        {
          "id": 0,
          "name": "string",
          "mov": 0,
          "effect": {
            "additionalData": {}
          }
        }
      ],
      "customData": {
        "headline": "string",
        "subline": "string",
        "link": "string",
        "hideCountDown": false,
        "highlightProductCards": false,
        "condition": "string",
        "color": {
          "background": "string",
          "text": "string"
        },
        "product": {
          "badgeLabel": "string",
          "attributeId": 0
        }
      }
    }
  ]
}

Need more? See the SCAYLE Storefront guide for connection setup and behaviour shared by every action.