# Render template version

Render a file (`text`, `html` or `pdf`) from this Template Version and download it.
Only the content matching the `fmt` query parameter is returned in the file.
The rendered template file is then downloaded as an attachment. (i.e., a
response is sent with the header `Content-Disposition: attachment`.)
Note: that a Document Descriptor is NOT created.

Endpoint: POST /communicator/templates/{templateVersionId}/render
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `templateVersionId` (string, required)
    The Template Version ID.

## Query parameters:

  - `fmt` (string)
    The desired output format.

## Request fields (application/json):

  - `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.

  - `channel` (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"

  - `context` (any)

  - `context.company` (object)
    The company object represents a company of Peach which uses some of Peach's applications.

It contains metadata about the company and configuration settings for how the applications
should function.

  - `context.company.agentAuthType` (string)
    Enum: "basic", "google", "oneTimeCodeEmail", "oneTimeCodeText", "SAML"

  - `context.company.agentAuthValueType` (string)
    Enum: "email", "username", "phone", "samlSubjectNameId"

  - `context.company.appDomains` (array)

  - `context.company.appDomains.domain` (string)
    The company app domain

  - `context.company.appDomains.type` (string)
    Enum: "borrower", "agent", "help", "admin"

  - `context.company.bankruptcyPolicy` (boolean)

  - `context.company.bankruptcyServiceId` (integer)
    The service that will be used for bankruptcy monitoring (no monitoring if is null)

  - `context.company.brandName` (string)
    The name of the company for presentation to the end consumer—e.g., in emails.

  - `context.company.config` (object)
    The company configuration object is the main location to store configuration
settings to control the functionality and appearance of the Peach
applications which this company users.

  - `context.company.config.addressValidation` (string)
    Vendor to use for address validation.
    Enum: "smartyStreets", "googleMaps"

  - `context.company.config.allowPartialAddress` (boolean)
    If `true`, Address Line 1 is Optional, otherwise it is required for loans managed by Peach

  - `context.company.config.auth` (object)

  - `context.company.config.auth.saml` (object)

  - `context.company.config.auth.saml.metadataUrl` (any)

  - `context.company.config.auth.saml.metadataUrl.admin` (string)
    The metadata URL for the admin login SAML authentication
    Example: https://example.com/federationmetadata.xml?appid=123

  - `context.company.config.auth.saml.metadataUrl.agent` (string)
    The metadata URL for the agent login SAML authentication

  - `context.company.config.auth.saml.metadataUrl.borrower` (string)
    The metadata URL for the borrower login SAML authentication
    Example: https://example.com/federationmetadata.xml?appid=234

  - `context.company.config.auth.saml.nameIdFormat` (string)

  - `context.company.config.borrowerVerification` (object)

  - `context.company.config.borrowerVerification.crmDefaultTypeId` (string)
    The ID of the borrower verification type used when an agent initiates a borrower verification via the CRM.
The borrower verification type is the configuration which specifies how many of a particular type of verification question to ask when an agent verifies a borrower's identity.
    Example: VT-1234-ABDE

  - `context.company.config.brandAssets` (object)
    Brand assets and colors

  - `context.company.config.brandAssets.colors` (object)

  - `context.company.config.brandAssets.colors.button` (string)
    Hex color string (#000ccc) representing the button color

  - `context.company.config.brandAssets.colors.lighten` (string)
    Hex color string (#000ccc) representing the lighten color

  - `context.company.config.brandAssets.colors.link` (string)
    Hex color string (#000ccc) representing the link color

  - `context.company.config.brandAssets.colors.primary` (string)
    Hex color string (#000ccc) representing the primary color

  - `context.company.config.brandAssets.colors.secondButton` (string)
    Hex color string (#000ccc) representing the second button foreground color

  - `context.company.config.brandAssets.colors.secondButtonBackground` (string)
    Hex color string (#000ccc) representing the second button background color

  - `context.company.config.brandAssets.colors.secondary` (string)
    Hex color string (#000ccc) representing the secondary color

  - `context.company.config.brandAssets.colors.tertiary` (string)
    Hex color string (#000ccc) representing the tertiary color

  - `context.company.config.brandAssets.copies` (object)

  - `context.company.config.brandAssets.copies.consent` (string)
    HTML of the consent appearing in the footer

  - `context.company.config.brandAssets.copies.disclosures` (string)
    HTML of the disclosures appearing in the footer

  - `context.company.config.brandAssets.logos` (object)

  - `context.company.config.brandAssets.logos.appCompactNavigation` (string)
    URL for the compact/mobile navigation logo. Recommended dimensions: 200×32px.

  - `context.company.config.brandAssets.logos.appLargeCentered` (string)
    URL for the large centered logo (e.g. login, document upload). Recommended dimensions: 400×64px.

  - `context.company.config.brandAssets.logos.appRegularNavigation` (string)
    URL for the desktop navigation logo. Recommended dimensions: 304×48px.

  - `context.company.config.brandAssets.logos.primary` (string)
    URL To the primary logo

  - `context.company.config.brandAssets.logos.small` (string)
    URL to the small logo

  - `context.company.config.collections` (object)

  - `context.company.config.collections.autoClose` (object)

  - `context.company.config.collections.autoClose.closeOnlyWhenPaidOff` (boolean)
    If true, keep the collection case open even when the overdue loan is charged off or frozen.

  - `context.company.config.collections.autoClose.enabled` (boolean)

  - `context.company.config.collections.autoInitiate` (object)

  - `context.company.config.collections.autoInitiate.collectionCaseTypeId` (string)
    Public ID of the case type to be used when creating a new collection case.

  - `context.company.config.collections.autoInitiate.enableReviewTask` (boolean)
    By default, when a collection case is created automatically, a task of type `reviewAutoCreatedCase`
is created in taskrouter—the assumption being that usually a human should
review automatically created cases.
To disable the creation of this task set this config to `false`.

  - `context.company.config.collections.autoInitiate.enabled` (boolean)

  - `context.company.config.collections.autoInitiate.inspectionProcName` (string)
    The name of the inspection procedure to run on the borrower's account.

  - `context.company.config.collections.autoInitiate.interactionDaysPassedThreshold` (object)
    Number of days to wait after the last loan overdue notification
was sent. The number depends on the loan's due dates frequency.

  - `context.company.config.collections.autoInitiate.interactionDaysPassedThreshold.everyTwoWeeks` (integer)

  - `context.company.config.collections.autoInitiate.interactionDaysPassedThreshold.monthly` (integer)

  - `context.company.config.collections.autoInitiate.interactionDaysPassedThreshold.twiceMonthly` (integer)

  - `context.company.config.collections.autoInitiate.interactionDaysPassedThreshold.weekly` (integer)

  - `context.company.config.collections.autoInitiate.loanDaysOverdueThreshold` (object)
    Number of days to wait before creating a new collection case.
The number depends on the loan's due dates frequency.

  - `context.company.config.collections.autoInitiate.loanDaysOverdueThreshold.everyTwoWeeks` (integer)

  - `context.company.config.collections.autoInitiate.loanDaysOverdueThreshold.monthly` (integer)

  - `context.company.config.collections.autoInitiate.loanDaysOverdueThreshold.twiceMonthly` (integer)

  - `context.company.config.collections.autoInitiate.loanDaysOverdueThreshold.weekly` (integer)

  - `context.company.config.collections.autoInitiate.nOverdueNoticesRequired` (integer)
    The number of different loan overdue notices required to be sent
before a new collection case is created.

  - `context.company.config.collections.autoInitiate.nPastCollectionsThreshold` (integer)
    Create a collection case if the number of past collections exceeds
this number.

  - `context.company.config.collections.autoInitiate.totalOverdueAmountThreshold` (integer)
    The sum of overdue amounts of all overdue loans has to exceed this
value for the collection case to be created.

  - `context.company.config.communication` (object)

  - `context.company.config.communication.address_from` (object)
    The mailing address.

  - `context.company.config.communication.address_from.POBox` (string)
    Post Office Box

  - `context.company.config.communication.address_from.addressLine1` (string)
    Address line 1.
If `company.allowPartialAddress=false`, then this field is required, else it is not required

  - `context.company.config.communication.address_from.addressLine2` (string)
    Address line 2.

  - `context.company.config.communication.address_from.city` (string)
    City.

  - `context.company.config.communication.address_from.country` (string)
    Country. English short name according to
[ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.

  - `context.company.config.communication.address_from.countyOrRegion` (string)
    County or region.

  - `context.company.config.communication.address_from.postalCode` (string)
    Postal code. Also known as ZIP code.

  - `context.company.config.communication.address_from.state` (string)
    State/Province. This is a required field if the country is US or CA.

  - `context.company.config.communication.email_from` (any)

  - `context.company.config.communication.email_from.email` (string)

  - `context.company.config.communication.email_from.name` (string)
    Name associated with email address

  - `context.company.config.communication.email_from.address` (string)
    Example: jondoe@example.com

  - `context.company.config.communication.email_from.non_transactional_from` (any)
    The email address from which all non-transactional emails are sent.

A non-transactional email are those which are sent manually by
an agent in the CRM.

  - `context.company.config.communication.email_from.non_transactional_from.email` (string)

  - `context.company.config.communication.email_from.non_transactional_from.name` (string)
    Name associated with email address

  - `context.company.config.communication.email_from.non_transactional_from.address` (string)
    Example: jondoe@example.com

  - `context.company.config.communication.email_from.non_transactional_reply_to` (any)
    The email address marked as `reply-to` for sent non-transactional emails.
A non-transactional email are those which are sent manually by
an agent in the CRM.

  - `context.company.config.communication.email_from.non_transactional_reply_to.email` (string)

  - `context.company.config.communication.email_from.non_transactional_reply_to.name` (string)
    Name associated with email address

  - `context.company.config.communication.email_from.non_transactional_reply_to.address` (string)
    Example: jondoe@example.com

  - `context.company.config.communication.email_from.skipCGRules` (boolean)
    can-interact will return `true` for this company without checking Compliance Guard rules

  - `context.company.config.communication.email_from.transactional_from` (any)
    The email address from which all transactional emails are sent.

A transactional email are those which are NOT sent manually by
an agent in the CRM.

  - `context.company.config.communication.email_from.transactional_from.email` (string)

  - `context.company.config.communication.email_from.transactional_from.name` (string)
    Name associated with email address

  - `context.company.config.communication.email_from.transactional_from.address` (string)
    Example: jondoe@example.com

  - `context.company.config.communication.email_from.transactional_reply_to` (any)
    The email address marked as `reply-to` for sent transactional emails.
A transactional email are those which are NOT sent manually by
an agent in the CRM.

  - `context.company.config.communication.email_from.transactional_reply_to.email` (string)

  - `context.company.config.communication.email_from.transactional_reply_to.name` (string)
    Name associated with email address

  - `context.company.config.communication.email_from.transactional_reply_to.address` (string)
    Example: jondoe@example.com

  - `context.company.config.communication.email_inbound` (object)
    Configure email addresses which may be used to receive messages.

  - `context.company.config.communication.email_inbound.monitored_emails` (array)
    Array of email addresses which can receive incoming email messages.
An incoming email message will create a Taskrouter Task:
`HandleInboundInteraction` or `HandleUnboundInboundInteraction`.

  - `context.company.config.communication.email_inbound.reject_others` (boolean)
    If set to `true` then all email messages received by the email system
which are NOT present in `monitored_emails` are considered
"unmonitored email addresses".
Unmonitored email addresses:
- when receiving an email message DO NOT create Taskrouter Tasks.
- when an email message is received, automatically reply with
an email saying that they have messaged an "unmonitored" email.

  - `context.company.config.communication.enableInboundVoiceCall` (boolean)
    Set to `true` to enable inbound voice calls. Otherwise, inbound callers
are read a voicemail is currently disabled message.
(Note that other configuration settings must be set for voice calls
to work properly.)

  - `context.company.config.communication.enableInboundWebChat` (boolean)
    Set to `true` to enable inbound webchats.
When set to `true` the Contact Us page will display a link to start a webchat
for logged-in borrowers.
Note that `openHours` must also be configured for inbound webchats to work.

  - `context.company.config.communication.enable_two_way_texting` (boolean)
    Set to `true` to enable inbound text receipt and responses. Otherwise, texter
receive response saying "This number is not monitored...".
(To configure the autoresponse message see the config setting `support.textSupportDisabledMessage`)
Inbound text messages will generate `replyToNewText`-type tasks.

  - `context.company.config.communication.text_from_number` (string)
    The phone number to send text messages from.
    Example: +18085551234

  - `context.company.config.compliance` (object)
    Compliance guard related configuration parameters

  - `context.company.config.compliance.no_review_task_for_autocreated_cases` (boolean)
    If `true` then assume that cases automatically created via Compliance
Guard do not need to be reviewed by a human. If `false` or unset, then
whenever Compliance Guard automatically creates a case, create a
corresponding task for an agent to review the newly created case.

  - `context.company.config.compliance.no_review_task_for_autoupdated_cases` (boolean)
    If `true` then assume that cases automatically updated via Compliance
Guard do not need to be reviewed by a human. If `false` or unset, then
whenever Compliance Guard automatically updates certain cases, create a
corresponding task for an agent to review the updated case.
Note that only a subset of automatically updated cases will generate a
review task even with this setting enabled. Those are `bankruptcy` and
`militaryDuty`.

  - `context.company.config.compliance.rndCompanyId` (string)
    Reassigned Numbers Database Company ID

  - `context.company.config.creditCounselingServicesNumber` (string)

  - `context.company.config.dataAccess` (object)
    Who may access this company's data, where the restriction comes from the company's contract
rather than from the permission model. Peach's permission model has no company dimension on
cross-company access, so a restriction like this cannot be expressed as a permission — it has
to be recorded here and honored by whatever provisions access.

  - `context.company.config.dataAccess.contractorAccessAllowed` (boolean)
    Whether contractors may be granted access to this company. This is an **allow-list**:
the field is unset on a company until someone decides, and an unset company is treated as
NOT allowed. Leaving it unset is therefore safe — it withholds access rather than granting
it — so a lender signed under a contract that forbids non-employee access is protected
even if nobody remembers to record anything.
Read by `tools/create_employee_with_api_key.py` (`ensure-contractor-roles`,
`create --contractor`, `sync-contractor`), which provisions per-company contractor roles
only on companies where this is `true`. `sync-contractor` reports companies with no
decision recorded so they can be resolved deliberately rather than defaulted.
Because it is read at provisioning time, setting it to `false` on a company a contractor
has *already* been granted does not revoke that access. `sync-contractor` reports it as a
policy violation; the grant must be removed with
`DELETE /companies/{companyId}/users/{userId}/roles/{roleId}`.
Set it with
`PUT /companies/{companyId}/config?paths=dataAccess.contractorAccessAllowed`
and a body of `true` or `false`.

  - `context.company.config.dataOutbox` (object)

  - `context.company.config.dataOutbox.compressionFormat` (string)
    Compression format of files delivered.
    Enum: "gzip", "snappy"

  - `context.company.config.dataOutbox.deliveryFrequency` (string)
    Frequency of data deliveries.
    Enum: "15m", "1h", "1d"

  - `context.company.config.dataOutbox.destinationBucket` (string)
    The name of the bucket to use for data outbox.

  - `context.company.config.dataOutbox.destinationProvider` (string)
    The provider of the bucket to use for data outbox.
    Enum: "gcp", "aws", "azure"

  - `context.company.config.dataOutbox.destinationRegion` (string)
    The region of the bucket to use for data outbox. This is only required if the destination provider is `gcp` or `aws`.

  - `context.company.config.dataOutbox.fileFormat` (string)
    Format of files delivered. Currently, only Parquet is supported.
    Enum: "parquet", "avro"

  - `context.company.config.dataOutbox.googleServiceAccount` (string)
    The Google Cloud service account to use for data outbox.

  - `context.company.config.documents` (object)
    Document processing related configuration parameters.

  - `context.company.config.documents.signer_contact` (string)
    Signer's contact information to be added to the signature.

  - `context.company.config.documents.signer_location` (string)
    Signer's location (e.g. "Oakland, CA, USA")

  - `context.company.config.documents.signing_key` (string)
    Document signing key in PKCS 12 format.

  - `context.company.config.documents.signing_key_password_token` (string)
    Token corresponding to the signing key password.

  - `context.company.config.evidence` (object)

  - `context.company.config.evidence.captureScreenshot` (boolean)
    If `true`, capture payment screenshot for evidence collection.

  - `context.company.config.forceCaseIdOnAgentActions` (boolean)
    If true, a loan action made by an agent must come with a case ID.

  - `context.company.config.links` (object)

  - `context.company.config.links.eSignDisclosureUrl` (string)
    URL of lender's eSign Disclosure page

  - `context.company.config.links.helpUrl` (string)
    URL of lender's help page

  - `context.company.config.links.privacyPolicyUrl` (string)
    URL of lender's Privacy Policy page

  - `context.company.config.links.termsOfUseUrl` (string)
    URL of lender's Terms of Use page

  - `context.company.config.monitoring` (object)

  - `context.company.config.monitoring.criteria` (string)
    The criteria used to determine whether monitoring should be enabled for a borrower.
Monitoring will be enabled:
- `borrowerStatus`: if the borrower `status` is `active`
- `borrowerAndLoanStatus`: if the borrower `status` is `active` and the borrower has loans with `status`=`active`
    Enum: "borrowerStatus", "borrowerAndLoanStatus"

  - `context.company.config.monitoring.scraCaseCreationCriteria` (string)
    The criteria used to determine whether a SCRA case should be created for a borrower.
A SCRA case will be created:
- `borrowerOnly`: Upon borrower identity match, SCRA case will be created even if there are no loans that are qualified per
SCRA regs. If there are eligible loans, the case will associate them.
- `borrowerAndLoan`: Upon borrower identity match, SCRA case will be created only if there are qualified loans per SCRA regs.
    Enum: "borrowerOnly", "borrowerAndLoan"

  - `context.company.config.openHours` (object)
    An object describing the times in which this company is "open".
This is used in multiple places:
- This is displayed on the contact us page.
- When closed, phone calls are sent to voicemail or rejected.
- When closed, webchats cannot be started.

  - `context.company.config.openHours.businessHours` (object)

  - `context.company.config.openHours.businessHours.holidays` (array)
    The list of holidays on which the company has special open hours. Holiday
hours supercede the "normal" weekly hours.

  - `context.company.config.openHours.businessHours.holidays.date` (string)
    An ISO 8601 date (not date-time) on which this holiday occurs
    Example: 2024-04-01

  - `context.company.config.openHours.businessHours.holidays.hours` (string)
    The hours in which the company is open on this holiday
    Example: 09:00-15:00

  - `context.company.config.openHours.businessHours.holidays.name` (string, required)
    The name of the holiday
    Example: April Fools Day

  - `context.company.config.openHours.businessHours.holidays.hours` (string)
    The hours in which the company is open on these holidays
    Example: Closed

  - `context.company.config.openHours.businessHours.holidays.matchCountry` (string, required)
    The ISO 3166 2 or 3 character country code of the country to match.
See: https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
The list of holidays for a country matches those used by the python
package "Holidays".
See: https://python-holidays.readthedocs.io/
    Example: GB

  - `context.company.config.openHours.businessHours.normal` (string)
    A specially formatted string describing the open hours of the company.
A day-time descriptor is a day or days of the week followed by a space " "
and an "hours". With a "day" being the first three letters of the day of
the week. With "hours" being either `Closed`, `24hours`, or
a 24-hour time range like `9:00-18:00`.
For example:
- `"Mon-Wed 3:00-13:00"` indicates an open time from 3am to 1pm on
Monday, Tuesday, and Wednesday.
- `"Fri 24hrs"` indicates that on Friday the company is open for 24 hours.
- `"Thu closed"` indicates on Thursday the company is closed all day.

Day-time descriptors can be combined with a `;` to fully define a week
of open times.
If no open hours are configured the company is considered always closed.
    Example: Mon 24hrs; Tue-Fri 9:00-18:00; Sat-Sun Closed

  - `context.company.config.payment` (object)
    Payment processing configuration.

  - `context.company.config.payment.allowedCreditCardTx` (object)
    Controls how credit cards can be used.

  - `context.company.config.payment.allowedCreditCardTx.downPayment` (boolean)
    If true, down payments are allowed with credit cards.

  - `context.company.config.payment.allowedCreditCardTx.payment` (boolean)
    If true, regular loan payments are allowed with credit cards.

  - `context.company.config.payment.bypassCollisionCheck` (boolean)
    Allow the creation of multiple payment instruments with the same details within the same company.

  - `context.company.config.payment.disablePaymentProcessing` (boolean)
    When set to `true`, Peach will not process payments or allow creation of transactions where `isExternal=false`.
Existing internal transactions will be canceled on their scheduled date. Lenders can continue to create and process external transactions.
Use `scheduleAutopayTransactions` to control whether external autopay transactions will automatically be created by Peach.

  - `context.company.config.payment.externalTransactions` (array)
    Enables lenders to configure treatment of external transactions by Peach's system.

  - `context.company.config.payment.externalTransactions.statusTransition` (string)
    Enables lenders to control whether Peach's system will automatically intervene and transition the status of `pending` transactions to `successful` according to the `transitionLogic` configuration.
- `auto` - Peach's system will automatically transition `pending` transactions to `succeeded` after a specified period of time as defined by `externalTransactions.transitionLogic`
- `manual` - Lender is responsible for transitioning the status of external transactions via API.
    Enum: "auto", "manual"

  - `context.company.config.payment.externalTransactions.transactionType` (string)
    Enum: "ach", "debitCard", "creditCard", "check", "payroll", "moneyOrder", "wire", "paymentNetwork"

  - `context.company.config.payment.externalTransactions.transitionLogic` (object)
    Required for statusTransition = `auto`. Defines the logic used to determine when the external transaction's status will transition from `pending` to `succeeded`, assuming no other status changes occur in the meantime.
- `numDays`` - Peach's system will wait a specified amount of time in order to automatically transition the status of the transaction from `pending`to`succeeded`.
**NOTE**: any transactions whose status is not pending will be excluded from the logic to automatically transition the status of a payment.
- `holdDays`` - Peach's system will adhere to the holdDaysEndDate on the transaction and automatically transition the status of the transaction from `pending`to`succeeded`at the end of the hold day period. **NOTE**: Peach will only transition transactions with status =`pending`.

  - `context.company.config.payment.externalTransactions.transitionLogic.dayType` (string)
    Defines whether the system should calculate the automatic status transition based on calendar or business days. NOTE: this is a required attribute for products whose statusTransition is set to `auto` AND the transitionLogic is set to `numDays`.
This value cannot be set when type=holdDays.
    Enum: "calendar", "business"

  - `context.company.config.payment.externalTransactions.transitionLogic.numDays` (integer)
    Defines how many days the system will wait to automatically update the transaction's status if transitionLogic.type = numDays.
This value cannot be set when transitionLogic.type=`holdDays`.
The system will transition the status of the transaction on the Nth day.
For example, if a transaction is created on Jan 1 and numDays = 3, the
transaction's status will automatically transition on Jan 4.

  - `context.company.config.payment.externalTransactions.transitionLogic.type` (string)
    Enum: "numDays", "holdDays"

  - `context.company.config.payment.maxNumberNewPaymentMethodsIn30Days` (number)
    If a borrower has created a Payment Instrument this many times in the past 30 days,
they will be blocked from creating anymore. This does not apply to `external` instruments, or instruments created with `force=true`.

  - `context.company.config.payment.processedByPeach` (boolean)
    Whether Peach handles payment processing for this company.

  - `context.company.config.payment.scheduleAutopayTransactions` (boolean)
    Only applicable if `processedByPeach=false`.
`true` - the system will create transactions in scheduled status based on Autopay plan expected payments (aka AEPs).
`false` - the system will not create Autopay transactions based on Autopay plan expected payments. In this case, the lender is expected to create applicable transactions.

  - `context.company.config.payment.transactionLimitAmount` (integer)
    Maximum amount for a single transaction

  - `context.company.config.paymentTypes` (object)
    Controls what payment instrument types are allowed.

  - `context.company.config.paymentTypes.ach` (boolean)

  - `context.company.config.paymentTypes.achVerification` (object)

  - `context.company.config.paymentTypes.achVerification.microdeposit` (boolean)
    Microdeposit verification is required when creating bank accounts without using Plaid.

  - `context.company.config.paymentTypes.achVerification.plaid` (boolean)
    Plaid account creation is allowed.

  - `context.company.config.paymentTypes.balanceCheck` (object)

  - `context.company.config.paymentTypes.balanceCheck.plaid` (boolean)
    Allow Plaid balance checks.

  - `context.company.config.paymentTypes.check` (boolean)

  - `context.company.config.paymentTypes.creditCard` (boolean)

  - `context.company.config.paymentTypes.debitCard` (boolean)

  - `context.company.config.paymentTypes.moneyOrder` (boolean)

  - `context.company.config.paymentTypes.paymentNetwork` (boolean)

  - `context.company.config.paymentTypes.payroll` (boolean)

  - `context.company.config.paymentTypes.wire` (boolean)

  - `context.company.config.requireBorrowerIdentity` (boolean)
    Require new borrowers to have identity information.

  - `context.company.config.search` (object)

  - `context.company.config.search.indexing` (object)

  - `context.company.config.search.indexing.enabled` (boolean)
    If false, data will not be indexed in elastic search

  - `context.company.config.statements` (object)

  - `context.company.config.statements.defaultStatementChannel` (string)
    Enum: "email", "mail"

  - `context.company.config.statements.isMailStatementAllowed` (boolean)
    Whether borrowers can choose mail as their delivery method for statements.

  - `context.company.config.statements.overdueAmountInMinPaymentOverride` (boolean)
    If true, include the overdue amount in the min payment calculation during statement generation. This is also the default.

If false, do not include the overdue amount in the min payment calculation during statement generation.

  - `context.company.config.support` (object)
    Customer support

  - `context.company.config.support.departmentName` (string)

  - `context.company.config.support.email` (string)

  - `context.company.config.support.enableVoicemailWhenClosed` (boolean)
    Set to `true` to enable the leaving of voicemails when a customer calls
while phone support is closed.

  - `context.company.config.support.enableVoicemailWhenNoAgents` (boolean)
    Set to `true` to enable leaving of voicemails when a customer calls
when there are no agents available to answer the call.
If `false` or left unset the caller will remain on hold indefinitely until
an agent makes themselves available.

  - `context.company.config.support.outboundCallRecordingConsentScript` (string)
    Message to read to caller when making an outbound call to obtain consent
to record the call.

  - `context.company.config.support.phone` (string)

  - `context.company.config.support.phoneSupportClosedLeaveVoicemailMessage` (string)
    Message to read to caller when phone support is closed, and they may leave a message.

  - `context.company.config.support.phoneSupportClosedMessage` (string)
    Message to read to caller when phone support is closed (and voicemails
cannot be left because `enableVoicemailWhenClosed=false`)

  - `context.company.config.support.phoneSupportDisabledMessage` (string)
    Message to read in response to an inbound call when phone support is disabled.
(Phone support is disabled with the company config setting: `communication.enableInboundVoiceCall=false`)

  - `context.company.config.support.phoneSupportNoAgentsLeaveVoicemailMessage` (string)
    Message to read to caller when there are no agents available, and
they may leave a message.

  - `context.company.config.support.phoneSupportPleaseHoldMessage` (string)
    Message to read to inbound callers when being put on hold. This message is read
after the recording consent message.

  - `context.company.config.support.privacyPolicyUrl` (string)
    URL of the privacy policy notice.

  - `context.company.config.support.recordAllInboundVoiceCalls` (boolean)
    Set to `true` to record all inbound voice calls. Otherwise, calls can
be manually recorded on an individual basis by an agent.

  - `context.company.config.support.recordAllOutboundVoiceCalls` (boolean)
    Set to `true` to record all outbound voice calls. Otherwise, calls can
be manually recorded on an individual basis by an agent.

  - `context.company.config.support.textSupportClosedPleaseWaitMessage` (string)
    Message to send in response to initial inbound text message which starts a text message
conversation when phone support is closed.

  - `context.company.config.support.textSupportDisabledMessage` (string)
    Message to send in response to an inbound text message when text support is disabled.
(Text support is disabled with the company config setting: `communication.enable_two_way_texting=false`)

  - `context.company.config.support.textSupportFindNewAgentPleaseWaitMessage` (string)
    Message to send in response to an inbound text message to an already active conversation,
in which there is NOT already an agent.

  - `context.company.config.support.textSupportPleaseWaitMessage` (string)
    Message to send in response to initial inbound text message which starts a text message
conversation.

  - `context.company.config.support.textSupportRejectUnknownNumberMessage` (string)
    Message to send in response to an inbound text message when rejecting contact from
an unknown number.

  - `context.company.config.tasks` (object)

  - `context.company.config.tasks.channelCapacities` (object)
    The capacity configured for each task for channel type.
The default capacity for:
- `default` is `2` (i.e., tasks without a channel)
- `voice` is `1`
- `chat` is `3`

  - `context.company.config.tasks.channelCapacities.chat` (integer)

  - `context.company.config.tasks.channelCapacities.default` (integer)

  - `context.company.config.tasks.channelCapacities.email` (integer)

  - `context.company.config.tasks.channelCapacities.text` (integer)

  - `context.company.config.tasks.channelCapacities.voice` (integer)

  - `context.company.config.tasks.disableTaskRouter` (boolean)
    If `true` disable all task routing features.
i.e., Agents will not log in to task system. Tasks will not be created.

  - `context.company.config.tasks.disableTaskTypes` (array)
    List of task types to disable.
When a task type is disabled the system functions as normal except no task
is created.
Note that some task types which are allowed to be disabled here probably would be
better served disabled elsewhere. For instance, disabling `answerInboundVoiceCall`
would mean that incoming voice calls are still able to be received by the Peach
system, but cannot be answered by agents! In this case, it would be better to
set the config `communication.enableInboundVoiceCall=false`.

  - `context.company.config.tasks.enableCaseOwnership` (boolean)
    Enable optionally assigning an owner to Case objects. This will be
used during task routing to prefer to match tasks relating to cases
with their owners.

  - `context.company.config.timezone` (string)
    The timezone of the company.
It can be any IANA timezone from the [timezone database](https://data.iana.org/time-zones/releases/).
Note that this value should be a timezone and *NOT* a UTC Offset. A timezone is associated with
a geographic place / political entity (e.g., "America/Los_Angeles"), a UTC Offset
is just a count of number of hours difference from UTC.

  - `context.company.config.ui` (object)
    Configure UI, including the visibility or ordering of various UI
elements.
Each element is either hidden or visible by default.
For elements shown by default, hide them by setting their value
to `hidden`.
For elements hidden by default, show them by setting their value
to `show`.
These elements are hidden by default:
- directPaymentToDraw

All other elements are shown by default.

  - `context.company.config.ui.accountSettings` (string)
    Enum: "hidden"

  - `context.company.config.ui.accountSettingsPage` (object)

  - `context.company.config.ui.accountSummaryPage` (object)

  - `context.company.config.ui.agentDashboardTools` (object)

  - `context.company.config.ui.agentDashboardTools.dashboardToolDetails` (array)
    The details required for Peach to expose the agent tools to agents.

  - `context.company.config.ui.agentDashboardTools.dashboardToolDetails.name` (string)
    The name of the tool displayed to the agent.

  - `context.company.config.ui.agentDashboardTools.dashboardToolDetails.url` (string)
    The url associated with the agent tool. This controls the destination where the agent is taken when they access
the tool.
Note: when creating the url, there are parameters that the system will be able to parse and automatically
fill in. They are {borrowerId}, {externalBorrowerId}, {loanId}, {loanExternalId}, {loanPeachPublicId}, and
{borrowerPeachPublicId}

  - `context.company.config.ui.agentDashboardTools.enabled` (boolean)
    Determines whether agent tools will be shown in the loan options menu to the agent.

  - `context.company.config.ui.analyticsScript` (string)
    The HTML portion of script codes that loads analytics related code. The code is merged at the bottom of the main HTML page. Double quotes (") should be encoded by prefixing it with a "\" (backslash).

  - `context.company.config.ui.caseTypeOrdering` (array)
    Definitions for case type selection dropdown grouping and
ordering. Categories and tasks are ordered as given.

  - `context.company.config.ui.caseTypeOrdering.caseTypes` (array)
    Array of case type Peach IDs

  - `context.company.config.ui.caseTypeOrdering.category` (string)
    Category name

  - `context.company.config.ui.dashboard` (object)
    Configuration for the embedded Metabase dashboards displayed in CRM.

  - `context.company.config.ui.directPaymentToDraw` (string)
    Enum: "shown"

  - `context.company.config.ui.favicon` (string)
    URL of the company favicon.

  - `context.company.config.ui.headScripts` (string)
    The HTML portion that is loaded at the top of the tag of the main HTML page. Can be used to inject additional scripts that must be loaded at the start, like UserWay's ADA compliance widget.

  - `context.company.config.ui.loanOptions` (object)

  - `context.company.config.ui.loginPage` (object)

  - `context.company.config.ui.makePaymentPage` (object)

  - `context.company.config.ui.manageAutopayPage` (object)

  - `context.company.config.ui.managePaymentMethodsPage` (object)

  - `context.company.config.ui.managePaymentMethodsPage.agent` (object)

  - `context.company.config.ui.managePaymentMethodsPage.borrower` (object)

  - `context.company.config.ui.projectSlug` (string)
    The company project slug used to serve the UI. Please do NOT change it without coordinating with engineering.

  - `context.company.config.ui.websiteTitle` (string)
    The title that will be shown when the front end loads before the rest of the code loads.

  - `context.company.config.webhooks` (object)

  - `context.company.config.webhooks.requestTimeoutSeconds` (integer)
    The number of seconds the system will wait for a response
from a webhook before timing out.

  - `context.company.config.zendesk` (object)

  - `context.company.config.zendesk.sso` (object)

  - `context.company.config.zendesk.sso.enabled` (boolean)

  - `context.company.config.zendesk.sso.sharedSecretToken` (string)
    The shared secret token.

  - `context.company.config.zendesk.sso.subdomain` (string)
    Subdomain of the remote log in URL.

  - `context.company.deceasedPolicy` (boolean)

  - `context.company.deceasedServiceId` (integer)
    The service that will be used for deceased monitoring (no monitoring if is null)

  - `context.company.domainName` (string)
    Base web domain being used in communications/email/etc

  - `context.company.femaPolicy` (boolean)
    If set to `true`, automatically create Supercases when a disaster is detected in the region
of a borrower's address.

  - `context.company.femaServiceId` (integer)
    The service that will be used for FEMA disaster monitoring (no monitoring if is null)

  - `context.company.legalName` (string)
    Legal name of the company

  - `context.company.name` (string)
    Alternate name for the company

  - `context.company.ofacServiceId` (integer)
    The service that will be used for OFAC monitoring (no monitoring if is null)

  - `context.company.rndServiceId` (integer)
    The service that will be used for OFAC monitoring (no monitoring if is null)

  - `context.company.scraServiceId` (integer)
    The service that will be used for SCRA military monitoring (no monitoring if is null)

  - `context.company.shortDomainName` (string)
    Base web domain being used in communications/email/etc

  - `context.company.slug` (string)
    A slug to be used to match this company in other environments (dev/sandbox/etc).
It will also be used for FE hosting and the default DNS entries created for it.

  - `context.company.status` (string)
    The status of the company.
    Enum: "active", "activeChurning", "inactive"

  - `context.company.tokenizationKeyId` (integer)

  - `context.company.type` (string)
    Type enumerator for companies

  - `context.extraCharge` (number)
    The additional charge above the original autopay amount.

  - `context.loan` (object)
    Represents a loan. A loan always belongs to a borrower, and most of
the interactions between a lender and a borrower are associated with a
particular loan.

  - `context.loan.loanTypeId` (string)
    The loan type identifier. This is created specifically for each lender's loan product by Peach.

  - `context.loan.additionalBorrowers` (array)

  - `context.loan.additionalBorrowers.id` (string)
    ID of the related borrower

  - `context.loan.additionalBorrowers.relationType` (string)
    A relation type between a borrower and a loan.
Use `coBorrower` as the value if there are two or more borrowers.
    Enum: "coBorrower", "coSigner", "applicant"

  - `context.loan.declineReason` (object)
    The reason(s) why the loan application or the draw request was declined.

  - `context.loan.declineReason.mainExternalReasonCode` (string)
    A Lender's external main decline reason code.

  - `context.loan.declineReason.mainScriptForRep` (string)
    The main decline reason script that a customer service agent can provide to the borrower.

  - `context.loan.declineReason.mainText` (string)
    The main decline reason text that was shown to the borrower.

  - `context.loan.declineReason.subReasons` (array)

  - `context.loan.declineReason.subReasons.externalReasonCode` (string)
    A Lender's external decline reason code.

  - `context.loan.declineReason.subReasons.reasonText` (string)
    The decline reason text that was shown to the borrower.

  - `context.loan.declineReason.subReasons.scriptForRep` (string)
    The decline reason script that a customer service agent can provide to the borrower.

  - `context.loan.externalId` (string)
    A lender's identifier for a loan or a draw.
After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.
To fetch the object using externalId you need to add `ext-` to the URL.
Note: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE and NOT ext-ABCDE when creating the object.

  - `context.loan.metaData` (object)
    Store any type of key/value pairs in the form of a JSON dictionary.

  - `context.loan.timestamps` (object)
    Various loan timestamps.

  - `context.loan.timestamps.acceleratedAt` (string)
    The timestamp of the effective date of the acceleration of a loan or draw. A
previously accelerated loan that has been reversed will be marked as null.

  - `context.loan.timestamps.activatedAt` (string)
    The timestamp when the loan or the draw was activated.

  - `context.loan.timestamps.canceledAt` (string)
    The timestamp of when the loan was canceled

  - `context.loan.timestamps.chargedOffAt` (string)
    The timestamp of the effective date of the charge-off of a loan or draw. A
previously accelerated loan that has been reversed will be marked as null.

  - `context.loan.timestamps.closedAt` (string)
    The date LOC or Draw was closed.

  - `context.loan.timestamps.frozenAt` (string)
    The timestamp of the most recent freeze date of a loan or draw. A previously frozen
loan that has been reversed will be marked as null.

  - `context.loan.timestamps.migratedAt` (string)
    The timestamp of when the loan completed loan migration.

  - `context.loan.timestamps.originatedAt` (string)
    The timestamp when the loan or draw was originated.

  - `context.loan.timestamps.paidOffAt` (string)
    The timestamp of the effective date when a loan or draw is paidOff.

  - `context.loan.timestamps.startedAt` (string)
    The timestamp when the loan or the draw was activated.

  - `context.loan.assetType` (string)
    The generic asset types that are supported.
    Enum: "personalClosedEndUnsecured", "personalOpenEndUnsecured", "personalClosedEndSecured", "personalOpenEndSecured", "motorMVRISC", "motorDirect", "motorLease", "businessClosedEndUnsecured", "businessOpenEndUnsecured", "businessClosedEndSecured", "businessOpenEndSecured"

  - `context.loan.chargedOffReason` (string)
    The reason for loan charge off. Can be updated via the Update Loan endpoint when the loan status is `chargedOff`.
`term` means the loan was charged off per loan type configuration after X days overdue.
`fraudulent` means the loan was charged off for fraudulent reason. If the loan is reported to one or more credit bureaus, the system will automatically send a special request to each bureau to delete the tradeline due to confirmed fraud. This is the only reason that the system will automatically trigger a request to delete the tradeline. For other reasons, if you need to delete the tradeline please call the `Delete from credit reporting` endpoint or use an agent tool.
`bankruptcy` means the loan was charged off because of bankruptcy.
`legal` means the loan was charged off because of some legal reason.
    Enum: "term", "fraudulent", "bankruptcy", "legal"

  - `context.loan.mainBorrowerId` (string)
    The identifier of the main borrower of the loan

  - `context.loan.migration` (object)
    Loan migration details. This structure should be used for loans that are migrated from another system to Peach.
To migrate a loan (see migration guidance for full details):
1. Create a new loan in `pending` or `originated` status. The loan must be in `originated` before proceeding to the next step.
2. Call relevant endpoints to create past payments, refunds, etc.
3. Call `Migrate loan` endpoint.

  - `context.loan.migration.activatedDate` (string, required)
    The activation date of the migrated loan in the product timezone. The date must be in the past.

  - `context.loan.migration.activatedTimeOfDay` (object, required)
    The effective time of day on `activatedDate` in the product timezone.

  - `context.loan.migration.activatedTimeOfDay.hour` (integer, required)
    The hour. Value range is 0-23. 0=Midnight...23=11 PM.

  - `context.loan.migration.activatedTimeOfDay.minute` (integer, required)
    The minute. Value range is 0-59.

  - `context.loan.migration.activatedTimeOfDay.second` (integer)
    The second. Value range is 0-59.

  - `context.loan.migration.creditReporting` (object)
    Instructions to the Peach system on how to report a migrated account.

  - `context.loan.migration.creditReporting.dateClosed` (string)
    Legacy-system date the account was closed. If provided, Peach uses this value for Metro2 "Date Closed"; otherwise Peach derives it from Peach close/payoff events.

  - `context.loan.migration.creditReporting.dateOfFirstDelinquency` (string)
    The date of first delinquency as of the "migration cutoff
date". This attribute is required to accurately report delinquency
data. If the migrated account is delinquent (based on the Metro2
definition) or was delinquent in the past, then you must pass the
`dateOfFirstDelinquency`.
For more details of how to determine this value, please refer to the
most recent Metro2 Credit Reporting Resource Guide.

  - `context.loan.migration.creditReporting.k2Segment` (object)
    The K2 Segment may be used to report the name of the company from
which the account was purchased or the name of the company to which
the account was sold.
If you migrate an account to Peach, and want to include the K2
segment, you need to pass all the applicable attributes in this
object.
Please review the notes below per the Metro2 Credit Reporting Resource Guide:
- If the company that purchased the accounts will not report the
prior history, the seller must report the accounts as sold to
reflect the final status.
- If the account is delinquent or derogatory, it is imperative
that you provide the date of the first delinquency that led to
the account being sold to the debt purchaser.
- If the company that purchased the accounts is converting the
account history to their system, the seller should not report
the accounts as sold. In this situation, the seller and
purchaser should work together with the data representatives at
the consumer reporting agencies, who will assist you with
conversion of the accounts.
- If the lender who sold the accounts reported them as "purchased
by another company" or the history cannot be verified for the
account prior to purchase, report the Base and K2 Segment
fields.
  - If the new lender is unable to obtain the Date of First
Delinquency with the original lender, do not report the
account.
  - Payment history that occurred with the previous lender, which
is already on the consumer's file, must not be reported by the
new lender.
- If the previous lender's account history is being converted to
the new lender's system and the account history can be verified,
report the Base, K2 Segment and L1 Segment fields.
  - If the new lender is unable to obtain the Date of First
Delinquency with the original lender, do not report the
account.
  - Make sure to configure the Identification Number to be the
same as reported by the previous lender.
  - Make sure to pass loan `externalId` as the Account Number
reported by the previous lender.

  - `context.loan.migration.creditReporting.k2Segment.purchasedFromName` (string, required)
    Contains the name of the company from which the account was purchased.

  - `context.loan.migration.creditReporting.l1Segment` (any)
    The L1 Segment provides an automated method for changing the
Consumer Account Number and/or Identification Number and should be
reported only one time per record to affect the change.

If you migrate an account to Peach, and want to include the L1
segment, you need to pass all the applicable attributes in this
object.

  - `context.loan.migration.creditReporting.l1Segment.changeIndicator` (string, required)
    The change indicator field.
- `1` = Consumer Account Number Change ONLY.
- `2` = Identification Number Change ONLY.
- `3` = Consumer Account Number AND Identification Number Change.
    Enum: "1"

  - `context.loan.migration.creditReporting.l1Segment.oldConsumerAccountNumber` (string, required)
    The old Account Number that was assigned to this account in the other system
(not Peach) prior to migration. The new Account Number that will be reported
is the loan `externalId` or Peach Public ID.
Do not include embedded blanks or special characters. If
`changeIndicator=2`, this field should be left empty or blank filled.

  - `context.loan.migration.creditReporting.l1Segment.oldIdentificationNumber` (string, required)
    The old Identification Number that was used in the other system (not Peach)
prior to migration. The new Identification Number that will be reported is
as configured in Peach.
Do not include embedded blanks or special characters. If
`changeIndicator=1`, this field should be left empty or blank filled.

  - `context.loan.migration.creditReporting.paymentHistoryProfile` (string)
    The payment history profile of the account prior to the migration date.
The format of this attribute is a string of exactly 24
characters. Peach will use the provided history profile of the
account to report the history up to 24 months. After the migration
cutoff date, Peach will start reporting "new/current" payment
behavior and use part of the `paymentHistoryProfile` data.
For example:
Migration from date = Jan 11, 2022 (this is also a statement date)
paymentHistoryProfile = `000011000000EEEE0000BBBB`
Data represents, from left to right, 12/31/2021 back through
01/31/2020. The E's indicate that the account was current with a
zero balance in 12/2020, 11/2020, 10/2020 and 09/2020. The B's
indicate that no payment history was available prior to 05/2020,
which was most likely the date account was opened.
Peach will first report the account on Feb 1, 2022:
Date of Account Information = 01/31/2022 (represents the reporting period of 01/01/2022 through 01/31/2022)
Account Status Code = 11
Peach will report the PHP field as is - `000011000000EEEE0000BBBB`.
Peach will report the account again on Mar 1, 2022:
Date of Account Information = 02/31/2022 (represents the reporting period of 02/01/2022 through 02/28/2022)
Peach will use part of the original value passed in the `paymentHistoryProfile` and report the PHP field as `0000011000000EEEE0000BBB`. Note that Peach didn't use the last "B" from the original value that was passed.
For more details of how to determine this value, please refer to the
most recent Metro2 Credit Reporting Resource Guide. The below was
copied from the Metro2 2022 Credit Reporting Resource Guide:
> Contains up to 24 months of consecutive payment activity for the
previous 24 reporting periods prior to the Date of Account
Information (Field 24) being reported. Report one month's payment
history in each byte from the left to right in most recent to
least recent order. The first byte should represent the Account
Status Code reported in the previous reporting period. Refer to
Exhibit 5 for examples of reporting payment history, which
includes examples for month-end reporters, as well as examples
for reporters who submit data on other days of the month (e.g.,
1st, 15th, etc.).
`0` = 0 payments past due (current account)
`1` = 30 - 59 days past due date
`2` = 60 - 89 days past due date
`3` = 90 - 119 days past due date
`4` = 120 - 149 days past due date
`5` = 150 - 179 days past due date
`6` = 180 or more days past due date
`B` = No payment history available prior to this time – either because the account was not open or because the payment history cannot be furnished. A "B" may not be embedded within other values.
`D` = No payment history reported/available this month. "D" may be embedded in the payment history profile.
Note: Code "D" should not be used as a default value or reported to remove accurately-reported history.
`E` = Zero balance and Account Status 11 – Current (0-29 days past the due date)(Applies to Credit Cards and Lines of Credit)
`G` = Collection
`H` = Foreclosure Completed
`J` = Voluntary Surrender
`K` = Repossession
`L` = Charge-off
No other values are acceptable in this field.

If this value is not provided, Peach will report PHP as "unknown"
from the "activation date" until the "migration cutoff date" using a
special code `B` based on the Metro2 Credit Reporting Resource
Guide.

  - `context.loan.migration.migrationStatus` (string, required)
    The loan migration status. This attribute can be updated by the Peach system only.
- `nonMigrated` - this is a non-migrated loan. Most loans are expected to be `nonMigrated`.
- `prepMigration` - the lender can add objects to the loan in the past.
- `migrating` - the system is migrating the loan. Objects cannot be modified or added.
- `completed` - the loan was successfully migrated. After a successful migration the loan status will be changed to one of the following statuses: `active`, `accelerated`, `chargedOff` or `paidOff`.
- `failed` - the loan migration attempt failed. The loan will remain in the `pending` status. You can update the loan details and try to migrate again by calling `Migrate loan` endpoint.
    Enum: "nonMigrated", "prepMigration", "migrating", "completed", "failed"

  - `context.loan.additionalPeople` (array)
    For loans with multiple people attached, use this field to add additional people.
You do not need to include the main borrower, who will be created from the url parameter.

  - `context.loan.additionalPeople.personId` (string)
    A borrower's unique identifier (who owns the loan). Can be Peach
or a lender's external identifier.

  - `context.loan.atOrigination` (object)
    This object contains loan details and terms as they were shown to a borrower at origination.

  - `context.loan.atOrigination.advanceSchedule` (array)
    The advance schedule of the loan. Total amount of the advances must be equal to `amountFinanced`. If `advanceSchedule` is passed,
the system will calculate the APR based on the special formula provided in
[Appendix J](https://www.ecfr.gov/cgi-bin/text-idx?SID=747961e095035658cdddba8b09d30a6f&mc=true&node=pt12.9.1026&rgn=div5#ap12.9.1026.0000_0nbspnbspnbsp.j)
(see examples of loans with multiple advances).

  - `context.loan.atOrigination.advanceSchedule.advanceDate` (string, required)
    The date of the advance in the product timezone. The date cannot be in the past or greater than the last due date.
- If the advance is created in `pending` or `settled` status, the advance will be recorded in the ledger with an effective timestamp of
the Create advance call.
- If the advance is created in `scheduled` status, the advance will be recorded in the ledger only when the status changes to `pending` or `settled`.

  - `context.loan.atOrigination.advanceSchedule.advanceDetails` (object)
    The details of advance.

  - `context.loan.atOrigination.advanceSchedule.advanceDetails.categoryId` (string)
    The category identifier of the advance.

  - `context.loan.atOrigination.advanceSchedule.advanceDetails.description` (string)
    The description of the advance. Normally shown in Borrower Portal and on statements. At least one of the attributes, `description`
or `merchantName` must be passed.

  - `context.loan.atOrigination.advanceSchedule.advanceDetails.merchantId` (string)
    The merchant identifier that the advance was used for.

  - `context.loan.atOrigination.advanceSchedule.advanceDetails.merchantName` (string)
    The merchant name that the advance was used for. At least one of the attributes, `description` or `merchantName` must be passed.

  - `context.loan.atOrigination.advanceSchedule.advanceDetails.metadata` (object)
    Store any type of key/value pairs in the form of a JSON dictionary.

  - `context.loan.atOrigination.advanceSchedule.advanceDetails.pointOfSaleType` (string)
    - `online` - the advance was made online on a website or in a mobile application.
- `physical` - the advance was made in a store with a physical card or instrument.
- `recurring` - the advance was made as part of a subscription service.
    Enum: "online", "physical", "recurring"

  - `context.loan.atOrigination.advanceSchedule.amount` (number, required)
    The amount of advance. The amount must be positive.

  - `context.loan.atOrigination.advanceSchedule.externalId` (string)
    A lender's identifier for a resource.
After the resource is successfully created, a lender can use the Peach assigned ID OR
the `externalId` identifiers to fetch the resource.
### Fetching with `externalId`:
To fetch a resource using an `externalId`, you MUST use the prefix `ext-` in the URL.
For example, a loan with an external identifier of `ABCDE` would be referenced like `/api/people/BO-FAKE-IDNT/loans/ext-ABCDE`.
### Creating with `externalId`:
To create a resource with an external identifer, you MUST NOT use the prefix `ext-`.
For example, if the external identifier should be `ABCDE`, then pass
`{ externalId: "ABCDE", ... }` in the request body.

  - `context.loan.atOrigination.advanceSchedule.metadata` (object)
    Store any type of key/value pairs in the form of a JSON dictionary.

  - `context.loan.atOrigination.advanceSchedule.status` (string, required)
    - `scheduled` - the advance was scheduled in the future. If the advance status doesn't change to `pending`, `settled` or `canceled` on the advance due
date, the system will automatically cancel the advance on the following calendar day (aka change the status to `canceled`).
For example: An advance was `scheduled` for May 27, 2021. On May 28, 2021, the advance status was still `scheduled`. The system will cancel the advance.
- `settled` - the advance was settled and/or funded. `settled` advances increase the loan balance.
- `pending` - the advance is pending. `pending` advances increases the loan balance similar to `settled`. `pending` status is used mainly for visuals
and normally shown in Borrower Portal.
- `canceled` - the advance was canceled. `canceled` advances reduce the draw balance. A new advance cannot be created in `canceled` status.
    Enum: "scheduled", "settled", "pending", "canceled"

  - `context.loan.atOrigination.amountFinanced` (number)
    The amount financed. The amount of money a borrower received from the lender, minus the upfront fees (e.g. origination fee) the lender is charging the borrower.

  - `context.loan.atOrigination.aprEffective` (number)
    The effective APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.

  - `context.loan.atOrigination.aprNominal` (number)
    The nominal APR of the loan at origination. Pass both `aprNominal` and `aprEffective` even if they are equal.

  - `context.loan.atOrigination.bufferToPushOutSchedule` (number)
    The number of calendar days that will be added to the activation date. The resulting date will be used to push out
due dates as if the loan was activated on that date (activation date + buffer). Interest will still be accrued
normally from the activation date. Not valid for the singleTerm frequency.

  - `context.loan.atOrigination.discountProgramIds` (array)
    The identifiers of the discount programs provided at origination. A discount program
has to be created before it can be applied to loans.

  - `context.loan.atOrigination.downPaymentAmount` (number)
    The amount of down payment made when the loan was originated. The value should be equal to what a
borrower agreed to and signed at origination.

  - `context.loan.atOrigination.duration` (number)
    The duration of the loan as a number of `paymentFrequency` periods.
For example:
- if `paymentFrequency=monthly` and `duration=6`, it is a loan with 6 months duration and will have 6 due dates.
- if `paymentFrequency=weekly` and `duration=24`, it is a loan with 24 weeks duration and will have 24 due dates.

  - `context.loan.atOrigination.enforcedEndDate` (string)
    The enforced end date of the loan in the product timezone. If the `enforcedEndDate` is not provided, it will be set at `activation`.
If `enforcedEndDate` and `expectedPayments` are provided, the last
payment due date MUST match `enforcedEndDate`.

  - `context.loan.atOrigination.expectedPayments` (array)
    Expected payments schedule for the loan at origination. The dates and amounts
are exactly what a borrower agreed to and signed.

  - `context.loan.atOrigination.expectedPayments.amount` (number, required)
    The total amount of the payment. The total amount is equal to: `principalAmount` + `interestAmount`

  - `context.loan.atOrigination.expectedPayments.date` (string, required)
    Due date.

  - `context.loan.atOrigination.expectedPayments.dynamicFeeDetails` (object)
    When `paymentType`=`dynamicFee` this will contain details of the dynamic fee.

  - `context.loan.atOrigination.expectedPayments.dynamicFeeDetails.chargeDate` (string)
    **This attribute can be used only during the migration process of loans from another system to Peach. Any value passed for new loans
that are created and activated from day zero (`nonMigrated` loans) on the Peach system will be ignored.**
The effective date on which the fee was charged in the product timezone. In other words, this is when the fee was booked and written to the ledger.
The charge date of the fee is different from the due date of the fee. The due date of the fee is `expectedPayments.date`. The `chargeDate` must be
between the first and last dates (inclusive) of the period represented by `expectedPayments.date` (aka the due date).
If the `chargeDate` is provided, you can also provide the `chargeTimeOfDay`.
If the `chargeDate` is not provided, the system will charge the fee on the first day of the period.

  - `context.loan.atOrigination.expectedPayments.dynamicFeeDetails.chargeTimeOfDay` (object)
    See description of the `chargeDate`. The value can be provided only if the `chargeDate` attribute is passed. If `chargeTimeOfDay` is not provided,
the Peach system will determine and set the time of day.

  - `context.loan.atOrigination.expectedPayments.dynamicFeeDetails.chargeTimeOfDay.hour` (integer, required)
    The hour. Value range is 0-23. 0=Midnight...23=11 PM.

  - `context.loan.atOrigination.expectedPayments.dynamicFeeDetails.chargeTimeOfDay.minute` (integer, required)
    The minute. Value range is 0-59.

  - `context.loan.atOrigination.expectedPayments.dynamicFeeDetails.chargeTimeOfDay.second` (integer)
    The second. Value range is 0-59.

  - `context.loan.atOrigination.expectedPayments.dynamicFeeDetails.dynamicFeeTypeId` (string)
    The dynamic fee type identifier in the system.

  - `context.loan.atOrigination.expectedPayments.interestAmount` (number)
    The portion of `amount` allocated to interest (before any promo date(s) or discount). Required when `paymentType`
is `periodicPayment`

  - `context.loan.atOrigination.expectedPayments.interestBeforeDiscountAmount` (number)
    The amount of interest discount.

  - `context.loan.atOrigination.expectedPayments.isForcedAmount` (boolean)
    Only applicable to `paymentType=periodicPayment`.
If set to `true`, the system will honor the amount and will not update it on loan recalculations.
If set to `false` and the amount is less than the `periodicPaymentAmount`, the system can increase the amount when
the loan is being recalculated.
In most of the cases, the lender should set the value to `false` (aka the default value.) If you need more
explanation or advice on your use case, please contact the Peach team.

  - `context.loan.atOrigination.expectedPayments.paymentType` (string, required)
    The payment type.
    Enum: "periodicPayment", "originationFee", "drawFee", "dynamicFee", "downPayment", "discountCredit"

  - `context.loan.atOrigination.expectedPayments.principalAmount` (number)
    The portion of the `amount` allocated to principal. Required when `paymentType` is `periodicPayment`

  - `context.loan.atOrigination.expectedPayments.unroundedInterestAmount` (string)
    The portion of the `amount` allocated to net interest. Available only for `paymentType=periodicPayment`.
This value is unrounded.

  - `context.loan.atOrigination.expectedPayments.unroundedInterestBeforeDiscountAmount` (string)
    The interest amount that was accrued before promo rate(s) or any discount. Available only for
`paymentType=periodicPayment`. This value is unrounded.

  - `context.loan.atOrigination.expectedPayments.unroundedPrincipalAmount` (string)
    The portion of the `amount` allocated to principal. Available only for `paymentType=periodicPayment`.
This value is unrounded.

  - `context.loan.atOrigination.fees` (object)
    The loan fees.

  - `context.loan.atOrigination.fees.dynamicFees` (array)
    Dynamic fees details.
Applicable if your loan type has dynamic fee(s) pre-defined and fee(s) amount are different among loans.
Also, for a Line of Credit, this configuration is used to set a dynamic fee type on a selected draw when a dynamic fee type is
configured with `appliedToDraws` is `True` and `drawApplicationLogic` is `selectedDraws`.
Currently, the following dynamic fee types are supported: `purchaseFee`, `foreignTransactionFee`, `lateFee`, `serviceFee`, `nsfFee`.
Please note `lateFee` and `nsfFee` can only be configured on a single draw.

  - `context.loan.atOrigination.fees.dynamicFees.apiName` (string)
    The API name of the dynamic fee. For example: `lateFee` or `breatherFee`.
If applicable, `purchaseFee` or `foreignTransactionFee` `apiName` must be included, so it is applied to a specific draw.
Please confirm configs with the Peach team to ensure purchase fees are correctly configured.
When both `apiName` and `dynamicFeeTypeId` are provided, `apiName` is preferred.

  - `context.loan.atOrigination.fees.dynamicFees.dynamicFeeTypeId` (string)
    Public ID of the dynamic fee type (for example, `FT-XXXX-XXXX`). Alternative to `apiName`.
When both `apiName` and `dynamicFeeTypeId` are provided, `apiName` is preferred.

  - `context.loan.atOrigination.fees.dynamicFees.feeAmount` (number)
    The fee amount that will be charged recurrently. Only required if the dynamic fee `amountLogic` is configured as
`type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.

  - `context.loan.atOrigination.fees.dynamicFees.feeCapAmount` (number)
    The maximum amount of the dynamic fee that can be charged over the life of the loan or draw. Only required if the dynamic fee
`capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured
logic.

  - `context.loan.atOrigination.fees.originationFeeAmount` (number)
    The amount of the origination fee.

  - `context.loan.atOrigination.fees.serviceFeeAmount` (number)
    **DEPRECATED ATTRIBUTE** Use `dynamicFees.feeAmount`.
The service fee amount that will be charged recurrently. Only required if the service fee `amountLogic` is configured as
`type=passedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured logic.

  - `context.loan.atOrigination.fees.serviceFeeCapAmount` (number)
    **DEPRECATED ATTRIBUTE** Use `dynamicFees.feeCapAmount`.
The maximum amount of the service fee that can be charged over the life of the loan or draw. Only required if the service fee
`capLogic` is configured as `type=capPassedAtOrigination`. In all other cases, the system will calculate the fee based on pre-configured
logic.

  - `context.loan.atOrigination.fees.totalOtherFeesAmount` (number)
    The total amount of non-origination fees that are expected to be charged on the loan. The value should be
equal to what a borrower agreed to and signed at origination.

  - `context.loan.atOrigination.interestRates` (array)
    Interest rates for the loan or the draw. Can be a single interest rate for the entire duration of the loan/draw.
Or, it can be multiple interest rates for partial periods of the loan/draw. If draw-specific rates are not passed,
the draw will use the LOC rates.

  - `context.loan.atOrigination.interestRates.days` (integer, required)
    Number of calendar days the interest rate applies to. An entry with `days: null` is required
