> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Pagination

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:

<table>
  <thead>
    <tr>
      <th class="header">Parameter</th>
      <th class="header">Values</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="table-content">
        `page`
      </td>

      <td class="table-content">
        Indicates the index of the page.

        <br />

        <br />

        Start value: 1

        <br />

        <br />

        Default value: 1
      </td>
    </tr>

    <tr>
      <td class="table-content">
        `per_page`
      </td>

      <td class="table-content">
        Indicates the number of items returned in each page.

        <br />

        <br />

        Maximum value: 100

        <br />

        <br />

        Default value: 10
      </td>
    </tr>
  </tbody>
</table>

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:**

<table>
  <thead>
    <tr>
      <th class="header">Link to</th>
      <th class="header">Example</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td class="table-content">First page</td>
      <td class="table-content">\<https<span>://</span>api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="first"</td>
    </tr>

    <tr>
      <td class="table-content">Previous page</td>
      <td class="table-content">\<https<span>://</span>api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="prev"</td>
    </tr>

    <tr>
      <td class="table-content">Next page</td>
      <td class="table-content">\<https<span>://</span>api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="next"</td>
    </tr>

    <tr>
      <td class="table-content">Last page</td>
      <td class="table-content">\<https<span>://</span>api.mangopay.com/v2/`ClientId`/users/`UserId`/bank-details?page=1\&per\_page=10>; rel="last"</td>
    </tr>
  </tbody>
</table>
