BillOS v1
Console llms.txt OpenAPI

Regulatory outputs

Your end users (or their accountants) will eventually need these; each returns or references downloadable files served at GET /businesses/:bid/files/:id.

# OPENFRMT (מבנה אחיד) export for a date range: what an accountant/auditor asks for:
curl -X POST "$BASE/businesses/$BID/exports/openfrmt" -H "X-Api-Key: $KEY" \
  -H "Content-Type: application/json" -d '{"from":"2026-01-01","to":"2026-06-30"}'
# 201 → {"ok":true, "exportRun":{...verification summary...}, "file":{"id":"...","size":...}}
#       one zip (INI.TXT + BKMVDATA under the spec's directory tree), downloaded via /files/:id

# numbering-continuity report (gap check) per document type:
curl -H "X-Api-Key: $KEY" "$BASE/businesses/$BID/reports/continuity?docType=320"

# management reports: הכנסות / הוצאות / רווח והפסד. Default = a rendered Hebrew PDF;
# ?format=json returns the aggregates for your own dashboard. Cash-basis, mirroring the
# OPENFRMT semantics exactly (income = payment-bearing documents; expenses at record):
curl -H "X-Api-Key: $KEY" "$BASE/businesses/$BID/reports/incomes?from=2026-01-01&to=2026-06-30" -o incomes.pdf
curl -H "X-Api-Key: $KEY" "$BASE/businesses/$BID/reports/expenses?from=2026-01-01&to=2026-06-30&format=json"
curl -H "X-Api-Key: $KEY" "$BASE/businesses/$BID/reports/profit?from=2026-01-01&to=2026-06-30" -o profit.pdf
# profit includes a VAT block (עסקאות / תשומות / נטו) for VAT-registered dealers.
# The rendered PDF picks up the business branding (logo / accent color / footer), same as documents (§4).
# These are management reports; the regulatory filing artifact remains the OPENFRMT export.

# initiated backup (גיבוי יזום):
curl -X POST "$BASE/businesses/$BID/backup" -H "X-Api-Key: $KEY"

# download any produced file:
curl -H "X-Api-Key: $KEY" "$BASE/businesses/$BID/files/$FILE_ID" -o export.zip

These need the export scope.