cancel
Showing results for 
Search instead for 
Did you mean: 

API testing

0 Kudos

Hello Experts,

We have a requirement to implement API_MKT_INTERACTION_SRV to create an interaction in Marketing cloud. Thsi API will be called by third party website. When i test the api using postman GET operation working fine but POST not working , getting an error 'The server is refusing to process the request because the entity has an unsupported format'.

I have used below url and payload

https://myxxxx-api.s4hana.ondemand.com/sap/opu/odata/sap/API_MKT_INTERACTION_SRV/$batch

{ "InteractionContactId":"12345",

"CommunicationMedium":"WEB",

"InteractionType":"WEBINAR"

}

Am i missing something? Please help.

Regards,

Ali.

Accepted Solutions (1)

Accepted Solutions (1)

dominic4
Active Participant
0 Kudos

Hello Ali,


you send a non batch payload to a batch endpoint.

Try to send it to

  {{protocol}}://{{url}}/sap/opu/odata/sap/API_MKT_INTERACTION_SRV/Interactions

because your Payload is an Interaction

A payload that works for me is

{
  "InteractionContactOrigin": "COOKIE_ID",
  "InteractionContactId": "cookieid1231231231231",
  "CommunicationMedium": "WEB",
  "InteractionType": "WEBSITE_SEARCH",
  "InteractionTimeStampUTC": "2018-08-28T12:12:27",
  "SourceSystemType": "CPI",
  "SourceSystem": "SAP Platform Integration",
  "MarketingArea":"XXXXX",
  "InteractionContent": "This is the content"
}

I think most of it is mandatory except for the last two lines in the json. You can see details in the SAP Marketing Cloud Integration Guide:

https://help.sap.com/viewer/0f9408e4921e4ba3bb4a7a1f75f837a7/1805.500/en-US/6322d15482854566a72f6c9f...

More:

https://help.sap.com/viewer/p/SAP_HYBRIS_MARKETING_CLOUD

Regards

Dominic

Hi Dominic,

Do you have any sample payload for Marketing permissions/contact's update using contact's api?

-Ali

Answers (2)

Answers (2)

Hi Dominic,

Many Thanks for your hlep. It worked for me.

-Ali.

dominic4
Active Participant
0 Kudos

Hello Ali,


it is a bit late but here is a working Payload to create Marketing Permissions with the CONTACTS API. In this case I make a newsletter subscription.

/sap/opu/odata/sap/API_MKT_CONTACT_SRV/MarketingPermissions

{

"ContactID" : "mail@xy.de",
"ContactOrigin" : "YOURORIGIN",
"ContactPermissionID" : "mail@xy.de",
"ContactPermissionOrigin" : "EMAIL",
"PermissionUTCDateTime" : "2018-10-01T08:17:00",
"ContactPermission" : "Y",
"CommunicationMedium" : "EMAIL",
"PermissionSourceCommMedium" : "SYSTEM",
"PermissionIsExplicit": true,
"IsConfirmationRequired" : true,
"CommunicationCategory": "29"
}

I hope that helps!

Best regards

Dominic