on ‎2020 Mar 14 10:09 AM
Hello experts,
I'm trying to find the way to update whole message through the API after it was updated in SAP Content Studio.
I create a message using endpoint API_MKT_CAMPAIGN_MESSAGE_SRV/Messages . Now in SAP Content Studio in my message I can see 4 blocks BODY, SUBJECT, TEXT and block "Header", all the styles that i have in <head></head> tag were moved to block "Header".
After that I changed the settings of message in SAP Content Studio (i added Sender Profile).
After that I tried to update whole message through the API using API_MKT_CAMPAIGN_MESSAGE_SRV/MessageContents and got an error saying:
{"error":{"code":"CL_API_MKT_CPG_MSG/010","message":{"lang":"en","value":"Message content can only be created for new messages."},"innererror":{"application":{"component_id":"CEC-MKT-API","service_namespace":"/SAP/","service_id":"API_MKT_CAMPAIGN_MESSAGE_SRV","service_version":"0001"},"transactionid":"E5F97D06BC1305C0E005E6320F6951E2","timestamp":"20200313160454.8942580","Error_Resolution":{"SAP_Transaction":"For backend administrators: use ADT feed reader \"SAP Gateway Error Log\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details","SAP_Note":"See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"},"errordetails":[{"code":"CL_API_MKT_CPG_MSG/010","message":"Message content can only be created for new messages.","propertyref":"","severity":"error","transition":false,"target":""}]}}}
So this error means that I can't update a whole message through the API using this endpoint API_MKT_CAMPAIGN_MESSAGE_SRV/MessageContents after it was updated in SAP Content Studio.
Another way to update content is using API_MKT_CAMPAIGN_MESSAGE_SRV/BlockContents endpoint. If you want to update the message you need to get all blocks first and then update content of the blocks. In SAP Content Studio in my message I can see 4 blocks BODY, SUBJECT, TEXT and block "Header". But using this endpoint I can see only three of them /API_MKT_CAMPAIGN_MESSAGE_SRV/Blocks(guid'00163e38-c29e-1ee9-86e4-e93a112161a1')/MessageBlockContent... BODY, SUBJECT, TEXT. I can update three of them, but I can't update block "Header" where all my styles was moved during creation process.
How can I update whole message (with my styles that was automatically moved to block "Header" during creation) or reupload it through the API after it was updated in SAP Content Studio?
Thank you.
Request clarification before answering.
SAP has patch endpoint (i haven't seen it in documentation) And you can update existing email after it was changed in Content Studio.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.