GET
/businesses/{bid}/documentsList documents
GET /businesses/{bid}/documents
Requires the documents scope.
Path parameters
| Name | Type | Description | |
|---|---|---|---|
bid | string | required | Business id, from POST /businesses. |
Query parameters
| Name | Type | Description | |
|---|---|---|---|
status | string | One of: draft, issued. | |
docType | integer | One of: 305, 320, 330, 400. | |
from | string | Inclusive, on document date. | |
to | string | Inclusive. | |
take | integer | Default 200. | |
before | string | Time cursor: rows created strictly before this instant, newest first. To page, start with now and pass the last row's createdAt. | |
externalRefPrefix | string | Only documents whose externalRef starts with this (every document filed under one of your own references, e.g. a job). | |
q | string | Free-text search: party name, exact document number (digits), or a line description. | |
partyId | string | Only documents filed against this party. | |
skip | integer | Offset paging: rows to skip before take. Combine with counts=1 for totals. Default 0. | |
counts | string | Adds counts: { total, byStatus } over the same filters (minus status), so pages and count boxes agree. One of: 1. |
Response
200: { "ok": true, … }
| Field | Type | Description | |
|---|---|---|---|
ok | boolean | required | |
documents | array of Document | required |
Errors: 400, 401, 403, 404, 429. Every failure answers { "error": …, "reason": … }. Branch on reason.