at the end of the list to indicate that the interest rate applies to the end of the loan duration.
For example:
`{"days": 30, "rate": 0.1},`
`{"days": 60, "rate": 0.2},`
`{"days": null, "rate": 0.25}`
The loan will accrue interest of 10% for the first 30 days. Between days 31-90
the loan will accrue interest of 20%. From day 91 until the end, the loan will accrue
interest of 25%.

  - `context.loan.atOrigination.interestRates.interestType` (string)
    The interest type. The interest type cannot be changed after the loan or draw status changes to `originated` and onward.
`absolute` - interest rates defined as `absolute` will use the value as provided here without adding the Index Interest Rate.
- Negative interest `rate` value is not allowed.
- If the provided `rate` is outside of the range defined on the loan type, the system will accept the `rate` but will return a warning in the response's object `ratesValidation`.

`spread` - interest rates defined as `spread` will calculate an absolute rate by adding the relative loan rate (aka spread)
provided in the `rate` attribute to the Index Interest Rate effective on the date the interest is accrued.
In case the Index Interest Rate is not set, the system will assume that the Index Interest Rate value is zero on the date the interest is accrued.
- Negative interest spread `rate` value is allowed, but the system will default to zero if the addition of the Index Interest Rate still results in a negative rate.
- If the calculated absolute rate, `rate` (aka spread) plus Index Interest Rate, is outside of the range defined on the loan type, the system will accept the `rate` but will return a warning in the response's object `ratesValidation`.
    Enum: "absolute", "spread"

  - `context.loan.atOrigination.interestRates.rate` (number, required)
    The annual interest rate for the period defined. The format is decimal.
