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

write Confirm

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

Parameters: cancel_invoice
NameTypeDescription
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
curl -X POST https://cotlet.dev/api/v1/invoice-ninja/invoices/invoice%20number/cancel \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("invoice-ninja", "cancel_invoice", {"invoice_number":"invoice number"})
Node.js
const result = await cotlet.call('invoice-ninja', 'cancel_invoice', {"invoice_number":"invoice number"});
CLI
cotlet call invoice-ninja cancel_invoice --data '{"invoice_number":"invoice number"}'

Example response

JSON

{
  "invoice_number": "INV-0031",
  "status": "cancelled",
  "balance": 0,
  "client": "Fenwick Ltd",
  "client_balance": 0
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.