Pagination
Cursor-based pagination for list endpoints.
All list endpoints return a consistent envelope and page with cursors. Cursors are item ids you already received, not opaque tokens, so paging stays stable even as items are added or removed between requests. Requests are authenticated with your API key (see Authentication).
List response
List endpoints wrap results in a data array alongside paging metadata:
{
"data": [
{ "id": "prod_aB3Df7XYz1" }
],
"has_more": true,
"total_count": 248
}data- the items for this pagehas_more-truewhen more items exist beyond this pagetotal_count- total items matching the query, ignoring pagination
Parameters
| Parameter | Type | Description |
|---|---|---|
limit | integer | Page size, between 1 and 100. Default 10. |
starting_after | string | Cursor. Return items after this id (the next page). |
ending_before | string | Cursor. Return items before this id (the previous page). |
starting_after and ending_before are mutually exclusive. Passing both returns a validation error. Supplying neither returns the first page.
Paging forward
Request the first page, then pass the id of the last item in data as starting_after:
# first page
curl "https://admin.getaeolian.com/api/v1/products?limit=20" \
-H "Authorization: Bearer pk_your_api_key"
# next page - last id from the previous data[]
curl "https://admin.getaeolian.com/api/v1/products?limit=20&starting_after=prod_aB3Df7XYz1" \
-H "Authorization: Bearer pk_your_api_key"Keep going until has_more is false.
Paging backward
To step back a page, pass the id of the first item in the current data as ending_before. Results are always returned in the natural sort order regardless of direction.
curl "https://admin.getaeolian.com/api/v1/products?limit=20&ending_before=prod_aB3Df7XYz1" \
-H "Authorization: Bearer pk_your_api_key"Ordering
Pagination follows the endpoint's sort and order parameters. The cursor is compound on the sort field and the item id, so two items with the same sort value keep a stable, deterministic order across pages.