For example, 0.01 is a 1% annual rate, 0.2 is a 20% annual rate.

  - `context.loan.atOrigination.investors` (array)
    A list of the investors who owned the loan at origination.
If none are provided, it defaults to the default investor configured for the lender.

  - `context.loan.atOrigination.investors.investorId` (string, required)
    The Investor's unique identifier, internal or lender's external.

  - `context.loan.atOrigination.investors.metro2` (object)

  - `context.loan.atOrigination.investors.metro2.reportK2Segment` (boolean)
    Only applicable to loans that are reported to credit bureaus.
If `true`, the system will report the K2 segment in the Metro2 file
to indicate that the loan has been sold to a new investor. Peach
will continue to report the loan.
If `false`, the system will not report the K2 segment in the Metro2
file. Peach will continue to report the loan.

  - `context.loan.atOrigination.investors.share` (number, required)
    The ownership percentage of the loan. The format is decimal. For example, 0.01 is 1% ownership and 0.15 is 15% ownership.

  - `context.loan.atOrigination.investors.effectiveDate` (string)
    The date at which this ownership structure came into effect.

  - `context.loan.atOrigination.itemsOrServicesFinanced` (string)
    Merchandise, services or other value provided in exchange for the debt. For example: refrigerator
or kitchen renovation. This description is used in communications with the borrower, when needed.

  - `context.loan.atOrigination.mdr` (object)
    This object represents optional configurations for the MDR (Merchant Discount Rate). When POS (point of sale)
