Pagination
The standard Wix API pagination includes:
limit: amount of items per response (defaults will be defined per use case)
offset: number of items to skip
The following example:
Copy
1"query": {2 "paging": { 3 "limit": 100, 4 "offset": 20 5 }6}
Should return items 21-120 in the collection.
Wix Stores query endpoints are designed to handle a max of 10k data items. Therefore, if a user's store includes ~10k relevant items (e.g., products, inventory items), limit and offset may fail.
Instead, filter by numericId
and sort in ascending order:
Copy
1"query": { 2 "sort": [{"numericId": "asc"}],3}
Then copy the last numericId
sent in this call and call the endpoint again:
Copy
1"query":{ 2 "sort": [{"numericId": "asc"}],3 "filter": {4 "numericId": {5 "$gt": <last numeric id>6 }7 }8}
Continue until you receive an empty JSON as a response.
Important:
Escape the JSON strings in your query parameters.
Was this helpful?
Yes
No