BillOS v1
Console llms.txt OpenAPI
PATCH/businesses/{bid}/expenses/{id}

Update a draft expense

PATCH /businesses/{bid}/expenses/{id}

Requires the expenses scope.

Path parameters

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

Body

FieldTypeDescription
idstringrequired
statusstringrequiredOne of: draft, recorded.
supplierNamestring
supplierTaxIdstring
documentDatestring
documentNumberstringThe supplier's own document number.
amountIncVatintegerGROSS, VAT included. Israeli prices include VAT. Integer agorot (₪1 = 100).
vatAmountintegerThe portion INSIDE the gross. Never add it to amountIncVat. Integer agorot (₪1 = 100).
deductibleVatBpintegerHow much of the VAT is deductible, in basis points. 10000 = all of it.
currencystringCurrency of amountIncVat, ISO 4217. Always ILS for what the ledger records.
docAmountintegerFor a document in another currency: its own gross, in that currency's minor unit (cents). Null for a shekel document.
docCurrencystringISO 4217 code of docAmount. Null for a shekel document.
fxRatenumberILS per unit of docCurrency used to derive amountIncVat. Evidence, never recomputed.
categoryKeystringLedger category.
fileIdstringAttached receipt image or PDF.
extractedOcrExtractionWhat the vision model read off the receipt. Advisory: the operator confirms before recording.
createdAtstring

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
expenseExpenserequiredThe purchase side of the ledger. A recorded expense is immutable; correct it with a storno.

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

PATCH /businesses/{bid}/expenses/{id}
curl -X PATCH "$BASE/businesses/$BID/expenses/$DOC_ID" \
  -H "X-Api-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "string",
    "status": "issued"
  }'
const res = await fetch(`${BASE}/businesses/${BID}/expenses/${DOC_ID}`, {
  method: 'PATCH',
  headers: {
    'X-Api-Key': KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "id": "string",
    "status": "issued"
  }),
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.patch(
    f"{BASE}/businesses/{BID}/expenses/{DOC_ID}",
    headers={"X-Api-Key": KEY},
    json={
      "id": "string",
      "status": "issued"
    },
)
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.