When requesting an endpoint that returns a collection of multiple resources, it's likely that you'll run into a paginated response.

Paginated responses can be recognised by the _pagination metadata that's included with the response body.

The pagination metadata has the following JSON schema:

{
  '_pagination': {
  	'total': 10,
    'count': 100,
    'per_page': 10,
    'current_page': 1,
    'total_pages': 10,
  }
}

More information on this schema:

  • total: The total number of results found.
  • count: The number of results shown on the current page.
  • per_page: The number of results that are shown on a page. Defaults to 10.
  • current_page: The current page of results being shown in this response.
  • total_pages: The total number of pages available.

Manipulating pages

Pagination can be manipulated via two query string parameters common to all paginated endpoints:

  • page (integer): The page of results to fetch. Defaults to 1 if omitted. Trying to request a page beyond the maximum will result in a 404 error.
  • per_page (integer): The number of items to show on a single page. Defaults to 10 if omitted, maximum is 50.