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

Every document of a period as one zip

GET /businesses/{bid}/exports/documents

Requires the export scope.

The period as an accountant files it: each issued document as its own signed PDF, the העתק (a copy, never the origin, which is delivered once), in הכנסות/YYYY-MM/, named <type> <number> - <date> - <customer>.pdf; the expense receipts in הוצאות/YYYY-MM/; the previous software's archived documents in מהמערכת הקודמת/YYYY-MM/; and אינדקס מסמכים.xlsx, one row per document with its amounts, links and status, each row linking to its file inside the zip. Cancelled documents, credit notes and proformas are included and marked. A document whose PDF is not rendered yet is listed in the index without a file, and X-BillOS-Missing-Files counts them. Built on request, never stored, and not counted as a print. Names inside the zip are Hebrew, marked UTF-8. At most 400 days and 3,000 files per zip: split a longer period.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.

Query parameters

NameTypeDescription
fromstringrequiredBy document date.
tostringrequired
expensesbooleanInclude the expense receipts and their sheet. Default true.
legacybooleanInclude the archived documents of the previous software. Default true.

Response

200: { "ok": true, … }

Errors: 400, 401, 403, 404, 429. Every failure answers { "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }: branch on reason, and read hint for what to change (https://docs.billos.co.il/errors.md).

GET /businesses/{bid}/exports/documents
curl -X GET "$BASE/businesses/$BID/exports/documents?from=&to=&expenses=" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/exports/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}/exports/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.