Link Search Menu Expand Document

Pagination

Pagination allows a listing endpoint to return a subset of results. The goal is to reduce memory usage and speed up page rendering.

To retrieve the next page, a pageKey can be supplied. Typically this will be the nextPageKey returned from your previous query.

Some of our endpoints have been designed to be forwards compatible with pagination. When we do bring support to GET endpoints for listing, these conventions will be followed.

Models

Mandatory Fields

Field Type Description
items Array A list from the current page.

Optional Fields

Field Type Description
nextPageKey String Can be used to fetch the next page, not present on the last page.

Example

A page with more content

{
  "nextPageKey": "5ee0c486308f590260d9a07f|ded3f328-1123-11ec-bf1a-5ba46eb12a7d",
  "items": [
    {
      "value": "16",
      "assetType": "centrapay.nzd.main"
    },
    {
      "value": "32",
      "assetType": "centrapay.nzd.main"
    },
    {
      "value": "64",
      "assetType": "centrapay.nzd.main"
    }
  ]
}

The last page

{
  "items": [
    {
      "value": "128",
      "assetType": "centrapay.nzd.main"
    }
  ]
}