# documents.records.search

Find a record whose details can go into a document: contractors, customers and vendors (party), merchants, teammates (member) and the company itself. Filter by type and search by name or email. Returns each record's type, id, name and a short description; read its details with documents.records.get.

`GET | POST /api/v1/accounting/documents.records.search`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_documents_records_search`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `type` | enum |  | One of: `contractor`, `party`, `merchant`, `member`, `company`, `all`. Default `"all"`. |
| `query` | string |  | Text to search for. at most 200 characters. Default `""`. |
| `limit` | integer |  | How many results to return at most. 1 to 25. Default `10`. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/documents.records.search \
  -H "Authorization: Bearer $OATMILK_API_KEY"
```

Reference page: https://app.getoatmilk.com/docs/api/documents.records.search
