Cancel invoice
Cancel an issued invoice by creating a storno invoice with a reason.
POST https://cotlet.dev/api/v1/szamlazz-hu/invoices/{invoice_number}/cancel
Creates a storno invoice for the original, with the same delivery date, and adds your reason to it. Returns the storno invoice number and the amounts. The storno is a legal document that goes to NAV, which accepts it only if the original was submitted successfully. A storno made by mistake is fixed in the app, not by this tool. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_number string required | string | Invoice number as shown in Outgoing invoices, from list_invoices. |
| reason string | string | Reason for the storno, printed on the storno invoice. |
Request
curl -X POST https://cotlet.dev/api/v1/szamlazz-hu/invoices/ABC-2026-00131/cancel \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"Duplicate order"}' result = client.call("szamlazz-hu", "cancel_invoice", {"invoice_number":"ABC-2026-00131","reason":"Duplicate order"}) const result = await cotlet.call('szamlazz-hu', 'cancel_invoice', {"invoice_number":"ABC-2026-00131","reason":"Duplicate order"}); cotlet call szamlazz-hu cancel_invoice --data '{"invoice_number":"ABC-2026-00131","reason":"Duplicate order"}' Example response
{
"storno_invoice_number": "ABC-2026-00149",
"original_invoice_number": "ABC-2026-00131",
"reason": "Duplicate order",
"gross": -127000,
"currency": "HUF"
}