lenders issue loans, the merchant pays some percentage of the financed amount - called the MDR.

  - `context.loan.atOrigination.mdr.mdrRate` (number)
    The Merchant Discount Rate (MDR). The format is decimal. For example, 0.03 is a 3% annual rate, 0.2 is a
20% annual rate. If `mdrAmount` is not passed, the system will calculate the `mdrAmount` by multiplying
the `amountFinanced` by the `mdrRate`.

  - `context.loan.atOrigination.mdr.amortizationPeriod` (number)
    Number of calendar days. If a value is passed, the system will amortize the `mdrAmount` over the `amortizationPeriod`
number of calendar days.
If a value is not passed or the value exceeds the loan life, the system will amortize the MDR amount over the life of
the loan. For Line of Credit, it is required to provide the `amortizationPeriod`. For Installment loans, it is
recommended to leave the value empty.

  - `context.loan.atOrigination.mdr.isAmortized` (boolean)
    `true` to amortize the `mdrAmount` using the straight-line amortization method over the life of the loan.
`false` to recognize the `mdrAmount` as revenue in full on the day when the loan is activated.

  - `context.loan.atOrigination.mdr.mdrAmount` (number)
    The Merchant Discount Amount.

  - `context.loan.atOrigination.merchantId` (string)
    A lender's identifier for the merchant.

  - `context.loan.atOrigination.originatingCreditorName` (string)
    The name of an entity that originated the loan. For example: Bank of Mars. This name will be
