---
title: "Pagination"
description: "All endpoints, which return a listing, allow pagination by supporting"
canonical: "https://docs.cm.com/payments/pos-cloud-api/guides/pagination"
---

# Pagination

> All endpoints, which return a listing, allow pagination by supporting

Source: https://docs.cm.com/payments/pos-cloud-api/guides/pagination

All endpoints, which return a listing, allow pagination by supporting
two query parameters on the requests.

| Parameter name | Description | Default value |
| - | - | - |
| `page` | Identifies the requested page. _First page has number **1**_ | 1 |
| `size` | Defines the number of entries to show on each page. _Maximum value is **100**_ | 10 |

| | |
| - | - |
| Format | `GET <url>?page=$pageNumber&size=$pageSize` |
| Example | `GET /stores?page=2&size=25` |
| Explanation | Would return the 26th until the 50th store entries. |

## Pagination information in response

On all responses to any requests for a listing there will be two
headers, which provide information about the pagination.

<table>
  <colgroup>
    <col />

    <col />
  </colgroup>

  <thead>
    <tr className="header">
      <th>Header</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr className="odd">
      <td><p><code>X-Total-Count</code></p></td>
      <td><p>Total number of entries
      available</p></td>
    </tr>

    <tr className="even">
      <td><p><code>Link</code></p></td>
      <td><p>Multiple links providing information
      about how to navigate through the entries. Links are separated by a
      comma ',' Format is compliant with <a href="https://datatracker.ietf.org/doc/html/rfc8288">RFC 8288 Web
      Linking</a></p>
      <p><em>If the page size is larger than the total number of entries, then
      this header will be empty.</em></p></td>
    </tr>
  </tbody>
</table>

## Example

Given there is a merchant with 67 stores, when the merchant sends the
following request: `/stores?page=3&size=10` then the response will
contain the following headers:

```
X-Total-Count: 67
Link: <baseUrl/stores?size=10&page=2>; rel="prev",<baseUrl/stores?size=1&page=4>; rel="next",<baseUrl/stores?size=1&page=1>; rel="first",<baseUrl/stores?size=1&page=7>; rel="last"
```
