All paginated responses will append the following pagination section to the response like so:{
"status": 200,
"success": true,
"data": [
...
],
"pagination": {
"count": 2,
"total": 2,
"perPage": 15,
"currentPage": 1,
"totalPages": 1,
"links": {}
}
}
Certain routes, such as index listing may return an array of results.
By default, the API will return the results in batch. The count parameter may be used to increase the number of results per request.To get the next batch of results, call the same route again with a page request parameter corresponding to the currentPage and totalPages property received in the last call on the pagination part of the response. For instance, if you want to move to the next pagse in the List Orders endpoint, simply execute the following cURL request:curl --request GET \
--url 'https://api.salla.dev/admin/v2/orders?page=2' \
--header 'Accept: application/json' \
--header 'Authorization: <YOUR_ACCESS_TOKEN>'
Additionally, you may also include the per_page query parameter in any list endpoint to decrease or increase the number of records returned per page.curl --request GET \
--url 'https://api.salla.dev/admin/v2/orders?page=2?per_page=40' \
--header 'Accept: application/json' \
--header 'Authorization: <YOUR_ACCESS_TOKEN>'
Note that the maximum value for the per_page query parameter is 60