v1
latestOpenAPI 3.0.02026-07-1315476656.4 KBCreate a new invoice
This endpoint offers you the following functionality. <ul> <li>Create invoices together with positions and discounts</li> <li>Delete positions while adding new ones</li> <li>Delete or add discounts, or both at the same time</li> <li>Automatically fill the address of the supplied contact into the invoice address</li> </ul> To make your own request sample slimmer, you can omit all parameters which are not required and nullable. However, for a valid and logical bookkeeping document, you will also need some of them to ensure that all the necessary data is in the invoice.<br><br> The list of parameters starts with the invoice array.<br> This array contains all required attributes for a complete invoice.<br> Most of the attributes are covered in the invoice 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 invoice 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 invoice 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 four parameters invoicePosDelete, discountSave, discountDelete and takeDefaultAddress.<br> They only play a minor role if you only want to create an invoice but we will shortly explain what they can do.<br> With invoicePosDelete you have to option to delete invoice positions as this request can also be used to update invoices.<br> With discountSave you can add discounts to your invoice.<br> With discountDelete you can delete discounts from your invoice.<br> With takeDefaultAddress you can specify that the first address of the contact you are using for the invoice is taken for the invoice address attribute automatically, so you don't need to provide the address yourself.<br> If you want to know more about these parameters, for example if you want to use this request to update invoices, feel free to contact our support.<br><br> Finally, after covering all parameters, they only important information left, is that the order of the last four 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.<br><br> <b>Warning:</b> You can not create a regular invoice with the <b>deliveryDate</b> being later than the <b>invoiceDate</b>.<br> To do that you will need to create a so called <b>Abschlagsrechnung</b> by setting the <b>invoiceType</b> parameter to <b>AR</b>.
Request body
Example request
{
"invoice": {
"objectName": "Invoice",
"invoiceNumber": "RE-1000",
"contact": {
"objectName": "Contact"
},
"contactPerson": {
"objectName": "SevUser"
},
"sevClient": {
"objectName": "SevClient"
},
"invoiceDate": "01.01.2022",
"header": "Invoice RE-1000",
"headText": "header information",
"footText": "footer information",
"timeToPay": 20,
"address": "name\nstreet\npostCode city",
"addressCountry": {
"id": 1,
"objectName": "StaticCountry"
},
"createUser": {
"objectName": "SevUser"
},
"deliveryDate": "01.01.2022",
"status": "100",
"taxText": "Umsatzsteuer 19%",
"taxType": "default",
"taxSet": {
"id": "1",
"objectName": "TaxSet"
},
"paymentMethod": {
"id": 21919,
"objectName": "PaymentMethod"
},
"sendDate": "01.01.2020",
"invoiceType": "RE",
"currency": "EUR",
"enshrined": "2024-04-08T00:00:00+02:00",
"origin": {
"id": "1",
"objectName": "Order"
}
},
"invoicePosSave": [
{
"objectName": "InvoicePos",
"create": "01.01.2020",
"update": "01.01.2020",
"invoice": {
"objectName": "Invoice"
},
"part": {
"objectName": "Part"
},
"quantity": 1,
"price": 100,
"name": "Dragonglass",
"unity": {
"id": 1,
"objectName": "Unity"
},
"sevClient": {
"objectName": "SevClient"
},
"taxRate": 19,
"priceGross": 100
}
],
"discountSave": [
{
"objectName": "Discounts"
}
],
"discountDelete": {
"objectName": "Discounts"
}
}Response
Created - Returns created invoice
Example response
{
"invoice": {
"id": "1",
"objectName": "Invoice",
"invoiceNumber": "RE-1000",
"contact": {
"id": "1",
"objectName": "Contact"
},
"create": "2024-04-08T00:00:00+02:00",
"update": "2024-04-08T00:00:00+02:00",
"sevClient": {
"id": "1",
"objectName": "SevClient"
},
"invoiceDate": "2024-04-08T00:00:00+02:00",
"header": "My RE-1000",
"headText": "header information",
"footText": "footer information",
"timeToPay": "10",
"discountTime": "0",
"discount": "0",
"addressCountry": {
"id": "1",
"objectName": "StaticCountry"
},
"payDate": "2024-04-08T00:00:00+02:00",
"createUser": {
"id": "1",
"objectName": "SevUser"
},
"deliveryDate": "2024-04-08T00:00:00+02:00",
"status": "100",
"contactPerson": {
"id": "1",
"objectName": "SevUser"
},
"taxRate": "0",
"taxText": "Umsatzsteuer 19%",
"dunningLevel": "0",
"taxType": "default",
"paymentMethod": {
"id": "1",
"objectName": "PaymentMethod"
},
"costCentre": {
"id": "1",
"objectName": "CostCentre"
},
"sendDate": "2024-04-08T00:00:00+02:00",
"origin": {
"id": "1"
},
"invoiceType": "RE",
"accountIntervall": "2022-03-14",
"accountNextInvoice": "1647259198",
"reminderTotal": "0",
"reminderDebit": "0",
"reminderDeadline": "01.01.2020",
"reminderCharge": "0",
"taxSet": {
"id": "1",
"objectName": "TaxSet"
},
"address": "name\nstreet\npostCode city",
"currency": "EUR",
"sumNet": "100",
"sumTax": "19",
"sumGross": "119",
"sumDiscounts": "0",
"sumNetForeignCurrency": "0",
"sumTaxForeignCurrency": "0",
"sumGrossForeignCurrency": "0",
"sumDiscountsForeignCurrency": "0",
"sumNetAccounting": "0",
"sumTaxAccounting": "0",
"sumGrossAccounting": "0",
"enshrined": "2024-04-08T00:00:00+02:00",
"deliveryDateUntil": "2024-04-08T00:00:00+02:00",
"sendPaymentReceivedNotificationDate": "0"
},
"invoicePos": [
{
"objectName": "InvoicePos",
"create": "01.01.2020",
"update": "01.01.2020",
"invoice": {
"id": "1",
"objectName": "Invoice"
},
"part": {
"id": "1",
"objectName": "Part"
},
"quantity": true,
"price": "100",
"name": "Dragonglass",
"unity": {
"id": "1",
"objectName": "Unity"
},
"sevClient": {
"id": "1",
"objectName": "SevClient"
},
"positionNumber": "0",
"discount": "0",
"taxRate": "19",
"sumDiscount": "0",
"sumNetAccounting": "0",
"sumTaxAccounting": "0",
"sumGrossAccounting": "0",
"priceNet": "0",
"priceGross": "100",
"priceTax": "0"
}
]
}