Pagination is supported for all the lists returned by the Mangopay API. Pagination consists in breaking down returned results in pages, hence improving the performance when a lot of information is returned.

Pagination query parameters

The following associations of query parameters and values are used to define the pagination:
ParameterValues
pageIndicates the index of the page.Start value: 1Default value: 1
per_pageIndicates the number of items returned in each page.Maximum value: 100Default value: 10
Pagination query example: users/154876/bank-details?page=2&per_page=10

Pagination header information

The following pagination-related information is always available in the response header:
  • x-number-of-pages indicates the total number of pages the entire list has been divided into.
  • x-number-of-items indicates the total number of items in the entire list.
  • link provides links to easily navigate in the pagination (to the first, previous, next, and last pages).
Returned link examples:
Link toExample
First page<https://api.mangopay.com/v2/ClientId/users/UserId/bank-details?page=1&per_page=10>; rel=“first”
Previous page<https://api.mangopay.com/v2/ClientId/users/UserId/bank-details?page=1&per_page=10>; rel=“prev”
Next page<https://api.mangopay.com/v2/ClientId/users/UserId/bank-details?page=1&per_page=10>; rel=“next”
Last page<https://api.mangopay.com/v2/ClientId/users/UserId/bank-details?page=1&per_page=10>; rel=“last”