---
title: "Cancel an invoice / Create cancellation invoice"
method: POST
path: "/Invoice/{invoiceId}/cancelInvoice"
tags: ["Invoice"]
---

# Cancel an invoice / Create cancellation invoice

`POST /Invoice/{invoiceId}/cancelInvoice`

This endpoint will cancel the specified invoice therefor creating a cancellation invoice.<br>
     The cancellation invoice will be automatically paid and the source invoices status will change to 'cancelled'.

## Path parameters

- `invoiceId` integer, required

## Response `201`

Created - Returns cancellation invoice

- ModelInvoiceResponse — Invoice model
  - `id` string — The invoice id
  - `objectName` string — The invoice object name
  - `invoiceNumber` string — The invoice number
  - `contact` object — The contact used in the invoice
    - `id` string, required — Unique identifier of the contact
    - `objectName` string, required — Model name, which is 'Contact'
  - `create` string, date-time — Date of invoice creation
  - `update` string, date-time — Date of last invoice update
  - `sevClient` object — Client to which invoice belongs. Will be filled automatically
    - `id` string, required — Unique identifier of the client
    - `objectName` string, required — Model name, which is 'SevClient'
  - `invoiceDate` string — The invoice date.
  - `header` string — Normally consist of prefix plus the invoice number
  - `headText` string — Certain html tags can be used here to format your text
  - `footText` string — Certain html tags can be used here to format your text
  - `timeToPay` string — The time the customer has to pay the invoice in days
  - `discountTime` string — If a value other than zero is used for the discount attribute, you need to specify the amount of days for which the discount is granted.
  - `discount` string — If you want to give a discount, define the percentage here. Otherwise provide zero as value
  - `addressCountry` object — Can be omitted as complete address is defined in address attribute
    - `id` string, required — Unique identifier of the country
    - `objectName` string, required — Model name, which is 'StaticCountry'
  - `payDate` string, date-time — Needs to be timestamp or dd.mm.yyyy
  - `createUser` object — Will be filled automatically by our system and can't be changed
    - `id` string, required — Unique identifier of the user
    - `objectName` string, required — Model name, which is 'SevUser'
  - `deliveryDate` string, date-time — Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil
  - `status` '50' | '100' | '200' | '750' | '1000' — Please have a look in our <a href='#tag/Invoice/Types-and-status-of-invoices'>Types and status of invoices</a> to see what the different status codes mean
  - `smallSettlement` boolean — Defines if the client uses the small settlement scheme. If yes, the invoice must not contain any vat
  - `contactPerson` object — The user who acts as a contact person for the invoice
    - `id` string, required — Unique identifier of the user
    - `objectName` string, required — Model name, which is 'SevUser'
  - `taxRate` string — This is not used anymore. Use the taxRate of the individual positions instead.
  - `taxRule` object — **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** See [list of available VAT rules](#section/sevdesk-Update-2.0/Tax-Rules).
    - `id` '1' | '2' | '3' | '4' | '5' | '11' | '17' | '18' | '19' | '20' | '21', required
    - `objectName` 'TaxRule', required — Name of the object. Must always be TaxRule
  - `taxText` string — A common tax text would be 'Umsatzsteuer 19%'
  - `dunningLevel` string — Defines how many reminders have already been sent for the invoice. Starts with 1 (Payment reminder) and should be incremented by one every time another reminder is sent.
  - `taxType` 'default' | 'eu' | 'noteu' | 'custom' — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax type of the invoice. There are four tax types: 1. default - Umsatzsteuer ausweisen 2. eu - Steuerfreie innergemeinschaftliche Lieferung (Europäische Union) 3. noteu - Steuerschuldnerschaft des Leistungsempfängers (außerhalb EU, z. B. Schweiz) 4. custom - Using custom tax set 5. ss - Not subject to VAT according to §19 1 UStG Tax rates are heavily connected to the tax type used.
  - `paymentMethod` object — Payment method used for the invoice
    - `id` string, required — Unique identifier of the payment method
    - `objectName` string, required — Model name, which is 'PaymentMethod'
  - `costCentre` object — Cost centre for the invoice
    - `id` string, required — Unique identifier of the cost centre
    - `objectName` string, required — Model name, which is 'CostCentre'
  - `sendDate` string, date-time — The date the invoice was sent to the customer
  - `origin` object — Origin of the invoice. Could f.e. be an order
    - `id` string, required — Unique identifier of the object
    - `objectName` string, required — Model name. Could f.e. be 'Order''
  - `invoiceType` 'RE' | 'WKR' | 'SR' | 'MA' | 'TR' | 'AR' | 'ER' — Type of the invoice. For more information on the different types, check <a href='#tag/Invoice/Types-and-status-of-invoices'>this</a> section
  - `accountIntervall` string — The interval in which recurring invoices are due as ISO-8601 duration.<br> Necessary attribute for all recurring invoices.
  - `accountNextInvoice` string — Timestamp when the next invoice will be generated by this recurring invoice.
  - `reminderTotal` string — Total reminder amount
  - `reminderDebit` string — Debit of the reminder
  - `reminderDeadline` string, date-time — Deadline of the reminder as timestamp
  - `reminderCharge` string — The additional reminder charge
  - `taxSet` object — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax set of the invoice. Needs to be added if you chose the tax type custom
    - `id` string, required — Unique identifier of the object
    - `objectName` string, required — Model name, which is 'TaxSet'
  - `address` string — Complete address of the recipient including name, street, city, zip and country. * Line breaks can be used and will be displayed on the invoice pdf.
  - `currency` string — Currency used in the invoice. Needs to be currency code according to ISO-4217
  - `sumNet` string — Net sum of the invoice
  - `sumTax` string — Tax sum of the invoice
  - `sumGross` string — Gross sum of the invoice
  - `sumDiscounts` string — Sum of all discounts in the invoice
  - `sumNetForeignCurrency` string — Net sum of the invoice in the foreign currency
  - `sumTaxForeignCurrency` string — Tax sum of the invoice in the foreign currency
  - `sumGrossForeignCurrency` string — Gross sum of the invoice in the foreign currency
  - `sumDiscountsForeignCurrency` string — Discounts sum of the invoice in the foreign currency
  - `sumNetAccounting` string — Net accounting sum of the invoice. Is usually the same as sumNet
  - `sumTaxAccounting` string — Tax accounting sum of the invoice. Is usually the same as sumTax
  - `sumGrossAccounting` string — Gross accounting sum of the invoice. Is usually the same as sumGross
  - `paidAmount` number, float — Amount which has already been paid for this invoice by the customer
  - `customerInternalNote` string — Internal note of the customer. Contains data entered into field 'Referenz/Bestellnummer'
  - `showNet` boolean — If true, the net amount of each position will be shown on the invoice. Otherwise gross amount
  - `enshrined` string, date-time — Enshrined invoices cannot be changed. Can only be set via [Invoice/{invoiceId}/enshrine](#tag/Invoice/operation/invoiceEnshrine). This operation cannot be undone.
  - `sendType` 'VPR' | 'VPDF' | 'VM' | 'VP' — Type which was used to send the invoice. IMPORTANT: Please refer to the invoice section of the * API-Overview to understand how this attribute can be used before using it!
  - `deliveryDateUntil` string — If the delivery date should be a time range, another timestamp can be provided in this attribute * to define a range from timestamp used in deliveryDate attribute to the timestamp used here.
  - `datevConnectOnline` object — Internal attribute
  - `sendPaymentReceivedNotificationDate` string — Internal attribute

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `500` — Server Error

---

[API](https://skmtc.net/sevdesk/apis/sevdesk-api.md) · [All operations](https://skmtc.net/sevdesk/apis/sevdesk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sevdesk/sevdesk-api/revisions/a32cec0fecea/schema)
