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

write Confirm

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

Parameters: cancel_invoice
NameTypeDescription
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
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"}'
Python
result = client.call("szamlazz-hu", "cancel_invoice", {"invoice_number":"ABC-2026-00131","reason":"Duplicate order"})
Node.js
const result = await cotlet.call('szamlazz-hu', 'cancel_invoice', {"invoice_number":"ABC-2026-00131","reason":"Duplicate order"});
CLI
cotlet call szamlazz-hu cancel_invoice --data '{"invoice_number":"ABC-2026-00131","reason":"Duplicate order"}'

Example response

JSON

{
  "storno_invoice_number": "ABC-2026-00149",
  "original_invoice_number": "ABC-2026-00131",
  "reason": "Duplicate order",
  "gross": -127000,
  "currency": "HUF"
}

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.