* Our paging functionality should only be used if you have limitations with large responses.

Some of the API functions may return large amount of data in their responses. To make the loading easier, the API solution supports paging.

Getting started with paging

To receive a paginated response, two query parameters must be used:

  • pageStartIndex: Index to start the response.
  • pageSize: Size of a page.

If you want to get the first hundred items of the available data, for instance, page startIndex must be set to 1 and pageSize must be set to 100. The result of the Url must have this format: “/Catalog/Products/?pageStartIndex=1&pageSize=100”

Every time pagination is used, the header “X-Pagination” will be sent back within the response with the following information:


The following fields were added to the pagination header to provide some figures about the returned data:

  • TotalCount: The number of items for the entire request.
  • TotalPages: The number of pages for the entire request.

Getting all the content while requesting pagination requires a small logic to be developed. To help simplify the process of getting pages, the following field were added to the header “X-Pagination”

  • PrevPageLink: The link to receive the content of the previous page. If PrevPageLink is empty, the page doesn’t exist.
  • NextPageLink: The link to receive the content of the next page. If NextPageLink is empty, the page doesn’t exist.



 

** We also offer pagination in functions. Ex : ?pageIndex=1000&pageSize=1000.

Scroll to Top