Skip to main content
Every list endpoint in the Ecommerce API uses page-based pagination. Instead of cursors or offsets, you pass a 1-based page number and a limit to control how many items are returned per page. Every paginated response wraps the result array in a data field and includes a meta object that tells you exactly where you are in the full result set and whether more pages exist.

Query Parameters

Use these query parameters on any list endpoint to control pagination.
integer
default:"1"
The page number to retrieve. Pages are 1-based, so the first page is page=1. Requesting a page beyond totalPages returns an empty data array with an accurate meta object.
integer
default:"20"
The number of items to return per page. Accepts values between 1 and 100. Requests above 100 are rejected with a 400 validation error. When omitted, the API defaults to 20 items per page.

Response Meta

Every paginated response includes a meta object alongside the data array. Use the fields in meta to build navigation controls and know when to stop fetching.
integer
The total number of items matching the current query filters across all pages. For example, if you search for products with the query "shoe" and 47 results exist, total is 47 regardless of the current page.
integer
The total number of pages available given the current limit. Computed as Math.ceil(total / limit). A result set with total: 0 returns totalPages: 0.
boolean
true when there is at least one more page after the current page. Use this field in infinite-scroll or “Load more” UIs to decide whether to fetch the next page.
boolean
true when the current page is greater than 1 and previous pages exist. Use this to enable “Previous” buttons in paginated UIs.

Example: Fetching Page 2 of Products

The following request fetches the second page of products with 10 items per page. No authentication is required because the product listing endpoint is public.
Response:
To iterate through all pages programmatically, check meta.hasNext after each response rather than computing page < meta.totalPages yourself. If filters are applied (e.g. a search query), the total count reflects only matching results and can change between requests if new data is added concurrently. Relying on hasNext keeps your pagination loop correct under those conditions.