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

Download a file

GET /businesses/{bid}/files/{id}

Requires the export scope.

Streams the stored bytes: export zips, backups, receipts. Issued document PDFs are served by prints instead, so the once-only origin rule is enforced.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.
idstringrequiredFile id.

Response

200: { "ok": true, … }

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

GET /businesses/{bid}/files/{id}
curl -X GET "$BASE/businesses/$BID/files/$DOC_ID" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/files/${DOC_ID}`, {
  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}/files/{DOC_ID}",
    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.