Pagination

This document describes the pagination implementation used across all xMoney API listing endpoints. All list operations that return multiple resources use the same pagination structure and parameters.

Pagination response

The API response for listing resources will include a pagination object with the following structure:

{
  "code": 200,
  "message": "Success",
  "pagination": {
    "currentPageNumber": 1,
    "totalItemCount": 10,
    "itemCountPerPage": 100,
    "currentItemCount": 10,
    "pageCount": 1
  },
  "data": []
}

Here's a breakdown of each field:

currentPageNumberinteger

The current page number being returned.

Default 1
totalItemCountinteger

The total number of items across all pages.

itemCountPerPageinteger

The number of items returned per page (as requested).

Default 100
currentItemCountinteger

The number of items in the current response. This might be less than itemCountPerPage on the last page.

pageCountinteger

The total number of pages available.

Pagination parameters

The following query parameters can be used to control pagination:

ParameterDescriptionDefault
pageSpecifies the page of results to retrieve.1
perPageControls the number of items returned per page.100
reverseSortingControls the sorting order of results. 0 (oldest to newest), 1 (newest to oldest).1