---
title: "Create a new creditNote"
method: POST
path: "/CreditNote/Factory/saveCreditNote"
tags: ["CreditNote"]
---

# Create a new creditNote

`POST /CreditNote/Factory/saveCreditNote`

The list of parameters starts with the credit note array.<br> This array contains all required attributes for a complete credit note.<br> Most of the attributes are covered in the credit note attribute list, there are only two parameters standing out, namely <b>mapAll</b> and <b>objectName</b>.<br> These are just needed for our system and you always need to provide them.<br> The list of parameters then continues with the credit note position array.<br> With this array you have the possibility to add multiple positions at once.<br> In the example it only contains one position, again together with the parameters <b>mapAll</b> and <b>objectName</b>, however, you can add more credit note positions by extending the array.<br> So if you wanted to add another position, you would add the same list of parameters with an incremented array index of "1" instead of "0".<br><br> The list ends with the five parameters creditNotePosDelete, discountSave, discountDelete, takeDefaultAddress and forCashRegister.<br> They only play a minor role if you only want to create a credit note but we will shortly explain what they can do.<br> With creditNotePosDelete you have to option to delete credit note positions as this request can also be used to update credit notes.<br> Both discount parameters are deprecated and have no use for credit notes, however they need to be provided in case you want to use the following two parameters.<br> With takeDefaultAddress you can specify that the first address of the contact you are using for the credit note is taken for the credit note address attribute automatically, so you don't need to provide the address yourself.<br> Finally, the forCashRegister parameter needs to be set to <b>true</b> if your credit note is to be booked on the cash register.<br> If you want to know more about these parameters, for example if you want to use this request to update credit notes, feel free to contact our support.<br> Finally, after covering all parameters, they only important information left, is that the order of the last five attributes always needs to be kept.<br> You will also always need to provide all of them, as otherwise the request won't work properly.

## Request body

