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

# Paging, limits and errors

> Cursor pagination, syncing changes, rate limits and error codes

## Paging through a list

Lists return up to 50 records by default. Use `limit` to ask for up to 200.

```json theme={null}
{
  "data": [{ "id": "…", "number": "WO-0142", "updated_at": "2026-11-30T08:15:00.000Z" }],
  "next_cursor": "eyJ1IjoxNzY0NDkwOTAwMDAwLCJpIjoiLi4uIn0"
}
```

When `next_cursor` isn't `null`, pass it back unchanged as `cursor` to get the next page:

```bash theme={null}
curl "https://on.relyant.app/api/v1/work-orders?limit=200&cursor=eyJ1Ijo…" \
  -H "Authorization: Bearer rly_live_…"
```

Lists are always ordered by `updated_at`, then `id`, oldest change first.

## Syncing only what changed

Add `updated_since` (an ISO-8601 time) to get only records changed at or after that moment. A typical nightly sync:

1. Page through the list with `updated_since` set to the time your last sync started.
2. Save the time this sync started, for next time.

> [!NOTE]
>
> A record that's deleted in Relyant drops out of the list, so a sync with `updated_since` doesn't see it go. Moving a student to another class doesn't change the student's `updated_at`. Run a full sync from time to time to catch these.

## Filters

Many lists take filters. Repeat a filter or separate its values with commas: `?status=open,in_progress`. See [Endpoints](https://docs.relyant.app/api-reference/endpoints.md) for each list's filters.

## Formats

* Field names are `snake_case`.
* Times are ISO-8601 in UTC, such as `2026-11-30T08:15:00.000Z`.
* Dates are `YYYY-MM-DD`, in your school's calendar.
* Related records are `{ "id": "…", "name": "…" }`, or `null`.

New fields can be added to a response at any time, so ignore fields you don't recognise. Fields are never renamed or removed within `/api/v1`.

## Rate limits

Each key can make **120 requests a minute**, and each school **1,000 a minute** across all its keys. Every response carries:

| Header | Meaning |
| - | - |
| `RateLimit-Limit` | Requests allowed per minute for this key |
| `RateLimit-Remaining` | Requests left this minute |
| `RateLimit-Reset` | Seconds until the minute resets |

Over the limit, you get `429 rate_limited` with a `Retry-After` header. Wait that many seconds and try again.

## Errors

Errors return a JSON body with a plain-English `error` and a stable `code`:

```json theme={null}
{ "error": "This API key doesn't have the asset:read scope.", "code": "insufficient_scope" }
```

| Status | Code | Meaning |
| - | - | - |
| 400 | `invalid_request` | A filter, cursor, limit or date isn't valid |
| 401 | `invalid_api_key` | No key, or not a valid one |
| 401 | `api_key_revoked`, `api_key_expired` | The key no longer works |
| 403 | `insufficient_scope` | The key can't read this kind of data |
| 403 | `api_disabled` | The school turned off API access |
| 403 | `key_owner_lacks_permission` | The key's creator lost the access it relies on |
| 403 | `feature_not_entitled`, `app_not_entitled` | Not included in the school's plan |
| 404 | `not_found` | No such record in your school |
| 429 | `rate_limited` | Too many requests this minute |
| 500 | `internal_error` | Something went wrong on our side. Try again |


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