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
$skipTokenparameter to navigate through pages. - This method is faster and more efficient compared to limit-based pagination.
- The pagination token is retrieved from the
@nextLinkfield included in the API response
http://api2.saleslayer.com/rest/Catalog/Products?$select=prod_ref,cat_ref,prod_description&$skipToken=1
Limit-Based Pagination
- Uses the
$topparameter to specify the maximum number of items to retrieve per page. - You can also use the
$skipparameter 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.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article