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

How to update block "Header" in an existing email

Former Member
0 Kudos
262

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

silviabackes
Product and Topic Expert
Product and Topic Expert
0 Kudos

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