Light Mode
Pagination
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>'
Last modified: 4 months ago