BillOS v1
Console llms.txt OpenAPI
POST/businesses/{bid}/documents/{id}/credit-note

Correct with a credit note

POST /businesses/{bid}/documents/{id}/credit-note

Requires the documents scope.

The only way to undo an issued 305 or 320: issues a linked חשבונית מס זיכוי (330) mirroring the original amounts. For a receipt (400) it issues a negative receipt. Nothing is ever deleted (הוראה 23).

Path parameters

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

Body (optional)

FieldTypeDescription
reasonstringPrinted on the credit note as its note.

Response

201: { "ok": true, … }

FieldTypeDescription
okbooleanrequired
documentDocumentrequiredA draft is freely mutable. An issued document is immutable forever, blocked at the database engine, not merely in application code.

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

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