# Pagination with the Common Paper API

## Pagination

List endpoints such as agreements and templates support pagination using two optional query parameters under the `page` namespace: `number` and `size`.

### Query Parameters

| Parameter        | Type    | Default | Description                                             |
|------------------|---------|---------|---------------------------------------------------------|
| `page[number]`   | Integer | `1`     | The page number to retrieve. Must be greater than 0.    |
| `page[size]`     | Integer | `15`    | The number of records to return per page.               |

### Example Request

GET /agreements?page[number]=1&page[size]=2

This example returns the first page of results with a maximum of 2 records.

### Shorthand

A bare `page` value is treated as the page number, using the default page size. These two requests are the same:

GET /agreements?page=2

GET /agreements?page[number]=2

Any other value for `page`, such as an array (`page[]=2`), returns a `400` error describing the expected format.
