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
| Name | Type | Description |
|---|---|---|
| cancel_invoice_id integer required | integer | Invoice ID from list_invoices. |
| cancel_reason string | string | Reason shown on the cancelled document. |
Request
curl -X POST https://cotlet.dev/api/v1/fakturownia/cancel-invoices/1/invoice/cancel \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("fakturownia", "cancel_invoice", {"cancel_invoice_id":1}) const result = await cotlet.call('fakturownia', 'cancel_invoice', {"cancel_invoice_id":1}); cotlet call fakturownia cancel_invoice --data '{"cancel_invoice_id":1}' Example response
{
"invoice_id": 5104,
"status": "cancelled",
"cancel_reason": "Issued to the wrong client"
}