The API supports two main pagination strategies to efficiently handle large datasets. Below is a description of each approach:
Token-Based Pagination (Recommended)
- Uses the
$skipToken
parameter to navigate through pages. - This method is faster and more efficient compared to limit-based pagination.
- The pagination token is retrieved from the
@nextLink
field included in the API responsehttp://api2.saleslayer.com/rest/Catalog/Products?$select=[prod_ref,cat_ref,prod_description]&$skipToken=[1]
Limit-Based Pagination
- Uses the
$top
parameter to specify the maximum number of items to retrieve per page. - You can also use the
$skip
parameter to manually skip a specific number of items.http://api2.saleslayer.com/rest/Catalog/Products?$select=[prod_ref,cat_ref,prod_description]&$skip=[1]&$top=[1]
Both strategies allow you to customize pagination behavior based on your implementation needs. For larger or frequently accessed datasets, Token-Based Pagination is recommended for optimal performance.