---
title: "Create a new voucher"
method: POST
path: "/Voucher/Factory/saveVoucher"
tags: ["Voucher"]
---

# Create a new voucher

`POST /Voucher/Factory/saveVoucher`

Bundles the creation or updating of voucher and voucher position.<br> The list of parameters starts with the voucher model.<br> This contains all required attributes for a complete voucher.<br> Most of the attributes are covered in the voucher 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><br> The list of parameters then continues with the voucher 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 voucher 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 two parameters voucherPosDelete and filename.<br> We will shortly explain what they can do.<br> With voucherPosDelete you can delete voucher positions as this request can also be used to update draft vouchers.<br> With filename you can attach a file to the voucher.<br> For most of our customers this is a really important step, as they need to digitize their receipts.<br> Finally, after covering all parameters, the only important information left, is that the order of the last two attributes always needs to be kept. <br><br> The only valid status values for this endpoint are 50 (draft) and 100 (open). You can only update draft vouchers. If you have to, you can downgrade the status by calling resetToOpen (from paid) and resetToDraft (from open).

## Request body

- SaveVoucher
  - `voucher` ModelVoucher, required — Voucher model
    - `id` integer — The voucher id
    - `objectName` string, required — The voucher object name
    - `mapAll` boolean, required
    - `create` string, date-time — Date of voucher creation
    - `update` string, date-time — Date of last voucher update
    - `sevClient` object — Client to which voucher belongs. Will be filled automatically
      - `id` integer, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `createUser` object — User who created the voucher. Will be filled automatically.
      - `id` integer, required — Unique identifier of the user
      - `objectName` string, required — Model name, which is 'SevUser'
    - `voucherDate` string, date-time, nullable — Needs to be provided as timestamp or dd.mm.yyyy
    - `supplier` object, nullable — The contact used in the voucher as a supplier.<br> If you don't have a contact as a supplier, you can set this object to null.
      - `id` integer, required — Unique identifier of the contact
      - `objectName` string, required — Model name, which is 'Contact'
    - `supplierName` string, nullable — The supplier name.<br> The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier.
    - `description` string, nullable — The description of the voucher. Essentially the voucher number.
    - `payDate` string, date-time, nullable — Needs to be timestamp or dd.mm.yyyy
    - `status` 50 | 100 | 1000, required — Please have a look in <a href='#tag/Voucher/Types-and-status-of-vouchers'>status of vouchers</a> to see what the different status codes mean
    - `sumNet` number, float — Net sum of the voucher
    - `sumTax` number, float — Tax sum of the voucher
    - `sumGross` number, float — Gross sum of the voucher
    - `sumNetAccounting` number, float — Net accounting sum of the voucher. Is usually the same as sumNet
    - `sumTaxAccounting` number, float — Tax accounting sum of the voucher. Is usually the same as sumTax
    - `sumGrossAccounting` number, float — Gross accounting sum of the voucher. Is usually the same as sumGross
    - `sumDiscounts` number, float — Sum of all discounts in the voucher
    - `sumDiscountsForeignCurrency` number, float — Discounts sum of the voucher in the foreign currency
    - `paidAmount` number, float, nullable — Amount which has already been paid for this voucher by the customer
    - `taxRule` object, required — **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**
      - `id` '1' | '2' | '3' | '4' | '5' | '11', required — **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** Defines the vat-regulation. For "Regelbesteuerung" it can be one of: - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` - `2` - Ausfuhren (tax rates: 0.0) - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) For small business owner ("Kleinunternehmer") it can be: - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"`
      - `objectName` 'TaxRule', required — Name of the object. Must always be TaxRule
    - `taxType` string, required — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax type of the voucher. 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.
    - `creditDebit` 'C' | 'D', required — Defines if your voucher is a credit (C) or debit (D)
    - `voucherType` 'VOU' | 'RV', required — Type of the voucher. For more information on the different types, check <a href='#tag/Voucher/Types-and-status-of-vouchers'>this</a>
    - `currency` string, nullable — specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred
    - `propertyForeignCurrencyDeadline` string, date-time, nullable — Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy
    - `propertyExchangeRate` number, float, nullable — Defines the exchange rate
    - `recurringInterval` 'P0Y0M1W' | 'P0Y0M2W' | 'P0Y1M0W' | 'P0Y3M0W' | 'P0Y6M0W' | 'P1Y0M0W' | 'P2Y0M0W' | 'P3Y0M0W' | 'P4Y0M0W' | 'P5Y0M0W', nullable — The DateInterval in which recurring vouchers are generated.<br> Necessary attribute for all recurring vouchers.
    - `recurringStartDate` string, date-time, nullable — The date when the recurring vouchers start being generated.<br> Necessary attribute for all recurring vouchers.
    - `recurringNextVoucher` string, date-time, nullable — The date when the next voucher should be generated.<br> Necessary attribute for all recurring vouchers.
    - `recurringLastVoucher` string, date-time, nullable — The date when the last voucher was generated.
    - `recurringEndDate` string, date-time, nullable — The date when the recurring vouchers end being generated.<br> Necessary attribute for all recurring vouchers.
    - `enshrined` string, date-time — Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone.
    - `taxSet` object, nullable — ** Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** Tax set of the voucher. Needs to be added if you chose the taxType=custom.
      - `id` integer, required — Unique identifier of the object
      - `objectName` string, required — Model name, which is 'TaxSet'
    - `paymentDeadline` string, date-time, nullable — Payment deadline of the voucher.
    - `deliveryDate` string, date-time — Needs to be provided as timestamp or dd.mm.yyyy
    - `deliveryDateUntil` string, date-time, nullable — Needs to be provided as timestamp or dd.mm.yyyy
    - `document` object, nullable — The document of the voucher.
      - `id` integer, required — Unique identifier of the document
      - `objectName` string, required — Model name, which is 'Document'
    - `costCentre` object — Cost centre for the voucher
      - `id` integer, required — Unique identifier of the cost centre
      - `objectName` string, required — Model name, which is 'CostCentre'
  - `voucherPosSave` ModelVoucherPos[]
    - `id` integer — The voucher position id
    - `objectName` string, required — The voucher position object name
    - `mapAll` boolean, required
    - `create` string — Date of voucher position creation
    - `update` string — Date of last voucher position update
    - `sevClient` object — Client to which voucher position belongs. Will be filled automatically
      - `id` integer, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `voucher` object, required — The voucher to which the position belongs.
      - `id` integer, required — Unique identifier of the voucher
      - `objectName` string, required — Model name, which is 'Voucher'
    - `accountDatev` object, required — <b>Use this in sevdesk-Update 2.0 (replaces accountingType).</b> The account datev to which the position belongs.<br> An account datev is the booking account to which the position belongs.<br> For more information, please refer to <a href='#tag/Voucher/Account-Datev'>this</a> section.
      - `id` integer, required — Unique identifier of the account datev
      - `objectName` string, required — Model name, which is 'AccountDatev'
    - `accountingType` object, required — The accounting type to which the position belongs.<br> An accounting type is the booking account to which the position belongs.<br> For more information, please refer to <a href='#tag/Voucher/Accounting-type'>this</a> section.
      - `id` integer, required — Unique identifier of the accounting type
      - `objectName` string, required — Model name, which is 'AccountingType'
    - `estimatedAccountingType` object — The accounting type to which the position belongs estimated by our voucher recognition.<br> An accounting type is the booking account to which the position belongs.<br> For more information, please refer to <a href='#tag/Voucher/Accounting-type'>this</a> section.
      - `id` integer, required — Unique identifier of the accounting type
      - `objectName` string, required — Model name, which is 'AccountingType'
    - `taxRate` number, float, required — Tax rate of the voucher position.
    - `net` boolean, required — Determines whether 'sumNet' or 'sumGross' is regarded.<br> If both are not given, 'sum' is regarded and treated as net or gross depending on 'net'. All positions must be either net or gross, a mixture of the two is not possible.
    - `isAsset` boolean — Determines whether position is regarded as an asset which can be depreciated.
    - `sumNet` number, float, required — Net sum of the voucher position.<br> Only regarded if 'net' is 'true', otherwise its readOnly.
    - `sumTax` number, float — Tax sum of the voucher position.
    - `sumGross` number, float, required — Gross sum of the voucher position.<br> Only regarded if 'net' is 'false', otherwise its readOnly.
    - `sumNetAccounting` number, float — Net accounting sum. Is equal to sumNet.
    - `sumTaxAccounting` number, float — Tax accounting sum. Is equal to sumTax.
    - `sumGrossAccounting` number, float — Gross accounting sum. Is equal to sumGross.
    - `comment` string, nullable — Comment for the voucher position.
  - `voucherPosDelete` object
    - `id` integer, required — Id of voucher position
    - `objectName` string, required — Object name of voucher position
  - `filename` string, binary — Filename of a previously upload file which should be attached.

