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

# Pagination

# How to make a paginated request

You can make paginated requests using query parameters. The parameters enable pagination and determine how many results should be in each page.

The following endpoints support pagination:

* [Detailed Returns List](/api-reference/latest/return-data/detailed-returns-list)
* [List Blocklist Items](/api-reference/latest/blocklist/list-blocklist-items)
* [List Allowlist Items](/api-reference/latest/allowlist/list-allowlist-items)

## Parameters

`paginate` - boolean. Set as `true` to enable pagination. Default is `false`.

`pageSize` - integer. The number of results on each page. Default is `100` and max is `750`.

## Iterating through pages

Responses will contain links to the next and previous page of results (if applicable). You can use those links to iterate through the pages.

The following properties will be included in the response body of a paginated request:

`nextPageUrl` - string. The URL that can be used to get the next page of results (if there is a next page).

`previousPageUrl` - string. The URL that can be used to get the previous page of results (if there is a previous page).

## Example

This example will use pagination for the Detailed Returns List.

*Request*

```cURL theme={null}
curl --request GET \
  --url 'https://api.loopreturns.com/api/{version}/warehouse/return/list?paginate=true&pageSize=50&from=2023-01-01%2000%3A00%3A00&to=2023-12-12%2000%3A00%3A00&filter=created_at&state=open' \
  --header 'X-Authorization: <api-key>'
```

*Response*

```json theme={null}
{
  "returns": [...],
  "nextPageUrl": "https://api.loopreturns.com/api/v1/warehouse/return/list?to=2022-07-28%2000%3A00%3A00&filter=created_at&pageSize=5&cursor=eyJjcmVhdGVkX2F0IjoiMjAyMi0wNi0yNyAxNjoyNTowMSIsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
  "previousPageUrl": null
}
```

If there are no more results, `nextPageUrl` will be null. On the first page, `previousPageUrl` will be null.
