POST
/businesses/{bid}/expenses/{id}/recordRecord an expense
POST /businesses/{bid}/expenses/{id}/record
Requires the expenses scope.
Writes the immutable ledger row. A non-ILS expense without amountIls is refused: the ledger sums agorot without looking at currency, and the row cannot be edited afterwards.
Path parameters
| Name | Type | Description | |
|---|---|---|---|
bid | string | required | Business id, from POST /businesses. |
id | string | required | Expense id. |
Response
201: { "ok": true, … }
| Field | Type | Description | |
|---|---|---|---|
ok | boolean | required | |
expense | Expense | required | The 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.