Templates

Allows clients to produce/render content from existing templates for things like emails and documents. Custom branding and dynamic fields can be injected into templates to render emails, documents and paragraphs.

Render template

Securityoauth2 or bearerAuth or apiKeyHeader
Request
query Parameters
fmt
string
Default: "html"

The desired output format.

Enum: "text" "html" "pdf"
Request Body schema: application/json

Template selectors and the data

subject
required
string

The subject of the interaction. This is relevant only if the interaction was rendered from a Peach template.

Enum: "annualPrivacyPolicyNotice" "autopayAgreement" "autopayAmountChanged" "autopayCanceledBySystem" "autopayEnabled" "autopayEnableReminder" "autopayPaymentCanceled" "autopayPaymentMethodUpdated" "autopayPaymentReminder" "autopayPaymentRescheduled" "cardExpiresReminder" "caseEscalation" "ceaseCommunicationAcknowledgement" "ceaseCommunicationRefuseToPay" "confirmationCode" "contactTakeover" "creditNegativeInfoReported" "creditPositiveInfoReported" "custom1" "custom2" "custom3" "custom4" "custom5" "custom6" "custom7" "custom8" "custom9" "custom10" "custom11" "custom12" "custom13" "custom14" "custom15" "custom16" "custom17" "custom18" "custom19" "custom20" "debtValidationNotice" "debtValidationNoticeArizona" "debtValidationNoticeAutomatic" "debtValidationNoticeNYCYonkers" "debtValidationNoticePuertoRico" "deceasedConfirmationOfPayoff" "deceasedNoticeToRepresentative" "deceasedNotificationUponDeath" "disputeOfDebtConfirmed" "disputeOfDebtSubmitDocumentation" "disputeOfDebtSubmitDocumentationReminder" "disputeOfDebtUnableToConfirm" "disputeOfDebtUnableToResolve" "documentUploadFailed" "downpaymentFailed" "electronicConsentOptOut" "freeForm" "freeFormBranded" "futurepayCanceled" "futurepayPaymentDueReminder" "identityTheftIncompleteDocumentation" "identityTheftNotValidated" "identityTheftSubmitDocumentation" "identityTheftSubmitDocumentationFirstReminder" "identityTheftSubmitDocumentationSecondReminder" "identityTheftValidated" "loanAccelerated" "loanCanceled" "loanChargedOffUnsecured" "loanDetails" "loanFeeCharged" "loanFreeze" "loanManualPaymentDisclosure" "loanOverdueFifthNotice" "loanOverdueFirstNotice" "loanOverdueFourthNotice" "loanOverdueSecondNotice" "loanOverdueSixthNotice" "loanOverdueThirdNotice" "loanPaidOff" "loanPaymentScheduleChanged" "loanPayoffStatement" "loanRefundProcessed" "loanRightToCurePersonalUnsecured" "loanTermsChangeAgreement" "loanUnfreeze" "locCreditLimitChanged" "locInterestRateChanged" "locLineClosed" "locStatementGenerated" "locStatementRegenerated" "loginFirstPaymentReminder" "microdepositFailed" "microdepositReminder" "oneTimeCode" "paydayConsumerRightsNotice" "paydayFirstPaymentWithdrawal" "paymentDueDateReminder" "paymentFailed" "paymentProcessing" "paymentReversalFailed" "paymentReversalProcessing" "paymentSuccessful" "payoffStatementDocument" "promoProgramCanceled" "promoProgramEligibilityAtRisk" "promoProgramExercised" "promoProgramReminder" "reimbursementFailed" "reimbursementProcessed" "reimbursementScheduled" "scraApplicationDenied" "scraBenefitsApplied" "scraBenefitsExpiringNotice" "scraCGFlaggedDocumentRequest" "scraServicemanNotifiedDocumentRequest" "settlementOffer" "settlementOfferFirstReminder" "statement" "statementLOC" "unmonitoredEmailAddress" "updateBankAccountConnection"
channel
required
string

Templates with the same subject can have multiple versions per channel. For example: paymentFailed can have email and text message (aka SMS) versions.

Enum: "email" "text" "mail" "gui" "document"
personId
required
string

The unique identifier of the Borrower. Can be Peach or a lender's external identifier. The borrower attributes will be used as dynamic fields in the template.

loanId
string

The unique identifier of the Loan. Can be Peach or lender's external identifier. The loan attributes will be used as dynamic fields in the template.

caseId
string

The unique identifier of the Case. Can be Peach or lender's external identifier. The case attributes will be used as dynamic fields in the template.

context
object

The data that is necessary to render the template in JSON format. It's a mapping of dynamic field names to values. Keep in mind that attributes of Borrower, Loan, Case or Statement objects don't need to be passed again if provided in personId, loanId, caseId or statementId.

Example:

{
  "dateSigned": "Aug 27, 2021"
  "lenderName": "Peachy Lender"
  "paymentMethod": "bankAccount"
  "paymentMethodLastFour": "1110"
  "supportEmail": "support@peach.com"
  "supportPhone": "888-888-8888"
}
Responses
200

OK

post/communicator/render
Request samples
application/json
{
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "email",
  • "personId": "string",
  • "loanId": "string",
  • "caseId": "string",
  • "context": { }
}

Render template to document

Securityoauth2 or bearerAuth or apiKeyHeader
Request
query Parameters
fmt
string
Default: "html"

The desired output format.

Enum: "text" "html" "pdf"
Request Body schema: application/json

