# List documents

`GET /v1/attachments`

Lists the company's documents, newest first. Use `is_empty=true` to find bilag still missing their files, and `attachment_number` to look one up by its bilag number.

**Scopes:** any of `documents:read`, `read:ledger`

## Request

```bash
curl https://api.numina.app/v1/attachments \
  -H "Authorization: Bearer numi_YOUR_API_KEY"
```

## Query parameters

- `attachment_number` (integer, optional): Only bilag with this number. Numbers restart each accounting year, so this can return one per year. (≥ 1)
- `is_empty` (string, optional): Only bilag with or without files One of: `true`, `false`.
- `limit` (integer, optional): Maximum number of results (default 100, max 500) Default: `100`. (1–500)
- `offset` (integer, optional, nullable): Number of results to skip Default: `0`. (≥ 0)

## Response `200`

Documents

```json
{
  "attachments": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "file_name": "string",
      "status": "uploaded",
      "created_at": "string",
      "attachment_number": 185,
      "year": "2026",
      "is_empty": false,
      "file_count": 0,
      "booked_accounting_year": "2026",
      "content_sha256": "string",
      "journal_entry_ids": [
        "550e8400-e29b-41d4-a716-446655440000"
      ]
    }
  ],
  "has_more": false,
  "next_offset": 0
}
```

## Errors

- `400` Bad Request - Invalid input or validation failed
- `401` Unauthorized - Invalid or missing authentication
- `403` Forbidden - Missing scope, or the company is archived
- `429` Too Many Requests - Rate limit exceeded
- `500` Internal Server Error

See https://developers.numina.app/errors.md for the error format.
