Skip to main content

Pagination

All endpoints, which return a listing, allow pagination by supporting two query parameters on the requests.

Parameter nameDescriptionDefault value
pageIdentifies the requested page. First page has number 11
sizeDefines the number of entries to show on each page. Maximum value is 10010
FormatGET <url>?page=$pageNumber&size=$pageSize
ExampleGET /stores?page=2&size=25
ExplanationWould return the 26th until the 50th store entries.

Pagination information in response​

On all responses to any requests for a listing there will be two headers, which provide information about the pagination.

HeaderDescription

X-Total-Count

Total number of entries available

Link

Multiple links providing information about how to navigate through the entries. Links are separated by a comma ',' Format is compliant with RFC 8288 Web Linking

If the page size is larger than the total number of entries, then this header will be empty.

Example​

Given there is a merchant with 67 stores, when the merchant sends the following request: /stores?page=3&size=10 then the response will contain the following headers:

X-Total-Count: 67
Link: <baseUrl/stores?size=10&page=2>; rel="prev",<baseUrl/stores?size=1&page=4>; rel="next",<baseUrl/stores?size=1&page=1>; rel="first",<baseUrl/stores?size=1&page=7>; rel="last"