Cancel invoice

Cancel (stornieren) a finalised invoice. The number stays blocked.

POST https://cotlet.dev/api/v1/lexware-office/documents/{document_id}/invoice/cancel

write Confirm

Opens Weitere Aktionen > Stornieren on an open invoice. The original shows a Storno stamp and its booking is reversed, and the cancellation cannot be undone; the cancelled number stays blocked even if you change the number range. A paid invoice needs its payment deleted first, and the restricted role "Belege, Kontakte & Produkte" cannot cancel paid invoices. Use create_invoice for the corrected one. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: cancel_invoice
NameTypeDescription
document_id string required string Document ID from list_documents or create_invoice.

Request

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

Example response

JSON

{
  "document_id": "d_9c31be",
  "number": "RE1031",
  "status": "voided"
}

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.