Moin zusammen,
ich versuche aktuell eine Bestellung mit der Admin API zu erstellen, bekomme dabei aber einen Fehler.
Mein Body sieht wie folgt aus:
{
"orderNumber": "TestOrder3",
"salesChannelId": "XXXX",
"orderCustomer": {
"customerNumber": "TestUser34",
"salutationId": "XXXXX",
"firstName": "TestVorname23",
"lastName": "TestName233",
"email": "XXXXXX",
"defaultBillingAddress":
{
"firstName": "TestVorname",
"lastName":"TestName",
"street": "Teststraße 10",
"zipcode": "212323",
"city": "Teststadt",
"countryId": "XXXXXX"
},
"defaultShippingAddress":
{
"firstName": "TestVorname",
"lastName":"TestName",
"street": "Teststraße 10",
"zipcode": "212323",
"city": "Teststadt",
"countryId": "XXXXXXXX"
},
"guest": true
},
"billingAddress":{
"salutationId": "XXXXXXXXX",
"firstName": "TestVorname",
"lastName":"TestName",
"street": "Teststraße 10",
"zipcode": "212323",
"city": "Teststadt",
"countryId": "XXXXXXXXXXX"
},
"orderDateTime": "30-06-2022 02:34:56",
"stateId": "XXXXXXXXXXXXX",
"currencyId": "XXXXXXXXXX",
"currencyFactor": "1.0",
"lineItems": [
{
"identifier": "SKU1232323",
"label": "Test Produkt1",
"quantity": 1,
"price": {
"quantity": 1,
"taxRules":{
"taxRate": 19.0,
"percentage": 100.0
},
"calculatedTaxes": {
"tax": 19.00,
"taxRate": 19.0,
"price": 20.00
},
"unitPrice": 20.00,
"totalPrice": 20.00
}
}
]
}
Folgenden Fehler bekomme ich:
{
"errors": [
{
"code": "0",
"status": "500",
"title": "Internal Server Error",
"detail":"An exception occurred while executing 'INSERT INTO `order` (`id`, `version_id`, `billing_address_id`, `billing_address_version_id`, `currency_id`, `language_id`, `sales_channel_id`, `state_id`, `order_number`, `order_date_time`, `currency_factor`, `created_at`) VALUES ('XXXXXXXX','XXXXXXXX','XXXXXXXX','XXXXXXXX','XXXXXXXX','XXXXXXXX','XXXXXXXX','XXXXXXXX','TestOrder3','2022-06-30 02:34:56.000','1','2022-07-16 08:40:39.179');':\n\nSQLSTATE[23000]: Integrity constraint violation: 4025 CONSTRAINT `json.order.price` failed for `shopware`.`order`",
]
}
Kann mir einer sagen was ich falsch mache, habe versucht den Fehler selber zu finden. Komme aber einfach nicht drauf.
Danke! Mit freundlichen Grüßen
P.S.: Da der Stacktrace sehr lang ist, befindet er sich in den Posts darunter