Get an email template with evaluated tokens
post
/crmRestApi/resources/11.13.18.05/emailTemplates/action/getMergedEmailContent
This method evaluates all the tokens for the given template with the object key.
Request
Header Parameters
-
Metadata-Context:
If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
-
REST-Framework-Version:
The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Supported Media Types
- application/vnd.oracle.adf.action+json
Root Schema : schema
Type:
Show Source
object
-
inputMap: object
inputMap
Additional Properties Allowed: additionalPropertiesThe map with template number, language, and object key to evaluate all tokens.
Nested Schema : inputMap
Type:
object
Additional Properties Allowed
Show Source
The map with template number, language, and object key to evaluate all tokens.
Response
Supported Media Types
- application/json
- application/vnd.oracle.adf.actionresult+json
Default Response
The following table describes the default response for this task.
Root Schema : schema
Type:
Show Source
object
-
result(required): object
result
Additional Properties Allowed: additionalPropertiesReturns email template with all tokens evaluated.
Nested Schema : result
Type:
object
Additional Properties Allowed
Show Source
Returns email template with all tokens evaluated.
Examples
The following example shows how to get an email template with evaluated tokens by submitting a POST request on the REST resource using cURL.
cURL Command
curl -u
<username:password> \ -X PATCH
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/emailTemplates/action/getMergedEmailContent\
-H 'Content-Type: application/vnd.oracle.adf.action+json' |
json_pp
Example of Request Body
The following example shows the contents of the request body in JSON
format.
{ "inputMap": { "TemplateNumber": "MSGT-4002", "ObjectKey": "300100005481493", "Language": "US" } }
Example of Response Body
The following example shows the contents of the response body in JSON format.
{ "result": { "TemplateId": "300100570459592", "TemplateNumber": "MSGT-4002", "TemplateName": "TemplateOptyMar20th_3", "TemplateDescription": "TemplateOptyR1", "ObjectCode": "Lead", "TemplateActiveFlag": "Y", "EmailFormat": "HTML", "EmailSubject": "O365 Lead 300100005481493 a1 ", "EmailBody": "O365 opportunity", "CreatedBy": "SALES_ADMIN", "CreationDate": "2023-03-21 14:06:22.489", "LastUpdatedBy": "SALES_ADMIN", "LastUpdateDate": "2023-03-21 14:06:22.837" } }