on 2020 Feb 27 3:04 PM
Hello experts,
I create a message using endpoint
/sap/opu/odata/sap/API_MKT_CAMPAIGN_MESSAGE_SRV/Messages
and this payload
payload ={
MessageName:title,
MessageType:"EM",
MarketingArea: marketing_area,
DefaultLanguage: default_language,
MessageContents:{results:[{
LanguageCode: default_language,
MessageContentHTMLString: html_content
}]}}
After that if I go to SAP Content Studio I can see 4 blocks BODY, SUBJECT, TEXT and block "Header"

I want to update block "Header" through the API.
1. I can get the UUID of the email using https://my301XXX-api.s4hana.ondemand.com/sap/opu/odata/sap/API_MKT_CAMPAIGN_MESSAGE_SRV/Messages?$to... and it will return me MessageUUID=guid'fa163e35-917e-1eda-94cb-505d685398b4'
2. Then I can make another GET call to retrieve message content in blocks https://my301XXX-api.s4hana.ondemand.com/sap/opu/odata/sap/API_MKT_CAMPAIGN_MESSAGE_SRV/MessageConte... . But this endpoint return only 3 blocks BODY, SUBJECT, TEXT
How can I find block "Header" and update it through the API?
Request clarification before answering.
Hi Sergei, Looks like that the block "Header" that you want to update is not really a block from technical point of view. It contains just the html-body and css data, as you for sure recognized.
Therefore you do not get it when you request the blocks of the Campaign Content.
The only way to manipulate over the API it is by uploading the html via entity type MessageContents but this action would rebuild all the blocks with the content of the html.
The other option is obviously direct editing in the editor. Kind regards, Silvia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.