Ich versuche über die sync API cross-selling anzulegen, was nicht korrekt klappt.
Leider habe ich bisher keine Beispiele gefunden, hat jemand eine Idee?
Nachstehend der Request:
{
"writecrossselling": {
"entity":"product",
"action":"upsert",
"payload":[
{
"id":"0198139ce7c371af804238229d90244d",
"crossSellings": {
"1": {
"name": "Test",
"type": "productList",
"active": true,
"sortBy": "name"
}
},
"crossSellingAssignedProducts":{
"1": {
"productId":"0192910d8ef6703ea1e7fad665f59c79",
"position":1
},
"2": {
"productId":"019363411d267302baa5fb16abed6d80",
"position":2
}
}
}
]
}
}
Die Kategorie wird angelegt, aber im Backend sind die zugeordneten Produkte nicht zu sehen.
Eine Abfrage der zugeordneten Produkte ergibt, dass es zwei Produkte gibt,
jedoch sind es 2x die productId des aktualisierten Produkts und nicht die der Cross-Selling Produkte.
{
"data": [{
"id": "019813deee567187974b5b772a38bcd0",
"type": "product_cross_selling_assigned_products",
"attributes": {
"crossSellingId": "019813deee557266a9305c009fd43ce0",
"productId": "0198139ce7c371af804238229d90244d",
"productVersionId": null,
"position": 1,
"createdAt": "2025-07-16T15:33:53.884+00:00",
"updatedAt": null,
"apiAlias": "product_cross_selling_assigned_products_foreign_keys_extension"
},
{
"id": "019813deee567187974b5b772a7727a0",
"type": "product_cross_selling_assigned_products",
"attributes": {
"crossSellingId": "019813deee557266a9305c009fd43ce0",
"productId": "0198139ce7c371af804238229d90244d",
"productVersionId": null,
"position": 2,
"createdAt": "2025-07-16T15:33:53.884+00:00",
"updatedAt": null,
"apiAlias": "product_cross_selling_assigned_products_foreign_keys_extension"
},
}
}]
}