v1

latestOpenAPI 3.0.02026-07-1315476656.4 KB
Voucher

Create a new voucher

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

post/Voucher/Factory/saveVoucher

Request body

filenamestring binary

Filename of a previously upload file which should be attached.

Example request

{
  "voucher": {
    "mapAll": true,
    "create": "01.01.2020",
    "update": "01.01.2020",
    "sevClient": {
      "objectName": "SevClient"
    },
    "createUser": {
      "objectName": "SevUser"
    },
    "voucherDate": "01.01.2022",
    "supplier": {
      "objectName": "Contact"
    },
    "supplierName": "John Snow",
    "description": "Voucher-1000",
    "payDate": "01.01.2022",
    "status": 50,
    "taxType": "default",
    "creditDebit": "C",
    "voucherType": "VOU",
    "currency": "EUR",
    "propertyForeignCurrencyDeadline": "01.01.2022",
    "propertyExchangeRate": 0.8912,
    "recurringStartDate": "01.01.2020",
    "recurringNextVoucher": "01.02.2020",
    "recurringLastVoucher": "01.01.2021",
    "recurringEndDate": "01.01.2021",
    "enshrined": "2024-04-08T00:00:00+02:00",
    "taxSet": {
      "objectName": "TaxSet"
    },
    "paymentDeadline": "01.01.2022",
    "deliveryDate": "01.01.2022",
    "deliveryDateUntil": "22.02.2022",
    "document": {
      "objectName": "Document"
    },
    "costCentre": {
      "objectName": "CostCentre"
    }
  },
  "voucherPosSave": [
    {
      "create": "01.01.2020",
      "update": "01.01.2020",
      "voucher": {
        "objectName": "Voucher"
      },
      "accountDatev": {
        "objectName": "AccountDatev"
      },
      "accountingType": {
        "objectName": "AccountingType"
      },
      "estimatedAccountingType": {
        "objectName": "AccountingType"
      },
      "taxRate": 19,
      "sumNet": 100,
      "sumTax": 19,
      "sumGross": 119
    }
  ]
}

Response

Created - Returns created voucher

filenamestring binary

Filename of a previously upload file which should be attached.

Example response

{
  "voucher": {
    "id": "0",
    "mapAll": true,
    "create": "01.01.2020",
    "update": "01.01.2020",
    "sevClient": {
      "id": "0",
      "objectName": "SevClient"
    },
    "createUser": {
      "id": "0",
      "objectName": "SevUser"
    },
    "voucherDate": "01.01.2020",
    "supplier": {
      "id": "0",
      "objectName": "Contact"
    },
    "supplierName": "John Snow",
    "description": "Voucher-1000",
    "document": {
      "id": "0",
      "objectName": "Document"
    },
    "payDate": "01.01.2020",
    "status": "50",
    "sumNet": "0",
    "sumTax": "0",
    "sumGross": "0",
    "sumNetAccounting": "0",
    "sumTaxAccounting": "0",
    "sumGrossAccounting": "0",
    "sumDiscounts": "0",
    "sumDiscountsForeignCurrency": "0",
    "taxType": "default",
    "creditDebit": "C",
    "costCentre": {
      "id": "0"
    },
    "voucherType": "VOU",
    "currency": "EUR",
    "propertyForeignCurrencyDeadline": "01.01.2022",
    "propertyExchangeRate": "0.8912",
    "recurringStartDate": "01.01.2020",
    "recurringNextVoucher": "01.02.2020",
    "recurringLastVoucher": "01.01.2021",
    "recurringEndDate": "01.01.2021",
    "enshrined": "2024-04-08T00:00:00+02:00",
    "taxSet": {
      "id": "0",
      "objectName": "TaxSet"
    },
    "paymentDeadline": "01.01.2020",
    "deliveryDate": "01.01.2020",
    "deliveryDateUntil": "01.01.2020"
  },
  "voucherPos": [
    {
      "id": "0",
      "create": "01.01.2020",
      "update": "01.01.2020",
      "sevClient": {
        "id": "0",
        "objectName": "SevClient"
      },
      "voucher": {
        "id": "0",
        "objectName": "Voucher"
      },
      "accountDatev": {
        "objectName": "AccountDatev"
      },
      "accountingType": {
        "id": "0",
        "objectName": "AccountingType"
      },
      "estimatedAccountingType": {
        "id": "0",
        "objectName": "AccountingType"
      },
      "taxRate": "19",
      "sumNet": "100",
      "sumTax": "19",
      "sumGross": "119",
      "sumNetAccounting": "0",
      "sumTaxAccounting": "0",
      "sumGrossAccounting": "0"
    }
  ]
}