Cancel invoice

Cancel an issued invoice with a reason. Cannot be undone.

POST https://cotlet.dev/api/v1/fakturownia/cancel-invoices/{cancel_invoice_id}/invoice/cancel

write Confirm

Cancels the invoice and records the reason at the top of the document. The newest document in the list cannot be cancelled, only deleted in the app, and receipts cannot be cancelled. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: cancel_invoice
NameTypeDescription
cancel_invoice_id integer required integer Invoice ID from list_invoices.
cancel_reason string string Reason shown on the cancelled document.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/fakturownia/cancel-invoices/1/invoice/cancel \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("fakturownia", "cancel_invoice", {"cancel_invoice_id":1})
Node.js
const result = await cotlet.call('fakturownia', 'cancel_invoice', {"cancel_invoice_id":1});
CLI
cotlet call fakturownia cancel_invoice --data '{"cancel_invoice_id":1}'

Example response

JSON

{
  "invoice_id": 5104,
  "status": "cancelled",
  "cancel_reason": "Issued to the wrong client"
}

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.