R4M
9. Februar 2026 um 13:52
1
Bei der API-Abfrage mit ‚/api/search/order-address‘ stelle ich eben fest, dass hier die Angabe vom Lieferland fehlt (Feld country ist leer), obwohl die dazugehörige ID in der DB-Tabelle ‚order_address‘ steht.
Wie komme ich denn jetzt hier an das korrekte Lieferland wenn der Kunde ggf. mehrere Lieferadressen hat?
Country is eine Assoziation.
Wenn du diese haben möchtest, musst du diese nachladen.
Ausgehend von order, bei oder-address einfach anpassen.
{
"filter": [
{ "type": "equals", "field": "orderNumber", "value": "S10000" }
],
"associations": {
"deliveries": {
"associations": {
"shippingOrderAddress": {
"associations": {
"country": {},
"countryState": {}
}
}
}
},
"billingAddress": {
"associations": {
"country": {},
"countryState": {}
}
}
}
}
R4M
9. Februar 2026 um 14:25
3
Hätte jetzt angenommen das die gleich mit kommt, aber ich schau mal. Danke schon mal!
R4M
9. Februar 2026 um 14:40
4
Im Prinzip reicht schon das:
"associations": {
"country": {}, "countryState": {}
}
1 „Gefällt mir“
Assoziationen werden nie automatisch geladen, außer diese werden in den EntityDefinition explizit geladen.
In this guide you will learn how to add associations to your entities. Every possible kind of association will be covered here, so "One to One", "Many to One" or "One to Many" respectively, and "Many to many" associations. | Documentation for...
1 „Gefällt mir“