BillOS v1
Console llms.txt OpenAPI
GET/businesses/{bid}/documents

List documents

GET /businesses/{bid}/documents

Requires the documents scope.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.

Query parameters

NameTypeDescription
statusstringOne of: draft, issued.
docTypeintegerOne of: 305, 320, 330, 400.
fromstringInclusive, on document date.
tostringInclusive.
takeintegerDefault 200.
beforestringTime cursor: rows created strictly before this instant, newest first. To page, start with now and pass the last row's createdAt.
externalRefPrefixstringOnly documents whose externalRef starts with this (every document filed under one of your own references, e.g. a job).
qstringFree-text search: party name, exact document number (digits), or a line description.
partyIdstringOnly documents filed against this party.
skipintegerOffset paging: rows to skip before take. Combine with counts=1 for totals. Default 0.
countsstringAdds counts: { total, byStatus } over the same filters (minus status), so pages and count boxes agree. One of: 1.

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
documentsarray of Documentrequired

Errors: 400, 401, 403, 404, 429. Every failure answers { "error": …, "reason": … }. Branch on reason.

GET /businesses/{bid}/documents
curl -X GET "$BASE/businesses/$BID/documents?status=&docType=&from=" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/documents`, {
  method: 'GET',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.get(
    f"{BASE}/businesses/{BID}/documents",
    headers={"X-Api-Key": KEY},
)
data = res.json()
Set BASE to https://api.billos.co.il/v1 and KEY to your bk_live_… key, or a bk_test_… key to run it against the sandbox.
Manage your businesses, keys and webhooks in the BillOS Console.