- SaveCreditNote
  - `creditNote` ModelCreditNote, required — creditNote model
    - `id` integer — The creditNote id. <span style='color:red'>Required</span> if you want to create/update an credit note position for an existing credit note"
    - `objectName` string, required — The creditNote object name
    - `mapAll` boolean, required
    - `create` string, date-time — Date of creditNote creation
    - `update` string, date-time — Date of last creditNote update
    - `creditNoteNumber` string, required — The creditNote number
    - `contact` object, required — The contact used in the creditNote
      - `id` integer, required — Unique identifier of the contact
      - `objectName` string, required — Model name, which is 'Contact'
    - `creditNoteDate` string, date-time, required — Needs to be provided as timestamp or dd.mm.yyyy
    - `status` '100' | '200' | '300' | '500' | '750' | '1000', required — Please have a look in <a href='#tag/CreditNote/Status-of-credit-notes'>status of credit note</a> to see what the different status codes mean
    - `header` string, required — Normally consist of prefix plus the creditNote number
    - `headText` string, nullable — Certain html tags can be used here to format your text
    - `footText` string, nullable — Certain html tags can be used here to format your text
    - `addressCountry` object, nullable, required — Can be omitted as complete address is defined in address attribute
      - `id` integer, required — Unique identifier of the country
      - `objectName` string, required — Model name, which is 'StaticCountry'
    - `createUser` object — Will be filled automatically by our system and can't be changed
      - `id` integer, required — Unique identifier of the user
      - `objectName` string, required — Model name, which is 'SevUser'
    - `sevClient` object — Client to which creditNote belongs. Will be filled automatically
      - `id` integer, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `smallSettlement` boolean, nullable — Defines if the client uses the small settlement scheme. If yes, the creditNote must not contain any vat
    - `contactPerson` object, required — The user who acts as a contact person for the creditNote
      - `id` integer, required — Unique identifier of the user
      - `objectName` string, required — Model name, which is 'SevUser'
    - `taxRule` object, required — **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
    - `taxRate` number, float, required — This is not used anymore. Use the taxRate of the individual positions instead.
    - `taxSet` object, nullable — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax set of the creditNote. Needs to be added if you chose the tax type custom
      - `id` integer, required — Unique identifier of the object
      - `objectName` string, required — Model name, which is 'TaxSet'
    - `taxText` string, required — A common tax text would be 'Umsatzsteuer 19%'
    - `taxType` string, required — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax type of the creditNote. 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.
    - `sendDate` string, date-time, nullable — The date the creditNote was sent to the customer
    - `address` string, nullable — Complete address of the recipient including name, street, city, zip and country.<br> Line breaks can be used and will be displayed on the invoice pdf.
    - `bookingCategory` 'PROVISION' | 'ROYALTY_ASSIGNED' | 'ROYALTY_UNASSIGNED' | 'UNDERACHIEVEMENT' | 'ACCOUNTING_TYPE', required — Defines the booking category, for more information see the section [Credit note booking categories](#tag/CreditNote/Credit-note-booking-categories) The booking category of the credit note. **<code>ACCOUNTING_TYPE</code> is currently not supported in sevdesk-Update 2.0.**
    - `currency` string, required — Currency used in the creditNote. Needs to be currency code according to ISO-4217
    - `sumNet` number, float — Net sum of the creditNote
    - `sumTax` number, float — Tax sum of the creditNote
    - `sumGross` number, float — Gross sum of the creditNote
    - `sumDiscounts` number, float — Sum of all discounts in the creditNote
    - `sumNetForeignCurrency` number, float — Net sum of the creditNote in the foreign currency
    - `sumTaxForeignCurrency` number, float — Tax sum of the creditNote in the foreign currency
    - `sumGrossForeignCurrency` number, float — Gross sum of the creditNote in the foreign currency
    - `sumDiscountsForeignCurrency` number, float — Discounts sum of the creditNote in the foreign currency
    - `customerInternalNote` string, nullable — 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 creditNote. Otherwise gross amount
    - `sendType` 'VPR' | 'VPDF' | 'VM' | 'VP', nullable — Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the * API-Overview to understand how this attribute can be used before using it!
  - `creditNotePosSave` ModelCreditNotePos[]
    - `id` integer, nullable — The creditNote position id.
    - `objectName` string, required — The creditNote position object name
    - `mapAll` boolean, required
    - `create` string — Date of creditNote position creation
    - `update` string — Date of last creditNote position update
    - `creditNote` object — The creditNote to which the position belongs. <span style='color:red'>Required</span> if you want to create/update an credit note position for an existing credit note"
      - `id` integer, required — Unique identifier of the creditNote
      - `objectName` string, required — Model name, which is 'creditNote'
    - `part` object — Part from your inventory which is used in the position.
      - `id` integer, required — Unique identifier of the part
      - `objectName` string, required — Model name, which is 'Part'
    - `quantity` number, float, required — Quantity of the article/part
    - `price` number, float, nullable — Price of the article/part. Is either gross or net, depending on the sevdesk account setting.
    - `priceNet` number, float, nullable — Net price of the part
    - `priceTax` number, float, nullable — Tax on the price of the part
    - `priceGross` number, float, nullable — Gross price of the part
    - `name` string, nullable — Name of the article/part.
    - `unity` object, required — The unit in which the positions part is measured
      - `id` integer, required — Unique identifier of the unit
      - `objectName` string, required — Model name, which is 'Unity'
    - `sevClient` object — Client to which creditNote position belongs. Will be filled automatically
      - `id` integer, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `positionNumber` integer, nullable — Position number of your position. Can be used to creditNote multiple positions.
    - `text` string, nullable — A text describing your position.
    - `discount` number, float, nullable — An optional discount of the position.
    - `optional` boolean, nullable — Defines if the position is optional.
    - `taxRate` number, float, required — Tax rate of the position.
    - `sumDiscount` number, float, nullable — Discount sum of the position
  - `creditNotePosDelete` object
    - `id` integer, required — Id of credit note position
    - `objectName` string, required — Object name of credit note position
  - `discountSave` object
    - `discount` boolean, required — Defines if this is a discount or a surcharge
    - `text` string, required — A text for your discount
    - `percentage` boolean, required — Defines if this is a percentage or an absolute discount
    - `value` number, required — Value of the discount
    - `objectName` string, required — Object name of the discount
    - `mapAll` boolean, required — Internal param
  - `discountDelete` object
    - `id` integer, required — ID of discount to delete
    - `objectName` string, required — Object name of discount

## Response `201`

Created - Returns created credit note

- SaveCreditNoteResponse
  - `creditNote` ModelCreditNoteResponse — creditNote model
    - `id` string — The creditNote id
    - `objectName` string — The creditNote object name
    - `create` string, date-time — Date of creditNote creation
    - `update` string, date-time — Date of last creditNote update
    - `creditNoteNumber` string, nullable — The creditNote number
    - `contact` object, nullable — The contact used in the creditNote
      - `id` string, required — Unique identifier of the contact
      - `objectName` string, required — Model name, which is 'Contact'
    - `creditNoteDate` string, date-time — The credit note date
    - `status` '100' | '200' | '750' | '1000' — Please have a look in <a href='#tag/CreditNote/Status-of-credit-notes'>status of credit note</a> to see what the different status codes mean
    - `header` string, nullable — Normally consist of prefix plus the creditNote number
    - `headText` string, nullable — Certain html tags can be used here to format your text
    - `footText` string, nullable — Certain html tags can be used here to format your text
    - `addressCountry` object, nullable — 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'
    - `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'
    - `sevClient` object — Client to which creditNote belongs. Will be filled automatically
      - `id` string, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `deliveryDate` string, date-time — Timestamp. This can also be a date range if you also use the attribute deliveryDateUntil
    - `smallSettlement` boolean, nullable — Defines if the client uses the small settlement scheme. If yes, the creditNote must not contain any vat
    - `contactPerson` object, nullable — The user who acts as a contact person for the creditNote
      - `id` string, required — Unique identifier of the user
      - `objectName` string, required — Model name, which is 'SevUser'
    - `taxRate` string, nullable — 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
    - `taxSet` object, nullable — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax set of the creditNote. 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'
    - `taxText` string, nullable — A common tax text would be 'Umsatzsteuer 19%'
    - `taxType` string, nullable — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax type of the creditNote. 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.
    - `sendDate` string, date-time, nullable — The date the creditNote was sent to the customer
    - `address` string, nullable — Complete address of the recipient including name, street, city, zip and country.<br> Line breaks can be used and will be displayed on the invoice pdf.
    - `currency` string, nullable — Currency used in the creditNote. Needs to be currency code according to ISO-4217
    - `sumNet` string — Net sum of the creditNote
    - `sumTax` string — Tax sum of the creditNote
    - `sumGross` string — Gross sum of the creditNote
    - `sumDiscounts` string — Sum of all discounts in the creditNote
    - `sumNetForeignCurrency` string — Net sum of the creditNote in the foreign currency
    - `sumTaxForeignCurrency` string — Tax sum of the creditNote in the foreign currency
    - `sumGrossForeignCurrency` string — Gross sum of the creditNote in the foreign currency
    - `sumDiscountsForeignCurrency` string — Discounts sum of the creditNote in the foreign currency
    - `customerInternalNote` string, nullable — 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 creditNote. Otherwise gross amount
    - `sendType` 'VPR' | 'VPDF' | 'VM' | 'VP', nullable — Type which was used to send the creditNote. IMPORTANT: Please refer to the creditNote section of the * API-Overview to understand how this attribute can be used before using it!
  - `creditNotePos` ModelCreditNotePosResponse[]
    - `id` string — The creditNote position id
    - `objectName` string — The creditNote position object name
    - `create` string — Date of creditNote position creation
    - `update` string — Date of last creditNote position update
    - `creditNote` object, required — The creditNote to which the position belongs.
      - `id` string, required — Unique identifier of the creditNote
      - `objectName` string, required — Model name, which is 'creditNote'
    - `part` object — Part from your inventory which is used in the position.
      - `id` string, required — Unique identifier of the part
      - `objectName` string, required — Model name, which is 'Part'
    - `quantity` string, required — Quantity of the article/part
    - `price` string, nullable — Price of the article/part. Is either gross or net, depending on the sevdesk account setting.
    - `priceNet` string, nullable — Net price of the part
    - `priceTax` string, nullable — Tax on the price of the part
    - `priceGross` string, nullable — Gross price of the part
    - `name` string, nullable — Name of the article/part.
    - `unity` object, required — The unit in which the positions part is measured
      - `id` string, required — Unique identifier of the unit
      - `objectName` string, required — Model name, which is 'Unity'
    - `sevClient` object — Client to which creditNote position belongs. Will be filled automatically
      - `id` string, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `positionNumber` string, nullable — Position number of your position. Can be used to creditNote multiple positions.
    - `text` string, nullable — A text describing your position.
    - `discount` string, nullable — An optional discount of the position.
    - `optional` boolean, nullable — Defines if the position is optional.
    - `taxRate` string, required — Tax rate of the position.
    - `sumDiscount` string, nullable — Discount sum of the position

## 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)
