BillOS v1
Console llms.txt OpenAPI
GET/businesses/{bid}/business-documents/{id}/file

Download the file

GET /businesses/{bid}/business-documents/{id}/file

Requires the businesses scope.

The bytes as uploaded, with their Content-Type.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.
idstringrequiredBusiness document id.

Response

200: raw application/pdf bytes.

Errors: 400, 401, 403, 404, 409, 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}/business-documents/{id}/file
curl -X GET "$BASE/businesses/$BID/business-documents/$DOC_ID/file" \
  -H "X-Api-Key: $KEY"
  -o document.pdf
const res = await fetch(`${BASE}/businesses/${BID}/business-documents/${DOC_ID}/file`, {
  method: 'GET',
  headers: {
    'X-Api-Key': KEY,
  },
})
const pdf = Buffer.from(await res.arrayBuffer())
import requests
res = requests.get(
    f"{BASE}/businesses/{BID}/business-documents/{DOC_ID}/file",
    headers={"X-Api-Key": KEY},
)
open("document.pdf", "wb").write(res.content)
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.