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

# Pagination

> Paging through lists with page_token

List endpoints return results in pages. You control paging with the `limit` and
`page_token` parameters.

## How it works

```bash theme={null}
curl -H "X-API-Key: ddp_YOUR_KEY" \
  "https://app.doodocs.kz/api/developer/v1/employees?limit=100"
```

```json theme={null}
{
  "employees": [ "…" ],
  "next_page_token": "CgYIyAE.7f3a"
}
```

Pass `next_page_token` in the next request to get the next page. An empty
`next_page_token` means there are no more pages.

```bash theme={null}
curl -H "X-API-Key: ddp_YOUR_KEY" \
  "https://app.doodocs.kz/api/developer/v1/employees?limit=100&page_token=CgYIyAE.7f3a"
```

* `limit` — defaults to `100`, maximum `1000`.
* `page_token` — opaque. Do not parse or construct it; pass back exactly the value
  you received.

<Warning>
  A token is bound to the filter set it was issued for. Passing it into a request with
  different `status`, `department_id`, `updated_since`, or `limit` returns
  `INVALID_ARGUMENT`. When you change filters, start paging again without a token.
</Warning>

## Total count

By default the number of matching records is not counted. Request it explicitly with
`include_total=true`:

```bash theme={null}
curl -H "X-API-Key: ddp_YOUR_KEY" \
  "https://app.doodocs.kz/api/developer/v1/employees?limit=100&include_total=true"
```

A `total_count` field appears in the response. On large result sets (over \~10,000
records) this is a planner estimate, not an exact number.

## Incremental sync

To pull only changes, filter by `updated_since` (RFC 3339):

```bash theme={null}
curl -H "X-API-Key: ddp_YOUR_KEY" \
  "https://app.doodocs.kz/api/developer/v1/employees?updated_since=2026-02-01T00:00:00Z"
```

<Note>
  `updated_since` reflects changes to the employee record itself. Renaming a related
  entity (person, department) does **not** show up in this field — use
  [webhooks](/en/api-reference/webhooks) for those: a person rename arrives as
  `employee.changed`. To reconcile deletions, do a full re-read periodically.

  Encode a timezone offset in the query as `%2B05:00`, or send the time in `Z` (UTC):
  a `+` in a URL is otherwise read as a space.
</Note>
