Cancel invoice
Cancel a sent invoice: its balance goes to zero and the client balance drops.
POST https://cotlet.dev/api/v1/invoice-ninja/invoices/{invoice_number}/cancel
Cancels an invoice that is Sent, Partial or Paid. The invoice balance is zeroed, the client balance drops by that amount and the status becomes Cancelled; payments already linked stay linked. Cancel does not delete the invoice and does not turn a paid invoice into a credit, which is what Reverse does in the app, so this tool does not reverse payments. A cancelled invoice cannot be sent again. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| company string | string | Company name, for accounts with several companies. Default: the company open when you signed in. |
| invoice_number string required | string | Invoice number from list_invoices or create_invoice, e.g. INV-0038. |
Request
curl -X POST https://cotlet.dev/api/v1/invoice-ninja/invoices/invoice%20number/cancel \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("invoice-ninja", "cancel_invoice", {"invoice_number":"invoice number"}) const result = await cotlet.call('invoice-ninja', 'cancel_invoice', {"invoice_number":"invoice number"}); cotlet call invoice-ninja cancel_invoice --data '{"invoice_number":"invoice number"}' Example response
{
"invoice_number": "INV-0031",
"status": "cancelled",
"balance": 0,
"client": "Fenwick Ltd",
"client_balance": 0
}