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

Mark an expense paid or waiting

PUT /businesses/{bid}/expenses/{id}/payment

Requires the expenses scope.

Follow-up of what is still owed to suppliers. Works on a draft and on a recorded expense alike, because it is kept beside the ledger row and changes nothing in it. paid: true takes paidOn (may be left out when the day is not known); paid: false takes an optional dueOn.

Path parameters

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

Body

FieldTypeDescription
paidbooleanrequiredTrue once paid; false while it waits.
paidOnstringThe day it was paid.
dueOnstringThe day it is due, while it waits.

Response

200: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
paymentExpensePaymentrequiredWhether the expense was paid, as the owner said it. Beside the ledger row, not part of it: free to change after the expense is recorded. Null on an expense nobody said anything about.

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

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