## Response `201`

Created - Returns created voucher

- SaveVoucherResponse
  - `voucher` ModelVoucherResponse — Voucher model
    - `id` string — The voucher id
    - `objectName` string — The voucher object name
    - `mapAll` boolean
    - `create` string, date-time — Date of voucher creation
    - `update` string, date-time — Date of last voucher update
    - `sevClient` object — Client to which voucher belongs. Will be filled automatically
      - `id` string, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `createUser` object — User who created the voucher. Will be filled automatically.
      - `id` string, required — Unique identifier of the user
      - `objectName` string, required — Model name, which is 'SevUser'
    - `voucherDate` string, date-time, nullable — Needs to be provided as timestamp or dd.mm.yyyy
    - `supplier` object, nullable — The contact used in the voucher as a supplier.<br> If you don't have a contact as a supplier, you can set this object to null.
      - `id` string, required — Unique identifier of the contact
      - `objectName` string, required — Model name, which is 'Contact'
    - `supplierName` string, nullable — The supplier name.<br> The value you provide here will determine what supplier name is shown for the voucher in case you did not provide a supplier.
    - `description` string, nullable — The description of the voucher. Essentially the voucher number.
    - `document` object, nullable — The document of the voucher.
      - `id` string, required — Unique identifier of the document
      - `objectName` string, required — Model name, which is 'Document'
    - `payDate` string, date-time, nullable — Needs to be timestamp or dd.mm.yyyy
    - `status` '50' | '100' | '1000', nullable — Please have a look in <a href='#tag/Voucher/Types-and-status-of-vouchers'>status of vouchers</a> to see what the different status codes mean
    - `sumNet` string — Net sum of the voucher
    - `sumTax` string — Tax sum of the voucher
    - `sumGross` string — Gross sum of the voucher
    - `sumNetAccounting` string — Net accounting sum of the voucher. Is usually the same as sumNet
    - `sumTaxAccounting` string — Tax accounting sum of the voucher. Is usually the same as sumTax
    - `sumGrossAccounting` string — Gross accounting sum of the voucher. Is usually the same as sumGross
    - `sumDiscounts` string — Sum of all discounts in the voucher
    - `sumDiscountsForeignCurrency` string — Discounts sum of the voucher in the foreign currency
    - `paidAmount` number, nullable — Amount which has already been paid for this voucher by the customer
    - `taxRule` object — **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).**
      - `id` '1' | '2' | '3' | '4' | '5' | '11', required — **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** Defines the vat-regulation. For "Regelbesteuerung" it can be one of: - `1` - Umsatzsteuerpflichtige Umsätze (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "default"` - `2` - Ausfuhren (tax rates: 0.0) - `3` - Innergemeinschaftliche Lieferungen (tax rates: 0.0, 7.0, 19.0) - replaces `"taxType": "eu"` - `4` - Steuerfreie Umsätze §4 UStG (tax rates: 0.0) - `5` - Reverse Charge gem. §13b UStG (tax rates: 0.0) For small business owner ("Kleinunternehmer") it can be: - `11` - Steuer nicht erhoben nach §19UStG (tax rates: 0.0) - replaces `"taxType": "ss"`
      - `objectName` 'TaxRule', required — Name of the object. Must always be TaxRule
    - `taxType` string, nullable — **Use this in sevdesk-Update 1.0 (instead of taxRule).** Tax type of the voucher. 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.
    - `creditDebit` 'C' | 'D', nullable — Defines if your voucher is a credit (C) or debit (D)
    - `costCentre` object — Cost centre for the voucher
      - `id` string, required — Unique identifier of the cost centre
      - `objectName` string, required — Model name, which is 'CostCentre'
    - `voucherType` 'VOU' | 'RV', nullable — Type of the voucher. For more information on the different types, check <a href='#tag/Voucher/Types-and-status-of-vouchers'>this</a>
    - `currency` string, nullable — specifies which currency the voucher should have. Attention: If the currency differs from the default currency stored in the account, then either the "propertyForeignCurrencyDeadline" or "propertyExchangeRate" parameter must be specified. If both parameters are specified, then the "propertyForeignCurrencyDeadline" parameter is preferred
    - `propertyForeignCurrencyDeadline` string, date-time, nullable — Defines the exchange rate day and and then the exchange rate is set from sevdesk. Needs to be provided as timestamp or dd.mm.yyyy
    - `propertyExchangeRate` string, nullable — Defines the exchange rate
    - `recurringInterval` 'P0Y0M1W' | 'P0Y0M2W' | 'P0Y1M0W' | 'P0Y3M0W' | 'P0Y6M0W' | 'P1Y0M0W' | 'P2Y0M0W' | 'P3Y0M0W' | 'P4Y0M0W' | 'P5Y0M0W', nullable — The DateInterval in which recurring vouchers are generated.<br> Necessary attribute for all recurring vouchers.
    - `recurringStartDate` string, date-time, nullable — The date when the recurring vouchers start being generated.<br> Necessary attribute for all recurring vouchers.
    - `recurringNextVoucher` string, date-time, nullable — The date when the next voucher should be generated.<br> Necessary attribute for all recurring vouchers.
    - `recurringLastVoucher` string, date-time, nullable — The date when the last voucher was generated.
    - `recurringEndDate` string, date-time, nullable — The date when the recurring vouchers end being generated.<br> Necessary attribute for all recurring vouchers.
    - `enshrined` string, date-time — Enshrined vouchers cannot be changed. Can only be set via [Voucher/{voucherId}/enshrine](#tag/Voucher/operation/voucherEnshrine). This operation cannot be undone.
    - `taxSet` object, nullable — **Use this in sevdesk-Update 2.0 (replaces taxType / taxSet).** Tax set of the voucher. Needs to be added if you chose the taxType=custom.
      - `id` string, required — Unique identifier of the object
      - `objectName` string, required — Model name, which is 'TaxSet'
    - `paymentDeadline` string, date-time, nullable — Payment deadline of the voucher.
    - `deliveryDate` string, date-time — Needs to be provided as timestamp or dd.mm.yyyy
    - `deliveryDateUntil` string, date-time, nullable — Needs to be provided as timestamp or dd.mm.yyyy
  - `voucherPos` ModelVoucherPosResponse[]
    - `id` string — The voucher position id
    - `objectName` string — The voucher position object name
    - `create` string — Date of voucher position creation
    - `update` string — Date of last voucher position update
    - `sevClient` object — Client to which voucher position belongs. Will be filled automatically
      - `id` string, required — Unique identifier of the client
      - `objectName` string, required — Model name, which is 'SevClient'
    - `voucher` object, required — The voucher to which the position belongs.
      - `id` string, required — Unique identifier of the voucher
      - `objectName` string, required — Model name, which is 'Voucher'
    - `accountDatev` object, required — <b>Use this in sevdesk-Update 2.0 (replaces accountingType).</b> The account datev to which the position belongs.<br> An account datev is the booking account to which the position belongs.<br> For more information, please refer to <a href='#tag/Voucher/Account-Datev'>this</a> section.
      - `id` integer, required — Unique identifier of the account datev
      - `objectName` string, required — Model name, which is 'AccountDatev'
    - `accountingType` object, required — The accounting type to which the position belongs.<br> An accounting type is the booking account to which the position belongs.<br> For more information, please refer to <a href='#tag/Voucher/Accounting-type'>this</a> section.
      - `id` string, required — Unique identifier of the accounting type
      - `objectName` string, required — Model name, which is 'AccountingType'
    - `estimatedAccountingType` object — The accounting type to which the position belongs estimated by our voucher recognition.<br> An accounting type is the booking account to which the position belongs.<br> For more information, please refer to <a href='#tag/Voucher/Accounting-type'>this</a> section.
      - `id` string, required — Unique identifier of the accounting type
      - `objectName` string, required — Model name, which is 'AccountingType'
    - `taxRate` string, required — Tax rate of the voucher position.
    - `net` boolean, required — Determines whether 'sumNet' or 'sumGross' is regarded.<br> If both are not given, 'sum' is regarded and treated as net or gross depending on 'net'. All positions must be either net or gross, a mixture of the two is not possible.
    - `isAsset` boolean — Determines whether position is regarded as an asset which can be depreciated.
    - `sumNet` string, required — Net sum of the voucher position.<br> Only regarded if 'net' is 'true', otherwise its readOnly.
    - `sumTax` string — Tax sum of the voucher position.
    - `sumGross` string, required — Gross sum of the voucher position.<br> Only regarded if 'net' is 'false', otherwise its readOnly.
    - `sumNetAccounting` string — Net accounting sum. Is equal to sumNet.
    - `sumTaxAccounting` string — Tax accounting sum. Is equal to sumTax.
    - `sumGrossAccounting` string — Gross accounting sum. Is equal to sumGross.
    - `comment` string, nullable — Comment for the voucher position.
  - `filename` string, binary — Filename of a previously upload file which should be attached.

## Other responses

- `400` — Bad request
- `401` — Authentication required
- `422` — Validation error
- `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)
