Pagination

All top-level API endpoints that fetches resources in bulk (aka list APIs) support pagination, such as list banking accounts, energy accounts list, list transactions, list all bills and more.

    Fiskil APIs use two methodologies for pagination:

  • Banking APIs use limit offset methodology.
  • Energy APIs use cursor methodology.

Both methodologies include the URL links to fetch previous and next set of items, so for simple pagination needs the clients can simply use the links provided in the response.

Cursor methodology

Cursor pagination, also known as keyset pagination, uses a specific pointer (the cursor) from the previous result set to fetch the next set of items. This method avoids the performance issues associated with skipping a large number of rows.

Query parameters

page[before]optional

A pointer to a specific item in the dataset. The API returns results before this item.

page[after]optional

A pointer to a specific item in the dataset. The API returns results after this item.

page[size]optional

The number of resources that will be included in the response's data field.

Response fields

The response will contain the additional links fields as followed.

prev

A URI to request the previous page.

next

A URI to request the next page.

Usage

The initial request does not require a cursor. The response will include links to fetch the previous or next set of items (if exists).

    Example

  • Initial request - GET  /api/items
  • Following request - GET  /api/items?page[after]=abc123

Was this page helpful?