used in communications with the borrower when needed.

  - `context.loan.atOrigination.originationLicense` (string)
    The license that was used to originate the loan.
    Enum: "nationalBank", "stateLicense", "bankSubsidiary", "stateBank"

  - `context.loan.atOrigination.paymentFrequency` (string)
    The payment frequency of the loan.
`weekly`, `everyTwoWeeks`, `twiceMonthly`, `monthly` - are recurring.
`singleTerm` - a single term loan (aka non-recurring). It will create one period only with a desired "duration" of 30,
60, 90, 120, X calendar days or a specific date that should be passed in specificDays. For example [90].
    Enum: "weekly", "everyTwoWeeks", "twiceMonthly", "monthly", "singleTerm"

  - `context.loan.atOrigination.periodicPaymentAmount` (number)
    The amortized periodic payment amount excluding fees. Keep in mind that the last payment
can be different from the `periodicPaymentAmount`. Required when passing in `expectedPayments`
at origination.

  - `context.loan.atOrigination.personAddress` (object)
    The mailing address.

  - `context.loan.atOrigination.personAddress.POBox` (string)
    Post Office Box

  - `context.loan.atOrigination.personAddress.addressLine1` (string)
    Address line 1.
If `company.allowPartialAddress=false`, then this field is required, else it is not required

  - `context.loan.atOrigination.personAddress.addressLine2` (string)
    Address line 2.

  - `context.loan.atOrigination.personAddress.city` (string)
    City.

  - `context.loan.atOrigination.personAddress.country` (string, required)
    Country. English short name according to
[ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) standard.

  - `context.loan.atOrigination.personAddress.countyOrRegion` (string)
    County or region.

  - `context.loan.atOrigination.personAddress.postalCode` (string, required)
    Postal code. Also known as ZIP code.

  - `context.loan.atOrigination.personAddress.state` (string)
    State/Province. This is a required field if the country is US or CA.

  - `context.loan.atOrigination.personAddressId` (string)
    This is the existing identifier of a borrower's address contact information (Peach's
unique or lender's external identifier). If passed during origination, the address will be stored
on the loan object as a reference. Alternatively, the address can be directly provided
in `personAddress`, in which case, `personAddressId` should not be sent.

  - `context.loan.atOrigination.principalAmount` (number)
    The amount of principal at origination. Lenders should only pass this value if `principalAmount` is different from `amountFinanced`.
If a value is provided, the system will use `principalAmount` as the loan principal for interest calculations and amortization. The value should be greater than `amountFinanced`.
If a value is not provided, the system will:
- Set `principalAmount = amountFinanced`.
- Use `amountFinanced` as the loan principal for interest calculations and amortization.

  - `context.loan.atOrigination.promoRates` (array)
    The promotional interest rates (aka rate discounts) for the loan or the draw.
