Ich klinke mich auch mal in diesen Thread mit ein. Ich bin auch gerade dabei, unsere WaWi an Shopware anzubinden. Beim Update eines Kunden bekomme ich ebenfalls die Meldung “This resource has no support for batch operations.”. Ich bin mir aber ziemlich sicher, dass ich beim PUT-Request KEIN Array an Shopware sende.
Beispiel (hier wird nur der Nachname und die Email-Adresse des Kunden geändert). Die folgenden Daten stammen aus Fiddler (um sicherzugehen, dass ich hier tatsächlich die transferierten Daten poste und nicht irgendwelche Variableninhalte aus meinem Code):
GET /api/customers/42
{ "data": {
"number": "",
"id": 42,
"changed": "2019-06-14T14:41:08+0200",
"paymentId": 5,
"groupKey": "w",
"shopId": 1,
"priceGroupId": null,
"encoderName": "bcrypt",
"hashPassword": "$2y$10$GNH/0CYl1xsZokCwjal2OuZnsdidNPIm8Rm.HFjjVOoIht..2zY56",
"active": true,
"email": "test@test.de",
"firstLogin": "2019-05-07T00:00:00+0200",
"lastLogin": "2019-06-14T14:41:51+0200",
"accountMode": 0,
"confirmationKey": "",
"sessionId": "gbdtra6upoiu5v5ir1pe5skp48",
"newsletter": 0,
"validation": "",
"affiliate": 0,
"paymentPreset": 0,
"languageId": "1",
"referer": "",
"internalComment": "",
"failedLogins": 0,
"lockedUntil": null,
"salutation": "mr",
"title": null,
"firstname": "Max",
"lastname": "Mustermann",
"birthday": null,
"doubleOptinRegister": false,
"doubleOptinEmailSentDate": null,
"doubleOptinConfirmDate": null,
"attribute": {
"id": 37,
"customerId": 42,
"alphaAllowedPaymentMethods": null
},
"defaultBillingAddress": {
"id": 40,
"company": null,
"department": null,
"salutation": "mr",
"firstname": "Max",
"title": null,
"lastname": "Mustermann",
"street": "Teststr. 1",
"zipcode": "12345",
"city": "Testingen",
"phone": null,
"vatId": null,
"additionalAddressLine1": null,
"additionalAddressLine2": null,
"countryId": 2,
"stateId": null,
"attribute": {
"id": 13,
"customerAddressId": 40,
"text1": null,
"text2": null,
"text3": null,
"text4": null,
"text5": null,
"text6": null
},
"country": {
"id": 2,
"name": "Deutschland",
"iso": "DE",
"isoName": "GERMANY",
"position": 1,
"description": "",
"taxFree": 0,
"taxFreeUstId": 0,
"taxFreeUstIdChecked": 0,
"active": true,
"iso3": "DEU",
"displayStateInRegistration": false,
"forceStateInRegistration": false,
"allowShipping": true,
"areaId": 3
},
"state": null
},
"paymentData": [],
"defaultShippingAddress": {
"id": 40,
"company": null,
"department": null,
"salutation": "mr",
"firstname": "Max",
"title": null,
"lastname": "Mustermann",
"street": "Teststr. 1",
"zipcode": "12345",
"city": "Testingen",
"phone": null,
"vatId": null,
"additionalAddressLine1": null,
"additionalAddressLine2": null,
"countryId": 2,
"stateId": null,
"attribute": {
"id": 13,
"customerAddressId": 40,
"text1": null,
"text2": null,
"text3": null,
"text4": null,
"text5": null,
"text6": null
},
"country": {
"id": 2,
"name": "Deutschland",
"iso": "DE",
"isoName": "GERMANY",
"position": 1,
"description": "",
"taxFree": 0,
"taxFreeUstId": 0,
"taxFreeUstIdChecked": 0,
"active": true,
"iso3": "DEU",
"displayStateInRegistration": false,
"forceStateInRegistration": false,
"allowShipping": true,
"areaId": 3
},
"state": null
}
},
"success": true
}
PUT /api/customers/
{
"id": 42,
"paymentId": 5,
"groupKey": "w",
"shopId": 1,
"encoderName": "bcrypt",
"hashPassword": "$2y$10$GNH/0CYl1xsZokCwjal2OuZnsdidNPIm8Rm.HFjjVOoIht..2zY56",
"active": true,
"email": "abc@xyz.de",
"firstLogin": "2019-05-07T00:00:00+0200",
"lastLogin": "2019-06-14T14:41:51+0200",
"accountMode": 0,
"confirmationKey": "",
"sessionId": "gbdtra6upoiu5v5ir1pe5skp48",
"newsletter": 0,
"validation": "",
"affiliate": 0,
"paymentPreset": 0,
"languageId": "1",
"referer": "",
"internalComment": "",
"failedLogins": 0,
"salutation": "mr",
"firstname": "Max",
"number": "",
"lastname": "Meier",
"attribute": {
"id": 37,
"customerId": 42
},
"defaultBillingAddress": {
"id": 40,
"salutation": "mr",
"firstname": "Max",
"lastname": "Mustermann",
"street": "Teststr. 1",
"zipcode": "12345",
"city": "Testingen",
"countryId": 2,
"attribute": {
"id": 13,
"customerAddressId": 40,
"text1": null,
"text2": null,
"text3": null,
"text4": null,
"text5": null,
"text6": null
},
"country": {
"id": 2,
"name": "Deutschland",
"iso": "DE",
"isoName": "GERMANY",
"position": 1,
"description": "",
"taxFree": 0,
"taxFreeUstId": 0,
"taxFreeUstIdChecked": 0,
"active": true,
"iso3": "DEU",
"displayStateInRegistration": false,
"forceStateInRegistration": false,
"areaId": 3
}
},
"paymentData": [],
"defaultShippingAddress": {
"id": 40,
"salutation": "mr",
"firstname": "Max",
"lastname": "Mustermann",
"street": "Teststr. 1",
"zipcode": "12345",
"city": "Testingen",
"countryId": 2,
"attribute": {
"id": 13,
"customerAddressId": 40,
"text1": null,
"text2": null,
"text3": null,
"text4": null,
"text5": null,
"text6": null
},
"country": {
"id": 2,
"name": "Deutschland",
"iso": "DE",
"isoName": "GERMANY",
"position": 1,
"description": "",
"taxFree": 0,
"taxFreeUstId": 0,
"taxFreeUstIdChecked": 0,
"active": true,
"iso3": "DEU",
"displayStateInRegistration": false,
"forceStateInRegistration": false,
"areaId": 3
}
}
}
Viele Grüße
Marcus