PUT
/businesses/{bid}/expenses/{id}/paymentMark 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
| Name | Type | Description | |
|---|---|---|---|
bid | string | required | Business id, from POST /businesses. |
id | string | required | Expense id. |
Body
| Field | Type | Description | |
|---|---|---|---|
paid | boolean | required | True once paid; false while it waits. |
paidOn | string | The day it was paid. | |
dueOn | string | The day it is due, while it waits. |
Response
200: { "ok": true, … }
| Field | Type | Description | |
|---|---|---|---|
ok | boolean | required | |
payment | ExpensePayment | required | Whether 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).