Write off document
write_off_documentWrite off the unpaid rest of a sales invoice that will not be paid (bad debt), as the app's Write off on the invoice does: the outstanding amount goes to the write-off account, the VAT on it is reversed, and the invoice is locked. The write-off is always dated today, so its VAT reversal lands in the current open period; there is no date to choose. Without confirm true it changes nothing and answers reason confirm-required naming the amount, the account and the date; ask the user, then call again with confirm true. Refuses a quote or other non-invoice (not-an-invoice), a void invoice, one already written off (unchanged), one marked settled, one with nothing outstanding, one with a bank line stub matched to it that is not yet linked (payment-pending: blockingpayments lists each line's id, date, amount and narration; name those lines to the user, never guess one), an invoice dated after today (invalid-date), and books locked through today (locked-period). A missing or another business's id is not-found.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "write_off_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The sales invoice to write off, from list_invoices or get_document. | |
| confirm | No | Send true only after the user has agreed to the write-off the refusal described. |