Skip to content

Pagination

Walk through long lists in the BoxHero API with cursor-based pagination.

List endpoints return results one page at a time and use cursor-based pagination.

ParameterDescription
cursorWhere the page starts. Pass the cursor field from the previous response. Omit it on the first call.
limitPage size. The allowed range and the default are listed with each endpoint, for example List items.

Each page carries the results with the fields you need to fetch the next one:

{
"items": [...],
"count": 100,
"limit": 100,
"cursor": 1234567,
"has_more": true
}
FieldDescription
countNumber of results on this page
limitPage size used for this page
cursorPass this as the cursor query parameter to get the next page. null when there are no more pages.
has_moretrue if there are more results after this page
  1. Call the list endpoint without cursor.
  2. While has_more is true, call it again with cursor set to the cursor from the last response.
  3. Stop when has_more is false.
Terminal window
curl "https://rest.boxhero-app.com/v1/items?cursor=1234567" \
-H "Authorization: Bearer $BOXHERO_API_TOKEN"

Keep any filters you used on the first call the same on every following call.

Each resource defines its own order. Most list endpoints return results by id, ascending. List transactions returns the newest transactions first (by transaction time, with id as the tiebreaker).