Pagination
v1 lists use cursor pagination. There are no page numbers and no total: each response gives you a cursor to read the next page.
Parameters
Response shape
data: the items of the page.has_more:trueif there are more items after this page.next_cursor: the cursor to pass to the next request, ornullwhen there are no more.
How to read a list
- Make the first request without
cursor. - If
has_moreistrue, repeat the request withcursorset tonext_cursor, keeping the same filters and the sameorder. - Stop when
has_moreisfalse.
The cursor is opaque
Do not read it and do not build it: its format can change. Send it back exactly as you received it. A cursor belongs to the list and the order that produced it:
- used on another list, or after changing
order, it is400 invalid_cursor; - tampered with or malformed, it is
400 invalid_cursor.
In these cases start again from the first page.
Cursor lists
GET /v1/lines answers with the same shape, but has_more is always false.
Good practices
- Use
limit=100to read many items with fewer requests. - Call lists can serve a cached response for a few seconds: a call that just ended can appear with a short delay.
- To sync one of your systems, do not rely on a total: read until
has_moreisfalseand deduplicate onid.