For the complete documentation index, see llms.txt. This page is also available as Markdown.

Scroll Mechanism for Pages

Scroll Mechanism for Pages

🧩 How to Use the Scroll Mechanism in Open Loyalty API

To efficiently retrieve large datasets via the API, we recommend using the scrolling mechanism instead of traditional pagination with _page. This method is optimized for performance when fetching a high volume of records and has no page-depth limit.

Scroll is a separate mechanism from _page pagination — they cannot be combined. For shallow queries (_page ≤ 500), existing pagination continues to work as before.


🛠️ How It Works

The scrolling process involves an initial request followed by sequential calls using a token to retrieve subsequent pages of data.

1. Initial Request

Start the scrolling process by sending a request with the _scroll parameter, e.g.:

The parameter can be added alongside other queries, e.g.:

2. Response

The API will return the first set of results along with a scroll.next token.

3. Next Page

Use the scroll.next token from the previous response to retrieve the next page of results.

4. Repeat

Continue making requests using the new scroll.next token returned in each response to cycle through all the data.

5. End of Results

Once you have retrieved all the available data, the API will return an empty items array and an empty scroll object, indicating the end of the dataset.


✅ Supported Endpoints

The _scroll mechanism is supported on the following endpoints:

  • /api/{storeCode}/customEvent

  • /api/{storeCode}/member

  • /api/{storeCode}/points

  • /api/{storeCode}/transaction

  • /api/{storeCode}/groupOfValues

  • /api/{storeCode}/redemption

For very large datasets and offline processing, the platform's Data Export functionality is also available as an alternative.

Last updated

Was this helpful?