Pagination

The Norman API supports pagination to ensure efficient data retrieval for large datasets. When retrieving lists of resources, such as transactions or bank accounts, the response will be paginated if the dataset exceeds the specified limit.

Pagination Parameters

  • page (optional):

    • Type: integer
    • Description: The page number of the result set to retrieve. Defaults to the first page if not specified.
  • pageSize (optional):

    • Type: integer
    • Description: The number of results to return per page. By default, the API uses a standard page size, but this can be customized with this parameter.

Example Request

GET /api/v1/accounting/categories/?page=2&pageSize=50

This request will retrieve the second page of bank accounts, with a maximum of 50 results per page.

Example Response Structure

{
  "count": 1500,
  "next": "https://api.norman.finance/api/v1/accounting/categories/?page=3&pageSize=50",
  "previous": "https://api.norman.com/api/v1/accounting/categories/?page=1&pageSize=50",
  "results": [
    {
      "publicId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "Inter-account transfer",
      "parent": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "cashflowType": "EXPENSE",
      "vatApplied": "YES",
      "metadata": "{}",
      "description": "When you move funds between your own business accounts",
      "examples": ""
    },
    // more results...
  ]
}
  • count: The total number of available items.
  • next: A URL to fetch the next page of results. If this field is null, there are no additional pages.
  • previous: A URL to fetch the previous page of results. If this field is null, it indicates you are on the first page.
  • results: An array containing the current page’s results.

Tips for Handling Pagination:

  • Always check the next and previous fields to navigate through paginated responses.
  • If paginating large datasets, consider fetching only the necessary data to improve performance.
  • Use pageSize wisely to balance performance and the amount of data retrieved in a single request.