Skip to Content
0
Dec 03, 2021 at 04:19 PM

SAP Marketing Cloud: Batch API_MKT_CONTACT_SRV Invalid Payload

93 Views Last edit Dec 03, 2021 at 04:21 PM 3 rev

Hey there. I am currently trying to set up some batch request to 1) create/update a contact 2) set the marketing area for the contact 3) set the permission for the contact.

However, I get the error "Batch request payload is invalid".

I am setting up the request in Postman for OData service API_MKT_CONTACT_SRV;v=0003.

X-csrf-token and content-type are defined in the headers:

headers.png

The body in Postman is set to raw (text):

--batch_01869434-0010

--changeset_695af0de-aa06-4fa7-a2d7-0abfebcde309
Content-Type: application/http
Content-Transfer-Encoding: binary

PUT ContactOriginData(ContactID='chris@patch.de',ContactOrigin='SAP_HYBRIS_CONSUMER') HTTP/1.1<br>Content-Type: application/json
Accept: application/json
{
"OriginDataLastChgUTCDateTime": "2021-12-03T16:58:56.040721",
"EmailAddress": "chris@patch.de",
"IsContact": true,
"FullName": "Chris Patch",
"FirstName": "Chris",
"LastName": "Patch",
"CityName": "München",
"EmailAddress": "chris@patch.de"
}

--changeset_695af0de-aa06-4fa7-a2d7-0abfebcde309
Content-Type: application/http
Content-Transfer-Encoding: binary

PATCH MarketingAreas(ContactID='chris@patch.de',ContactOrigin='SAP_HYBRIS_CONSUMER',InteractionContactMktgArea='DE') HTTP/1.1
Content-Type: application/json
Accept: application/json
{
}

--changeset_695af0de-aa06-4fa7-a2d7-0abfebcde309
Content-Type: application/http
Content-Transfer-Encoding: binary

PUT MarketingPermissions(ContactID='chris@patch.de',ContactOrigin='SAP_HYBRIS_CONSUMER',ContactPermissionID='chris@patch.de',ContactPermissionOrigin='EMAIL',MarketingArea='DE',CommunicationMedium='EMAIL') HTTP/1.1
Content-Type: application/json
Accept: application/json
{
"CommunicationMedium": "EMAIL", 
"ContactID": "chris@patch.de", 
"ContactOrigin": "SAP_HYBRIS_CONSUMER", 
"ContactPermissionID": "chris@patch.de", 
"ContactPermissionOrigin": "EMAIL", 
"MarketingArea": "DE", 
"PermissionUTCDateTime": "2021-12-03T16:58:56.040721", 
"PermissionGranted": "Y", 
"PermissionNoteText": "Permission via Webshop"
}

--batch_01869434-0010--

Does anyone see the issue?

Thank you!

Attachments

headers.png (4.8 kB)