I treid the same with the http-node
this ist the body:
{
"invoice": {
"objectName": "Invoice",
"invoiceNumber": "DRAFT-2023-001",
"invoiceDate": "2023-05-16",
"contact": {
"id": 76147211
},
"invoiceType": "RE",
"currency": "EUR"
},
"positions": [
{
"unity": {
"id": 1
},
"taxRate": 19.0,
"objectName": "Position 1",
"quantity": 2,
"price": 50
},
{
"unity": {
"id": 1
},
"taxRate": 7.0,
"objectName": "Position 2",
"quantity": 1,
"price": 80
},
{
"unity": {
"id": 1
},
"taxRate": 19.0,
"objectName": "Position 3",
"quantity": 3,
"price": 25
}
],
"taxSet": {
"id": 89398,
"objectName": "TaxSet"
}
}
this is the error:
Full message
500 - "{\"objects\":null,\"error\":{\"message\":\"App\\\\InvoiceValidation\\\\BuhaTypeRestrictions::__construct(): Argument #1 ($invoiceType) must be of type string, null given, called in \\/sevserver\\/apps\\/sevdesk\\/application\\/models\\/Invoice.php on line 2268\",\"code\":null,\"data\":null,\"exceptionUUID\":\"faf07cee-f15e-4f21-bffb-eb05ec30e053\"}}"
Request
{ "headers": { "authorization": "---", "accept": "application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7" }, "method": "POST", "uri": "https://my.sevdesk.de/api/v1/Invoice", "gzip": true, "rejectUnauthorized": true, "followRedirect": true, "resolveWithFullResponse": true, "followAllRedirects": true, "timeout": 300000, "body": { "invoice": { "objectName": "Invoice", "invoiceNumber": "DRAFT-2023-001", "invoiceDate": "2023-05-16", "contact": { "id": 76147211 }, "invoiceType": "RE", "currency": "EUR" }, "positions": [ { "unity": { "id": 1 }, "taxRate": 19, "objectName": "Position 1", "quantity": 2, "price": 50 }, { "unity": { "id": 1 }, "taxRate": 7, "objectName": "Position 2", "quantity": 1, "price": 80 }, { "unity": { "id": 1 }, "taxRate": 19, "objectName": "Position 3", "quantity": 3, "price": 25 } ], "taxSet": { "id": 89398, "objectName": "TaxSet" } }, "encoding": null, "json": false, "useStream": true }
the invoice type is defined here:
https://api.sevdesk.de/#tag/Invoice/Attributes-of-an-invoice