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

# Paged: data stays a plain array (newest first) and page carries

> {total, limit, offset} so existing consumers keep working while new ones can walk the full log.

`&#123;total, limit, offset&#125;` so existing consumers keep working while new ones
can walk the full log.

### Query parameters

<ParamField query="limit" type="integer">
  Page size (default 200, max 1000)
</ParamField>

<ParamField query="offset" type="integer">
  Documents to skip, newest first (default 0)
</ParamField>

### Response

`PagedDocuments`

<ResponseField name="data" type="crate.state.DocumentRecord[]" required>
  The requested page, newest first.
</ResponseField>

<ResponseField name="page" type="PageInfo" required>
  <Expandable title="PageInfo">
    <ResponseField name="limit" type="integer" required>
      The applied page size (after clamping).
    </ResponseField>

    <ResponseField name="offset" type="integer" required>
      The applied offset.
    </ResponseField>

    <ResponseField name="total" type="integer" required>
      Total records available (before paging).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="success" type="boolean" required />

### Status codes

| Code  | Meaning                                  |
| ----- | ---------------------------------------- |
| `200` | Recent processed documents, newest first |
| `403` | Admin credential required                |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://edi.stateset.com/v1/documents' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [],
    "page": {
      "limit": 1,
      "offset": 1,
      "total": 1
    },
    "success": true
  }
  ```
</ResponseExample>