Can be a single promo rate for the entire duration of the loan/draw.
Or, it can be multiple promo rates for partial periods of the loan/draw.
For example, if the `interestRate` is 20% for the first 90 days and the `promoRate` has value
5% for 30 days, then the effective rate for the first 30 days is 15%.
The promo rates are unconditional and will be applied regardless of the loan status.

  - `context.loan.atOrigination.promoRates.days` (integer)
    Number of calendar days the promo rate applies to. Use `null` to indicate that
the promo rate applies to the end of the loan duration.
For example:
`{"days": 30 ,"rate": 0.1},`
`{"days": null, "rate": 0.01}`
The loan will receive interest discount of 10% for the first 30 days.
From day 31 until the end, the loan will receive interest discount of 1%.

  - `context.loan.atOrigination.promoRates.rate` (number)
    The annual promo rate for the period defined. Loans cannot accrue negative interest rate.
If the promo rate is greater than the interest rate, a loan will accrue 0% interest rate.
The format is decimal. For example, 0.01 is a 1% annual rate, 0.15 is a 15% annual rate.

  - `context.loan.atOrigination.rateCaps` (array)
    Rate caps that should apply to the loan at origination.
When the loan is created these rate caps are created and
applied to the loan. They will be accessible via the `.../rate-caps` endpoint.

  - `context.loan.atOrigination.rateCaps.days` (number, required)
    Number of calendar days the rate cap applies from loan origination.
If null, the rate cap applies for the entire loan term.
For example:

```
[{"days": 30, "maxRate": 0.1},
{"days": 60, "maxRate": 0.2},
{"days": null, "maxRate": 0.25}]
```
The loan will accrue interest with a rate cap of 10% for the first 30 days.
Between days 31-90 the loan will accrue interest with a rate cap of 20%.
From day 91 until the end, the loan will accrue interest with a rate cap of 25%.

  - `context.loan.atOrigination.rateCaps.maxRate` (number, required)
    The maximum spread interest rate that can accrue.
If the calculated rate on a given day is greater than `maxRate`, then the system will
cap the rate and accrue a maximum of `maxRate` on the loan. Else, we will use the calculated rate.
Format is decimal. For example, 0.36 is 36% annual rate cap.

  - `context.loan.atOrigination.rateCaps.rateCapReason` (string, required)
    The reason for `maxRate`. This is not used for any compliance logic, only for informational purposes.
- `MLA` - Military Lending Act (36% cap for active duty military)
- `SCRA` - Servicemembers Civil Relief Act
- `federal` - Other federal regulations
- `state` - State-specific regulations
- `other` - Other regulatory or business reasons
    Enum: "MLA", "SCRA", "federal", "state", "other"

  - `context.loan.atOrigination.skipCreditReporting` (boolean)
    Set to `true` if the loan should not be reported to the credit agencies when activated.

  - `context.loan.atOrigination.specificDays` (array)
    Specific days designate the day(s) that due dates will fall on. The allowed values for specific
day(s) depends on the `paymentFrequency`.
`weekly` - provide one number in the valid range 1-7. 1=Monday...7=Sunday.
For example: [1].
`everyTwoWeeks` - provide two inputs. The first input (required) is an integer in the valid range 1-7. 1=Monday...7=Sunday.
The second input is a date that indicates when to start the cycle. If the second input is not passed, the system will default
to the first valid start date based on the first input (the day of week passed in). If this date is provided then it can override
the minimum due date gap specified on the loan type.
For example: [1, "2020-09-16"].
`twiceMonthly` - provide two numbers in the valid range 1-31. 1=first day of a month. Use 31 to
indicate the last day of a month.
For example: [1, 15] or [15, 31].
`monthly` - provide one or two numbers, depending on the loan type `periodCalculationType` configuration:
- If `periodCalculationType=dueDate`, then provide one number in the valid range 1-31. This is the recurring due date. 1=first
day of a month. Use 31 to indicate the last day of a month. For example: [1].
- If `periodCalculationType=statementDate`, then provide one number in the valid range 1-31. This is the recurring statement date.
1=first day of a month. Use 31 to indicate the last day of a month. For example: [1].
- If `periodCalculationType=fixedStatementAndDueDates`, then provide two numbers. First number represents a recurring statement
date and the valid range is 1-31. Use 31 to indicate the last day of a month. Second number represents a recurring due date and
the valid range is 1-28. Two numbers must be different. For example: [1, 15] - statements are on 1st and due dates are on 15th.
Notes:
  - If the due date precedes the statement day, it's pushed to the next month. For example: [20, 10] and today is Oct 1, 2024. The
first statement date is Oct 20, 2024 and the first due date is Nov 10th.
  - For February in non-leap years, if the statement date is ≥ 29 and the due date is 28, the statement date becomes March 1st.

`singleTerm` - provide one number to indicate duration as a number of calendar days or provide a valid calendar date in the
future. This option is only valid for use on the installment type and at loan origination.
For example: [90] or ["2020-09-16"].
For `weekly`, `everyTwoWeeks`, `twiceMonthly`, `monthly`:
If specificDays is left null, then the system will calculate due dates according to the paymentFrequency relative
to the origination or activation date (or use existing specific days in the case of change due date).
For `singleTerm`:
The specificDays is mandatory.

  - `context.loan.atOrigination.totalDiscountAmount` (number)
    The total amount of discount at origination as a result of promo rates. The value should be equal to what
a borrower agreed to and signed at origination.

  - `context.loan.atOrigination.totalInterestAmount` (number)
    The total amount of interest the loan should accrue. The value should be equal to what a borrower agreed
to and signed at origination. Because of rounding issues, the total of expected payments `interestAmount`
might be different from `totalInterestAmount`.

  - `context.loan.atOrigination.totalInterestCapAmount` (number)
    The maximum amount of interest the borrower will ever pay.
If not applicable, set to `null`.

  - `context.loan.atOrigination.promoPrograms` (array)
    The list of promotional programs that the loan is eligible for.

  - `context.loan.atOrigination.promoPrograms.disqualifyOverdueDays` (integer)
    The number of loan overdue days that would disqualify the
promotional program.
Any occurrence of `disqualifyOverdueDays` or more of number
days overdue during the promotional period would disqualify
(aka cancel) the promotional program.

  - `context.loan.atOrigination.promoPrograms.externalId` (string)
    A lender's unique identifier for a specific promotional
program.

  - `context.loan.atOrigination.promoPrograms.metaData` (object)
    Store any type of key/value pairs in the form of a JSON
dictionary.

  - `context.loan.atOrigination.promoPrograms.promoDurationDays` (integer)
    The promotional program duration as a number of calendar
days.
If `promoDurationDays` is passed, the system will calculate
the `promoEndDate`.
Pass only one of the attributes, `promoEndDate` or
`promoDurationDays`.

  - `context.loan.atOrigination.promoPrograms.promoEndDate` (string)
    The promotional program end-date without a potential grace
period.
If `promoEndDate` is passed, the system will calculate the
`promoDurationDays`.
Pass only one of the attributes, `promoEndDate` or
`promoDurationDays`.
This date field should be in the product timezone.

  - `context.loan.atOrigination.promoPrograms.promoGracePeriodDays` (integer)
    The promotional program grace period as a number of calendar days.
Grace period allows the borrower to exercise the promotional program
for an additional number of days after it expires.

If you don't pass a value, the system will assume zero (aka no grace
period).

  - `context.loan.atOrigination.promoPrograms.promoStartDate` (string)
    The `promoStartDate` date marks the start date from which a
promotional program is valid and will be evaluated to be exercised.
When a promo program is created with `promoDurationDays` specified,
the `promoStartDate` is also used to calculate the `promoEndDate`.
For installment loans:
- The `promoStartDate` can be a date in the future but not after the
loan's last due date.
The promotion is valid and evaluated after it has been activated
and the `promoStartDate` arrived.
- The `promoStartDate` can be a date in the past but not before the
loan's activation date.
- The `promoStartDate` is optional.
If the value is not passed, the system will set the promoStartDate
to the loan activation date.
- For `Same as Cash` promo programs, the waiving of interest benefit
will be added from the loan activation date for the entire life of
the loan for installment loans, regardless of the
`promoStartDate`.

For Line of Credit draws:
- The `promoStartDate` can be a date in the future.
The promotion is valid and evaluated after it has been activated
and the `promoStartDate` arrived.
- The `promoStartDate` cannot be a date in the past.

If a value is not passed, the system will set the `promoStartDate`
to be the date of the activation.
This date value should be in the product timezone.

  - `context.loan.atOrigination.promoPrograms.promoTypeId` (string, required)
    The promotional program type's unique identifier.

  - `context.loan.atOrigination.promoPrograms.status` (string, required)
    The promotional program status.
`pending` - the promotion was created but was not activated yet.
`active` - the promotion is active.
For promo program creation, `installment` loans can be
created in either `pending` or `active` status.
For line of credit / draws, a promo program can only be
created in `pending` status and transitioned to `active`
status via the promo program activate endpoint.
    Enum: "pending", "active"

  - `context.loan.current` (object)
    This object contains some loan details that were modified after origination.

  - `context.loan.current.autopayEnabled` (boolean)
    Whether Autopay is enabled for this loan.

  - `context.loan.current.duration` (integer)
    The duration of the loan as a number of `paymentFrequency` periods.
For example:
- if `paymentFrequency=monthly` and `duration=6`, it's a loan with 6 months duration and will have 6 due dates.
- if `paymentFrequency=weekly` and `duration=24`, it's a loan with 24 weeks duration and will have 24 due dates.

  - `context.loan.current.paymentFrequency` (string)
    The payment frequency of the loan.
`weekly`, `everyTwoWeeks`, `twiceMonthly`, `monthly` - are recurring.
`singleTerm` - a single term loan (aka non-recurring). It will create one period only with a desired "duration" of 30, 60, 90, 120, X calendar days or a specific date that should be passed in specificDays. For example [90].
    Enum: "weekly", "everyTwoWeeks", "twiceMonthly", "monthly", "singleTerm"

  - `context.loan.current.periodicPayment` (number)
    The most recent amortized periodic payment that was calculated on `lastAmortizedAt`.

  - `context.loan.isClosed` (boolean)
    Indicates whether the loan with multiple advances is closed. If `true` and the loan type installment with multiple advances, new Advances
cannot be created, and the advance schedule cannot be updated.

  - `context.loan.muteLoanNotices` (boolean)
    Indicates whether the system should stop/pause sending loan related notices to the borrower. Set to true if you want to mute all loan related notices (e.g. loanDetails. autopayEnabled, paymentFailed, etc.) Keep in mind that it will also stop all notices related to the loan that are sent from Peach Agent Portal by an agent.
Note: this is not the only attribute that can stop notices from being sent. Compliance Guard and Cases Do Not Interact can also block communications.

  - `context.loan.nickname` (string)
    The loan's nickname. Nickname is a friendly name of the loan and is displayed in the UI.
Nickname is different from loan ID. Nickname can be changed by a borrower.

  - `context.loan.ratesValidation` (object)
    This object contains information on whether actual rates exceed the rate ranges defined on the loan type.

  - `context.loan.ratesValidation.interestRateAtOrigBelowMin` (boolean)
    `true` if the interest rate at origination is below the minimum interest rate.

  - `context.loan.ratesValidation.interestRateAtOrigExceedsMax` (boolean)
    `true` if the interest rate at origination exceeds the maximum interest rate.

  - `context.loan.ratesValidation.aprEffectiveAtActExceedsMax` (boolean)
    `true` if the effective APR at activation exceeds the maximum APR.

  - `context.loan.ratesValidation.aprEffectiveAtOrigExceedsMax` (boolean)
    `true` if the effective APR at origination exceeds the maximum APR.

  - `context.loan.ratesValidation.aprNominalAtActExceedsMax` (boolean)
    `true` if the nominal APR at activation exceeds the maximum APR.

  - `context.loan.ratesValidation.aprNominalAtOrigExceedsMax` (boolean)
    `true` if the nominal APR at origination exceeds the maximum APR.

  - `context.loan.servicedBy` (string)
    The entity type that services the loan.
