cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cant Load Contacts Using API_MKT_CONTACT_SRV

0 Likes
740

Hi Experts,

I am trying to upload contacts using postman but i am getting the following error

Batch request payload is invalid

Body:

--batch Content-Type: multipart/mixed; boundary=changeset_1 --changeset_1 content-type: application/http content-transfer-encoding: binary PUT ContactOriginData(ContactID='2004',ContactOrigin='SAP_ODATA_IMPORT') HTTP/1.1 Content-Length: 1035 Accept: application/json Sap-Cuan-RequestTimestamp: '2021-08-12T16:30:00' Sap-Cuan-SourceSystemType: EXT Sap-Cuan-SourceSystemId: HYBRIS Content-Type: application/json { "ContactOrigin" :"SAP_ODATA_IMPORT", "ContactID" : "2004", "EmailAddress" :"elengonz@gmail.com" } --changeset_1-- --batch-

image-2021-08-12-164245.png

Can anyone help?

Regards

Accepted Solutions (1)

Accepted Solutions (1)

SCHNEIDERT
Active Contributor

Hi Kevin,

can you please try to add ;boundary=batch after multipart/mixed for the Content-Type in the header?

That it looks like that: multipart/mixed;boundary=batch

Kind Regards

Tobias

0 Likes

Thanks so much Tobias!! now is working 🙂

Answers (1)

Answers (1)

former_member226
Employee
Employee

Hi,

In addition to what Tobias has suggested, pls also make sure that your payload is structured as in help documentation https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/2108.500/en-US/39e1b76b82274b5697ff629d... .

Batch payload is always line break sensitive therefore please respect the line break that are in documentation above for batch payload.

0 Likes

Thanks Saurabh I have also the issue with the line breaks but now is working!!!