Cancel invoice
Cancel an unpaid invoice by creating a cancellation invoice (Stornorechnung).
POST https://cotlet.dev/api/v1/sevdesk/invoices/{invoice_id}/cancel
Cancels an invoice that is open or due, like Rechnung stornieren. sevdesk creates a cancellation invoice that refers to the original, sets it to paid and sets the original to cancelled. The cancellation invoice takes the next free number of your invoice number range. A paid invoice cannot be cancelled this way; it needs a credit note. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id string required | string | Invoice ID from list_invoices. |
Request
curl -X POST https://cotlet.dev/api/v1/sevdesk/invoices/invoice_8c41d2/cancel \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("sevdesk", "cancel_invoice", {"invoice_id":"invoice_8c41d2"}) const result = await cotlet.call('sevdesk', 'cancel_invoice', {"invoice_id":"invoice_8c41d2"}); cotlet call sevdesk cancel_invoice --data '{"invoice_id":"invoice_8c41d2"}' Example response
{
"invoice_id": "41872600",
"invoice_number": "RE-1040",
"status": "cancelled",
"cancellation_invoice_id": "41873244",
"cancellation_invoice_number": "RE-1044"
}