Template selectors, context and the document ID

subject
required
string

The subject of the interaction. This is relevant only if the interaction was rendered from a Peach template.

Enum: "annualPrivacyPolicyNotice" "autopayAgreement" "autopayAmountChanged" "autopayCanceledBySystem" "autopayEnabled" "autopayEnableReminder" "autopayPaymentCanceled" "autopayPaymentMethodUpdated" "autopayPaymentReminder" "autopayPaymentRescheduled" "cardExpiresReminder" "caseEscalation" "ceaseCommunicationAcknowledgement" "ceaseCommunicationRefuseToPay" "confirmationCode" "contactTakeover" "creditNegativeInfoReported" "creditPositiveInfoReported" "custom1" "custom2" "custom3" "custom4" "custom5" "custom6" "custom7" "custom8" "custom9" "custom10" "custom11" "custom12" "custom13" "custom14" "custom15" "custom16" "custom17" "custom18" "custom19" "custom20" "debtValidationNotice" "debtValidationNoticeArizona" "debtValidationNoticeAutomatic" "debtValidationNoticeNYCYonkers" "debtValidationNoticePuertoRico" "deceasedConfirmationOfPayoff" "deceasedNoticeToRepresentative" "deceasedNotificationUponDeath" "disputeOfDebtConfirmed" "disputeOfDebtSubmitDocumentation" "disputeOfDebtSubmitDocumentationReminder" "disputeOfDebtUnableToConfirm" "disputeOfDebtUnableToResolve" "documentUploadFailed" "downpaymentFailed" "electronicConsentOptOut" "freeForm" "freeFormBranded" "futurepayCanceled" "futurepayPaymentDueReminder" "identityTheftIncompleteDocumentation" "identityTheftNotValidated" "identityTheftSubmitDocumentation" "identityTheftSubmitDocumentationFirstReminder" "identityTheftSubmitDocumentationSecondReminder" "identityTheftValidated" "loanAccelerated" "loanCanceled" "loanChargedOffUnsecured" "loanDetails" "loanFeeCharged" "loanFreeze" "loanManualPaymentDisclosure" "loanOverdueFifthNotice" "loanOverdueFirstNotice" "loanOverdueFourthNotice" "loanOverdueSecondNotice" "loanOverdueSixthNotice" "loanOverdueThirdNotice" "loanPaidOff" "loanPaymentScheduleChanged" "loanPayoffStatement" "loanRefundProcessed" "loanRightToCurePersonalUnsecured" "loanTermsChangeAgreement" "loanUnfreeze" "locCreditLimitChanged" "locInterestRateChanged" "locLineClosed" "locStatementGenerated" "locStatementRegenerated" "loginFirstPaymentReminder" "microdepositFailed" "microdepositReminder" "oneTimeCode" "paydayConsumerRightsNotice" "paydayFirstPaymentWithdrawal" "paymentDueDateReminder" "paymentFailed" "paymentProcessing" "paymentReversalFailed" "paymentReversalProcessing" "paymentSuccessful" "payoffStatementDocument" "promoProgramCanceled" "promoProgramEligibilityAtRisk" "promoProgramExercised" "promoProgramReminder" "reimbursementFailed" "reimbursementProcessed" "reimbursementScheduled" "scraApplicationDenied" "scraBenefitsApplied" "scraBenefitsExpiringNotice" "scraCGFlaggedDocumentRequest" "scraServicemanNotifiedDocumentRequest" "settlementOffer" "settlementOfferFirstReminder" "statement" "statementLOC" "unmonitoredEmailAddress" "updateBankAccountConnection"
channel
required
string

Templates with the same subject can have multiple versions per channel. For example: paymentFailed can have email and text message (aka SMS) versions.

Enum: "email" "text" "mail" "gui" "document"
personId
required
string

The unique identifier of the Borrower. Can be Peach or a lender's external identifier. The borrower attributes will be used as dynamic fields in the template.

loanId
string

The unique identifier of the Loan. Can be Peach or lender's external identifier. The loan attributes will be used as dynamic fields in the template.

caseId
string

The unique identifier of the Case. Can be Peach or lender's external identifier. The case attributes will be used as dynamic fields in the template.

context
object

The data that is necessary to render the template in JSON format. It's a mapping of dynamic field names to values. Keep in mind that attributes of Borrower, Loan, Case or Statement objects don't need to be passed again if provided in personId, loanId, caseId or statementId.

Example:

{
  "dateSigned": "Aug 27, 2021"
  "lenderName": "Peachy Lender"
  "paymentMethod": "bankAccount"
  "paymentMethodLastFour": "1110"
  "supportEmail": "support@peach.com"
  "supportPhone": "888-888-8888"
}
statementId
string

The unique identifier of the Statement. Can be Peach or lender's external identifier. The statement attributes will be used as dynamic fields in the template.

documentId
required
string

The unique identifier of the Document Descriptor. Can be Peach or lender's external identifier. The rendered content will create a file in HTML or text format and associate it with the documentId. To convert the rendered document to PDF please use another endpoint, convert_person_document, as an extra step.

Responses
200

OK

post/communicator/render-to-document
Request samples
application/json
{
  • "subject": "annualPrivacyPolicyNotice",
  • "channel": "email",
  • "personId": "string",
  • "loanId": "string",
  • "caseId": "string",
  • "context": { },
  • "statementId": "string",
  • "documentId": "string"
}