Skip to navigation

Pagination

One cursor style for every list.
View as Markdown

Every list endpoint pages the same way, as Stripe does.

ParameterMeaning
limitPage size, 1 to 100. The default is 10.
starting_afterThe id of the last object on the page you hold. Returns the next page.
ending_beforeThe id of the first object on the page you hold. Returns the previous page. Do not send both cursors.

A list answers with object, data and has_more.

{
"object": "list",
"data": [
{
"id": "prn_01M44X7TQ0A9R2H5J8K1M4N7P0",
"object": "printer",
"name": "Reception left",
"vendor": "star",
"status": "online"
}
],
"has_more": true
}

The objects in data are shown cut down here. A real list holds the full objects.

The order is fixed: customers by code, locations and printers by customer, location and creation, and jobs newest first.

Walk a list

1

Ask for the first page

curl "https://api.tillcast.com/v1/printers?limit=50" \
-H "Authorization: Bearer $TILLCAST_API_KEY" \
-H "Tillcast-Version: 2026-10-01"
2

Ask for the next page

While has_more is true, pass the id of the last object as starting_after.

curl "https://api.tillcast.com/v1/printers?limit=50&starting_after=prn_01M44X7TQ0A9R2H5J8K1M4N7P0" \
-H "Authorization: Bearer $TILLCAST_API_KEY" \
-H "Tillcast-Version: 2026-10-01"

An id that is not an object of that list, one that belongs to another organization, or a made-up one gives 400 with invalid_cursor.

Searches can answer a short page

A search by client_reference_id reads only so many rows in one request. It may answer fewer than limit objects, even none, with has_more set to true and a next_cursor. This is for a value that very many objects carry, most of all when the search is narrowed with customer, location or printer.

{
"object": "list",
"data": [],
"has_more": true,
"next_cursor": "cus_c3x9k2m3"
}

An empty page with has_more: true is not the end, and it is not “nothing found”. Send the next_cursor as starting_after (or as ending_before, if you page backwards) and ask again, until has_more is false. Only then does every object that carries the value come exactly once.

curl "https://api.tillcast.com/v1/customers?client_reference_id=acct-1042&starting_after=cus_c3x9k2m3" \
-H "Authorization: Bearer $TILLCAST_API_KEY" \
-H "Tillcast-Version: 2026-10-01"
  • next_cursor is an id of the kind of the list. It is not always the id of an object in data, and it is accepted as a cursor like any other id of the kind.
  • A page that fills has no next_cursor: continue from its last object, as above.
  • has_more can be true when nothing follows. The request that ends the walk then answers an empty page.
  • A list that is not a search has no next_cursor.
  • Version 0.2.1 of the SDKs does not declare next_cursor in its types, but both return it on the page they give you: (page as { next_cursor?: string }).next_cursor in TypeScript, and page.next_cursor in Python (it is also in page.model_extra). Read it there until the types have it.

Prefer a list by location, GET /v1/locations/{location}/printers, or by customer, GET /v1/customers/{customer}/printers, to a list of all the printers of the organization. The organization-wide list, GET /v1/printers, is slower and has no status filter. The lists by location and by customer take status= to filter by the printer’s status.