Pagination
Understand paginated SellApp API responses.
Paginated SellApp API operations use limit for the number of items per page
and page for the page number. Standardized v2 operations default to 15 items
per page and reject limits above 100 with a 422 response.
Some operations document a different default or maximum. For example, variant serial inventory defaults to 50 items and accepts up to 250. The limits shown on the operation are authoritative.
Most operations accept limit and page as query parameters. Order and line
item search operations accept the same fields inside a pagination object in
the JSON request body.
Paginated responses keep Laravel's meta.per_page field. per_page is
response metadata; it is not the request parameter.
When an operation supports pagination=false, the response omits pagination
links and metadata and returns a single data array. This does not request an
unlimited result set: standardized operations still return at most 100 items.
Example using invoices
In this example, we request page 10 with a limit of 20 results per
page. The response returns twenty invoices and the last_page attribute
tells us we have not yet reached the end of the result set.
- Name
limitinteger- Description
The response limit of the API resource you are accessing.
- Name
pageinteger- Description
The page number you are attempting to access.
curl --request GET \
--url 'https://sell.app/api/v2/invoices?page=10&limit=20' \
--header 'Authorization: Bearer {ApiKeyHere}' \
--header 'Content-Type: application/json'{
"data": [
{
"id": "1"
},
{
"id": "2"
},
{
"id": "3"
}
],
"links": {
"first": "https://sell.app/api/v2/invoices?page=1&limit=20",
"last": "https://sell.app/api/v2/invoices?page=42&limit=20",
"prev": "https://sell.app/api/v2/invoices?page=9&limit=20",
"next": "https://sell.app/api/v2/invoices?page=11&limit=20"
},
"meta": {
"current_page": 10,
"from": 181,
"last_page": 42,
"links": [
{
"url": "https://sell.app/api/v2/invoices?page=9&limit=20",
"label": "« Previous",
"active": false
},
{
"url": "https://sell.app/api/v2/invoices?page=10&limit=20",
"label": "10",
"active": true
},
{
"url": "https://sell.app/api/v2/invoices?page=11&limit=20",
"label": "Next »",
"active": false
}
],
"path": "https://sell.app/api/v2/invoices",
"per_page": 20,
"to": 200,
"total": 831
}
}