FiskilFiskilFiskil DocsFiskil Docs
Log InSign Up
GuidesAPI ReferenceChangelog

Mobile menu

HomeFiskilFiskil
Log InSign Up
Introduction

Getting Started

AuthenticationErrorsPagination

CORE RESOURCES

Linking Accounts

BANKING API

ENERGY API

IDENTITY

Pagination

How to handle paginated responses from the Fiskil API.

AI Actions

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

The API includes URL links to fetch previous and next sets of items, so for simple pagination needs, clients can simply use the links provided in the response.

How It Works

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

ParameterTypeRequiredDescription
page[before]stringNoA pointer to a specific item in the dataset. The API returns results before this item.
page[after]stringNoA pointer to a specific item in the dataset. The API returns results after this item.
page[size]integerNoThe number of resources that will be included in the response's data field. It is capped at 1000.

Response Fields

The response will contain additional links fields:

FieldDescription
prevA URI to request the previous page
nextA 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 they exist).

Example:

  1. Initial request: GET /api/items
  2. Following request: GET /api/items?page[after]=abc123

Example Response

{
  "data": [
    {
      "id": "acc_123",
      "name": "Main Account"
    },
    {
      "id": "acc_456",
      "name": "Savings Account"
    }
  ],
  "links": {
    "prev": "https://api.fiskil.com/v1/items?page[before]=abc123",
    "next": "https://api.fiskil.com/v1/items?page[after]=xyz789"
  }
}

Best Practices

  1. Use links when available: The response links (prev, next) are pre-computed and guaranteed to work correctly.

  2. Handle empty pages: When you receive an empty data array or no next link, you've reached the end of the results.

  3. Respect rate limits: Avoid making rapid sequential pagination requests. Add reasonable delays between requests.

  4. Cache when appropriate: If your data doesn't change frequently, consider caching paginated results to reduce API calls.

Was this page helpful?

Linking AccountsPayee

On this page

How It WorksQuery ParametersResponse FieldsUsageExample ResponseBest Practices