ChannelEngine: pagination in the APIs
About this article
This article describes the use of pagination in ChannelEngine's REST APIs.
Table of contents
If you work with hundreds or even thousands of products, across multiple channels, certain API responses may be unwieldy. Pagination can be very useful to filter and better manage those responses. ChannelEngine's APIs pagination starts at page 1, and lists 100 results per page. This value cannot be changed.
Pagination is available for the following API calls:
To use pagination, you must include the
page parameter in your call. In the example below, all orders with status Shipped and fromDate equal to 2021-01-01 are retrieved, as long as they belong to page 2 on the list:
GET "https://demo.channelengine.net/api/v2/orders?statuses=SHIPPED&fromDate=2021-01-01&page=2&apikey=*******" -H "accept: application/json"
Every response includes a total count, which helps you determine how many pages or what specific pages you need to request. In the example below, the total count is 18,920 items. Divided by the maximum number of items per page (i.e.: 100), it results in 190 pages to be fetched.
For more information on pagination in ChannelEngine's APIs, check out ChannelEngine's OpenAPI documentation.
Article is closed for comments.