BillOS v1
Console llms.txt OpenAPI
POST/businesses/{bid}/numbering

Set where a series starts

POST /businesses/{bid}/numbering

Requires the businesses scope.

Sets the next number of a series that has issued nothing (a series that has issued keeps its sequence, as the gapless rule requires, and comes back in refused). The choice is recorded, so a later import of numbering from previous software never moves it. Owner only.

Path parameters

NameTypeDescription
bidstringrequiredBusiness id, from POST /businesses.

Body

FieldTypeDescription
nextobjectrequiredDocument type code → the next number, e.g. { "305": 10001 }.

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
seriesarray of NumberingSeriesrequired
refusedarray of integerTypes left as they were because they already issued.

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