Pagination

Our APIs use a cursor based pagination model to handle large result sets efficiently. This article explains how to navigate through paginated results and how to use our data synchronization features.

Pagination Structure

All paginated responses have the following JSON structure:

1{
2 "morePages": true,
3 "nextPageKey": "c29tZSBiYXNlNjQgc3RyaW5n",
4 "nextPageURL": "https://api.npretail.app/tenant/env/company/resource?pageKey=c29tZSBiYXNlNjQgc3RyaW5n",
5 "data": [
6 {
7 /* resource item 1 */
8 },
9 {
10 /* resource item 2 */
11 },
12 {
13 /* resource item .. */
14 },
15 {
16 /* resource item n */
17 }
18 ]
19}

Pagination Response Properties

PropertyTypeDescription
morePagesbooleanIndicates whether more pages of results exist beyond the current page.
nextPageKeystringA token that can be used to retrieve the next page of results.
nextPageURLstringA fully formed URL that is intended as a shortcut to retrieve next page.
dataarrayThe actual array of resource items.

Pagination Query Parameters

When making requests to paginated endpoints, you can use the following query parameters:

ParameterTypeDescription
pageSizeintegerOptional. Specifies the number of items to return per page.
pageKeystringOptional. A token provided in the previous response to retrieve the next page.