Skip Navigation Links

API Pagination

Pagination is the standard way to allow consumers to request large collections via our API in parts rather than as a whole, so to save bandwidth.

What is a cursor?

Flip API endpoints returning lists of objects are primarily using cursor-based pagination. A cursor is a pointer to a position in the list of items. The cursor must be treated as an opaque value and must not be inspected or constructed by users. The cursors should only be used for chaining the calls to get all the required responses but should not be persisted over a long time and be reused. While they do not have a strict expiration their lifetime is not expected to be longer than a few hours.

Working with cursors

In case of a request exceeding the limit set via the query parameter or the default limit the response will contain a field pagination. The pagination object contains a next_cursor field, which can be used to get the following page by setting it as query parameter cursor.

Example response:


If the second page again did not fit all the requested data, response will contain another cursor. The has_more field of the pagination object indicates if there are any other items to retrieve with further requests. This allows receiving partial data until the end of the data set.

The cursor contains information about expected sorting and overwrites sorting query parameters.