BillOS v1
Console llms.txt OpenAPI
POST/businesses/{bid}/accountant-report/send

Send the report now

POST /businesses/{bid}/accountant-report/send

Requires the businesses scope.

Sends the same letter the schedule sends, for a period you name (default: the last closed one). A period already mailed is skipped with sent: false, reason: "already_sent" unless force is true. Owner only.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.

Body

FieldTypeDescription
periodstringYYYY-MM (a month), YYYY-Bn (a bi-monthly pair, B1 = Jan-Feb) or YYYY (a year). Default: the last closed period of the schedule's frequency.
forcebooleanSend even if this period was already mailed. Default true.

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
sentbooleanrequiredWhether a letter went out.
periodobjectThe window that was reported.
toarray of string
attachmentsarray of string

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).

POST /businesses/{bid}/accountant-report/send
curl -X POST "$BASE/businesses/$BID/accountant-report/send" \
  -H "X-Api-Key: $KEY"
const res = await fetch(`${BASE}/businesses/${BID}/accountant-report/send`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
  },
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.post(
    f"{BASE}/businesses/{BID}/accountant-report/send",
    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.