Delete invoice
delete_invoicePermanently delete an incorrectly created invoice. Use only for invoices raised in error; for customer-visible invoices, void or issue a credit memo instead.
Instructions
Delete an invoice permanently from the company file. Use it only for an invoice raised in error: this server cannot undo it, and voiding or issuing a credit memo is usually the correct accounting action for an invoice the customer has already seen. Write operation and not idempotent: it needs the SyncToken from a fresh get_invoice, and a repeat call for the same Id fails because the invoice no longer exists. Payments linked to it lose that link.
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": {
"invoice_id": "<invoice_id>",
"sync_token": "<sync_token>"
},
"name": "delete_invoice"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_id | Yes | QuickBooks Invoice Id, as returned by search_invoices, list_invoices, or create_invoice. This is the internal Id, not the DocNumber printed on the invoice. | |
| sync_token | Yes | SyncToken from a fresh get_invoice call for this Id. QuickBooks rejects a stale token with error 5010, so re-read the invoice instead of reusing an older token. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| invoice | No |