`creditor`, `thirdPartyServicer` - means that the loan is serviced on the Peach platform.
`debtCollectionAgency` - means that the loan is no longer serviced on the Peach platform. The loan can be still visible in Borrower Portal. To clarify, the loan is not deleted from the Peach platform.
    Enum: "creditor", "thirdPartyServicer", "debtCollectionAgency"

  - `context.loan.status` (string)
    The current status of the loan. New loans must be created in `pending`, `originated` or `declined` status.
`pending` - the loan is in the application stage. Loan `atOrigination` details and terms can be changed (via API).
`originated` - the loan was signed by the borrower and originated by the lender. Loan `atOrigination` details cannot be changed. Originated loans do not start accruing interest until activated.
`declined` - an application was declined. This is a terminal state.
`active` - the loan is active. Most loans are expected to be active.
`frozen` - the loan is temporarily frozen. The loan will not accrue any interest, no payments can be processed, and no notifications are sent to the borrower.
`accelerated` - the loan was accelerated. The loan will not accrue any additional interest and the entire balance is due.
`chargedOff` - the loan was charged off.
`paidOff` - the loan was successfully paid off.
`canceled` - the loan was canceled. Canceled loans are not shown in UI. This is a terminal state.
    Enum: "pending", "originated", "declined", "active", "frozen", "accelerated", "chargedOff", "paidOff", "canceled"

  - `context.loan.type` (string)
    Enum: "installment"

  - `context.loan.additionalPeople` (array)
    **DEPRECATED ATTRIBUTE** use the `additionalBorrowers` field instead.
For loans with multiple people attached, use this field to add additional people.
You do not need to include the main borrower, who will be created from the url parameter.

  - `context.loan.isClosed` (boolean)
    Indicates whether the LOC is closed. If `true`, new Draws or Purchases cannot be created. The system will continue to create
statements as long as there is unpaid balance.

  - `context.loan.newDrawsAllowed` (boolean, required)
    Indicates if the borrower can make additional draws on the line.

  - `context.loan.paymentHoldDays` (object)
    Determines how long the lender wants to wait until a payment affects the openToBuy amount in the
Get balances endpoint.

  - `context.loan.paymentHoldDays.holdDayType` (string, required)
    Determines what type of day should be used to calculate the `holdDaysEndDate` on the transaction.
    Enum: "calendar", "business"

  - `context.loan.paymentHoldDays.numHoldDays` (integer, required)
    The number of days Peach's system will wait until the loan's balance reflects the amount of payment.
For example, if `holdDayType=calendar` and a borrower makes a one time payment on October 10th (and
the payment status is `initiated` or `pending`):
`numHoldDays = 0`, the payment will increase the `openToBuyAmount` on the 10th.
`numHoldDays = 1`, the payment will increase the `openToBuyAmount` on the 11th.
`numHoldDays = 2`, the payment will increase the `openToBuyAmount` on the 12th.

  - `context.paymentAmount` (number)
    The amount of the payment

  - `context.paymentDueDate` (string)
    The due date of the payment

  - `context.paymentMethod` (string)
    The payment method
    Enum: "bankAccount", "card", "check", "payroll", "paymentNetwork", "moneyOrder", "wire"

  - `context.paymentMethodLastFour` (string)
    The last four digits of the payment method

  - `context.person` (object)

  - `context.person.identity` (object)
    The borrower's identifier. For example, the Social Security number.

  - `context.person.identity.customIdentityTypeName` (string)
    The name of a personal or business ID. Required if `identityType=customID`. This needs to be "one word"
only US (a-zA-Z) letters. No numbers.
For example: Metrica Consular Card for Mexicans living abroad.
- `identityType=customID`
- `customIdentityTypeName=metricaConsularCard`

  - `context.person.identity.expirationDate` (string)
    Date the identification expires.

  - `context.person.identity.identityType` (string, required)
    Personal and business identifiers that are supported.
`customID` can be used for personal or business IDs that are not explicitly listed as one of the enum values.
If you pass `identityType=customID`, a `customIdentityTypeName` is also required.
For example: Metrica Consular Card for Mexicans living abroad.
- `identityType=customID`
- `customIdentityTypeName=metricaConsularCard`
    Enum: "SSN", "ITIN", "passport", "driversLicense", "taxID", "FEIN", "stateID", "customID"

  - `context.person.identity.issueDate` (string)
    Date the identification was issued.

  - `context.person.identity.issuingCountry` (string)
    Country that issued the identification. English short name according to ISO 3166-1 standard.

  - `context.person.identity.valid` (boolean)
    Whether the identity is valid.

  - `context.person.identity.value` (string, required)
    The value of a personal identifier. For example, *123456789*.

  - `context.reason` (string)
    Why the autopay was canceled.
    Enum: "invalidPaymentMethod", "paymentMethodRemoved", "tooManyFailedAttempts", "loanFrozen", "loanAccelerated", "loanChargedOff", "loanPaidOff", "canceledByUser", "loanTermsChanged"

  - `context.paymentSchedule` (array)
    The dates and amounts of payments to be made

  - `context.paymentSchedule.amount` (number)

  - `context.paymentSchedule.date` (string)

  - `context.nextDueDate` (string)
    The due date of the next payment.

  - `context.paymentDays` (integer)
    The number of days to the due date.

  - `context.expectedPaymentIds` (array)
    The IDs of the expected payments objects representing payments not yet made.

  - `context.overdueAmount` (number)
    The overdue amount

  - `context.newPaymentDate` (string)
    The new payment date

  - `context.oldPaymentDate` (string)
    The old payment date

  - `context.month` (string)
    The full name of the month the card expires (e.g., October, not Oct).

  - `context.year` (integer)
    The year the card expires.

  - `context.case` (object)

  - `context.case.associatedLoanIds` (string)
    The IDs of the loans associated with this case.

  - `context.case.associatedLoans` (array)
    The loans associated with this case.

  - `context.case.isReportingAssociatedLoans` (boolean)
    If any of the associated loans are reporting to credit agencies (`isReporting=true` in the API),
this will be `true`.

  - `context.confirmationCode` (string)
    The confirmation code to be sent.

  - `context.contactType` (string)
    The type of contact that was taken over. Only email and phone
can be taken over.
    Enum: "email", "phone"

  - `context.emailMasked` (string)
    The email address of the phone number which was taken over,
with most of the characters replaced with `*`.

  - `context.phoneNumberLastFour` (string)
    The last four digits of the phone number which was taken over.

  - `context.companyName` (string)
    The name of the company.

  - `context.investorContactName` (string)
    The name of the investor.

  - `context.drawAmount` (number)
    The amount of additional funds drawn.

  - `context.institutionName` (string)
    The name of the institution from which the funds are drawn.

  - `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.

  - `overrideTemplateId` (string)
    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.
    Example: TV-AAAA-BBBB

  - `personId` (string, required)
    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.

  - `subject` (string)
    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.
    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", "custom21", "custom22", "custom23", "custom24", "custom25", "custom26", "custom27", "custom28", "custom29", "custom30", "custom31", "custom32", "custom33", "custom34", "custom35", "custom36", "custom37", "custom38", "custom39", "custom40", "custom41", "custom42", "custom43", "custom44", "custom45", "custom46", "custom47", "custom48", "custom49", "custom50", "custom51", "custom52", "custom53", "custom54", "custom55", "custom56", "custom57", "custom58", "custom59", "custom60", "custom61", "custom62", "custom63", "custom64", "custom65", "custom66", "custom67", "custom68", "custom69", "custom70", "custom71", "custom72", "custom73", "custom74", "custom75", "custom76", "custom77", "custom78", "custom79", "custom80", "custom81", "custom82", "custom83", "custom84", "custom85", "custom86", "custom87", "custom88", "custom89", "custom90", "custom91", "custom92", "custom93", "custom94", "custom95", "custom96", "custom97", "custom98", "custom99", "custom100", "debtValidationNotice", "debtValidationNoticeArizona", "debtValidationNoticeAutomatic", "debtValidationNoticeNYCYonkers", "debtValidationNoticePuertoRico", "deceasedConfirmationOfPayoff", "deceasedNoticeToRepresentative", "deceasedNotificationUponDeath", "disputeOfDebtConfirmed", "disputeOfDebtSubmitDocumentation", "disputeOfDebtSubmitDocumentationReminder", "disputeOfDebtUnableToConfirm", "disputeOfDebtUnableToResolve", "documentUploadFailed", "downpaymentFailed", "drawFundsDisclosure", "electronicConsentOptOut", "failedSettlementInvestor", "failedSettlementPeach", "freeForm", "freeFormBranded", "futurepayCanceled", "futurepayPaymentDueReminder", "identityTheftIncompleteDocumentation", "identityTheftNotValidated", "identityTheftSubmitDocumentation", "identityTheftSubmitDocumentationFirstReminder", "identityTheftSubmitDocumentationSecondReminder", "identityTheftValidated", "letterReturnedToSender", "loanAccelerated", "loanCanceled", "loanChargedOffUnsecured", "loanDetails", "loanFeeCharged", "loanFreeze", "loanManualPaymentDisclosure", "loanOverdueFifthNotice", "loanOverdueFirstNotice", "loanOverdueFourthNotice", "loanOverdueSecondNotice", "loanOverdueSixthNotice", "loanOverdueThirdNotice", "loanPaidOff", "loanPaymentScheduleChanged", "loanPayoffStatement", "loanRefundProcessed", "loanRightToCurePersonalUnsecured", "loanRightToCurePersonalUnsecuredColorado", "loanRightToCurePersonalUnsecuredDC", "loanRightToCurePersonalUnsecuredIowa", "loanRightToCurePersonalUnsecuredKansas", "loanRightToCurePersonalUnsecuredMaine", "loanRightToCurePersonalUnsecuredMissouri", "loanRightToCurePersonalUnsecuredSouthCarolina", "loanRightToCurePersonalUnsecuredWestVirginia", "loanRightToCurePersonalUnsecuredWisconsin", "loanTermsChangeAgreement", "loanUnfreeze", "locCreditLimitChanged", "locInterestRateChanged", "locLineClosed", "locStatementGenerated", "locStatementRegenerated", "loginFirstPaymentReminder", "microdepositFailed", "microdepositProcessing", "microdepositReminder", "oneTimeCode", "paydayConsumerRightsNotice", "paydayFirstPaymentWithdrawal", "paymentDisputed", "paymentDueDateReminder", "paymentFailed", "paymentMethodAdded", "paymentMethodUpdated", "paymentProcessing", "paymentRescheduled", "paymentReversalFailed", "paymentReversalProcessing", "paymentSuccessful", "payoffStatementDocument", "promiseToPayPeriodKept", "promiseToPayPeriodMissed", "promiseToPayPlanCanceled", "promiseToPayPlanCreated", "promoProgramCanceled", "promoProgramEligibilityAtRisk", "promoProgramExercised", "promoProgramReminder", "reimbursementFailed", "reimbursementProcessed", "reimbursementScheduled", "scraApplicationDenied", "scraBenefitsApplied", "scraBenefitsExpiringNotice", "scraCGFlaggedDocumentRequest", "scraServicemanNotifiedDocumentRequest", "settlementOffer", "settlementOfferFirstReminder", "statement", "statementLOC", "statementGenerated", "statementRegenerated", "unmonitoredEmailAddress", "updateBankAccountConnection"

