Render the template and return as a JSON response.
It selects an appropriate Template Descriptor (matching subject, channel), and renders the active Template Version with the given context.
The three contents are returned in a single JSON response, they are contentHtml, contentText and subjectLine.
NOTE: This is different from the /render endpoints because it does not return a file but rather the simple text-respresentation of the rendered templates that would be used in rendering a file. It is generally easier to test and debug the rendered templates as JSON strings rather than, for instance a PDF file.
Template selectors and the data.
The channel where interactions with a borrower occur. For example, an outbound call with a borrower is considered a voice interaction.
DEPRECATED: The fax channel is deprecated: new interactions cannot be created with the fax channel. It will be removed from completely in the future.
The template version ID (like TV-AAAA-BBBB) or template descriptor ID (like TD-AAAA-BBBB) to use.
If a template descriptor is given, then the current template descriptor's activeVersionId is used.
This should be used in special cases where you do not want to use the implicit template selected by the subject and channel fields.
The subject of the interaction. The subject identifies the category of the content in the message.
Most subjects have an associated implicit theme. e.g., loanOverdueFirstNotice has a theme of opsCollDebt. For these subjects it is not necessary to specify a theme.
Some subjects like freeForm and custom<N> do not have an implicit theme. When using these subjects you must specify a theme.
DEPRECATED: locStatementGenerated and locStatementRegenerated are deprecated. They will be automatically converted into statementGenerated and statementRegenerated respectively. You should switch to use those subjects directly.
DEPRECATED: failedSettlementPeach is deprecated. This was always a subject used by the Peach application internally, and will no longer be used. Attempts to set this subject will be rejected with a 400 error.
- oauth2
- bearerAuth
- apiKeyHeader
curl -i -X POST \
https://sandboxapi.peach.finance/api/communicator/preview \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"caseId": "string",
"channel": "voice",
"context": {},
"loanId": "string",
"overrideTemplateId": "TV-AAAA-BBBB",
"personId": "string",
"subject": "annualPrivacyPolicyNotice"
}'{ "contentHtml": "string", "contentText": "string", "subjectLine": "string" }