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

# Pagination and filters

> Page through Elastly API lists with the limit and after parameters, follow nextCursor until hasMore is false, and narrow lists with filters.

List endpoints return one page at a time and use cursors, so a page stays correct while records change. This page covers the page parameters, the page shape, the filters each list accepts and the order of each list.

## Page parameters

| Parameter | Meaning |
| - | - |
| `limit` | How many items to return. From 1 to 100, default 100. The record results of a bulk import accept up to 1,000 |
| `after` | The `nextCursor` value from the previous page. Leave it out for the first page |

## Page shape

Every list returns the same three fields.

| Field | Meaning |
| - | - |
| `data` | The items on this page |
| `hasMore` | `true` when another page follows |
| `nextCursor` | The value to send as `after` for the next page |

Treat a cursor as an opaque value and send it back unchanged. On the catalog, customer and event lists, a cursor that was altered or belongs to a different list is refused with `400` and `invalid_cursor`. On the record results of a bulk import, an invalid `after` value is refused with `400` and `invalid_request`.

```bash theme={null}
curl "https://api.elastly.ai/v1/catalog/items?limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "data": [
    { "id": "8b1d6f0e-2c4a-4e7b-9a35-1f0c2d3e4a5b", "sku": "AX-2201", "name": "Ball bearing 25 mm", "active": true }
  ],
  "hasMore": true,
  "nextCursor": "QVgtMjIwMQ"
}
```

The example shows only some of the item's fields. The [API reference](/docs/api-reference/introduction.md) lists every field.

## Filters

| List | Filter | Effect |
| - | - | - |
| Catalog items | `sku` | Returns only these SKUs. Up to 100 values |
| Customers | `accountNumber` | Returns only these account numbers. Up to 100 values |
| Events | `type` | Returns only these event types |
| Bulk import records | `state` | Returns only records in this state |

Repeat a filter parameter to pass several values.

```bash theme={null}
curl "https://api.elastly.ai/v1/customers?accountNumber=C-1001&accountNumber=C-1002" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Order

Each list has a fixed order. There is no sort parameter.

| List | Order |
| - | - |
| Catalog items | By SKU |
| Customers | By customer `id` |
| Events | Oldest first |
| Bulk import records | By line in the import |

## Following the event feed

The events list returns a `nextCursor` even when `hasMore` is `false`, as long as the page holds an event or you sent an `after` value. Store it and send it as `after` on your next poll to receive only events that occurred since. See [Webhooks and events](/docs/developers/webhooks.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.