Promo Programs

Create promo program

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Request Body schema: application/json
required
promoTypeId
required
string

The promotional program type's unique identifier.

externalId
string

A lender's unique identifier for a specific promotional program.

status
required
string

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"
promoStartDate
string <date> (PromoStartDate)

Only applicable to installment promo programs.

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. The promoStartDate can be a date in the past.

For installment loans, 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.

This date field should be in the product timezone.

promoStartDatetime
string <date-time> (PromoStartDatetime)

Only applicable to draw promo programs.

For line of credit products, the promoStartDatetime is required, as the system takes the outstanding purchase amount on the promoStartDatetime as the amount that needs to be satisfied in order to exercise the promo program. Presently, existence of purchases after the start date will disqualify the promo from being created. If needed, purchases may be backdated prior to promoStartDatetime.

For draw promo programs, the promoStartDatetime is optional at the time of promo program creation in pending status. The promoStartDatetime can be updated while in pending status or passed in during promo program activation. If the value is not passed during activation, the system will check for a promoStartDatetime that was passed in on promo program creation. And in the absence of that, promoStartDatetime will be set equal to the datetime when the promo program is activated.

For Same as Cash promo programs, for line of credit / draws, the waiving of interest benefit only applies from the promoStartDatetime to the promoEndDate.

This datetime field should be in UTC.

promoEndDate
string <date> (PromoEndDate)

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.

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.

promoGracePeriodDays
integer

The promotional program grace period as a number of calendar days.

sacDisqualifyOverdueDays
integer

The number of loan overdue days that would disqualify the promotional program. Any occurrence ofsacDisqualifyOverdueDays or more of number days overdue during the promotional period would disqualify (aka cancel) the promotional program.

metaData
object or null

Store any type of key/value pairs in the form of a JSON dictionary.

caseId
string

An identifier for an existing case.

Responses
200

Success

post/people/{personId}/loans/{loanId}/promo-programs
Request samples
application/json
{
  • "promoTypeId": "string",
  • "externalId": "string",
  • "status": "pending",
  • "promoStartDate": "2019-08-24",
  • "promoStartDatetime": "2019-08-24T14:15:22Z",
  • "promoEndDate": "2019-08-24",
  • "promoDurationDays": 0,
  • "promoGracePeriodDays": 0,
  • "sacDisqualifyOverdueDays": 0,
  • "metaData": { },
  • "caseId": "string"
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Get promo programs

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

Responses
200

Success

get/people/{personId}/loans/{loanId}/promo-programs
Response samples
application/json
{
  • "status": 0,
  • "count": 0,
  • "data": {
    }
}

Get promo program by ID

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

promoProgramId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The promotional program identifier.

Responses
200

Success

get/people/{personId}/loans/{loanId}/promo-programs/{promoProgramId}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Update promo program

There a few restrictions on what can be updated. promoTypeId cannot be updated. If status=pending - any attribute except for status can be updated. To activate use the Activate promo program endpoint. If status=active - promoType, status, promoDurationDays and promoStartDate cannot be updated. If status=canceled - promoType, promoDurationDays and promoStartDate cannot be updated. If status=exercised - no attributes can be updated.

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

promoProgramId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The promotional program identifier.

Request Body schema: application/json
required
externalId
string

A lender's unique identifier for a specific promotional program.

status
string

The promotional program status on a specific loan.

pending - the promotion was created but was not activated yet.

active - the promotion is active.

canceled - the promotion has been canceled for a reason. The reason provided in the promoCancelReason attribute.

exercised - the promotion was successfully exercised.

Enum: "pending" "active" "canceled" "exercised"
promoStartDate
string <date> (PromoStartDate)

Only applicable to installment promo programs.

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. The promoStartDate can be a date in the past.

For installment loans, 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.

This date field should be in the product timezone.

promoStartDatetime
string <date-time> (PromoStartDatetime)

Only applicable to draw promo programs.

For line of credit products, the promoStartDatetime is required, as the system takes the outstanding purchase amount on the promoStartDatetime as the amount that needs to be satisfied in order to exercise the promo program. Presently, existence of purchases after the start date will disqualify the promo from being created. If needed, purchases may be backdated prior to promoStartDatetime.

For draw promo programs, the promoStartDatetime is optional at the time of promo program creation in pending status. The promoStartDatetime can be updated while in pending status or passed in during promo program activation. If the value is not passed during activation, the system will check for a promoStartDatetime that was passed in on promo program creation. And in the absence of that, promoStartDatetime will be set equal to the datetime when the promo program is activated.

For Same as Cash promo programs, for line of credit / draws, the waiving of interest benefit only applies from the promoStartDatetime to the promoEndDate.

This datetime field should be in UTC.

promoEndDate
string <date> (PromoEndDate)

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.

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.

promoGracePeriodDays
integer

The promotional program grace period as a number of calendar days.

sacDisqualifyOverdueDays
integer

The number of loan overdue days that would disqualify the promotional program. Any occurrence of sacDisqualifyOverdueDays or more during the promotional period would disqualify (aka cancel) the promotional program.

metaData
object or null

Store any type of key/value pairs in the form of a JSON dictionary.

caseId
string

An identifier for an existing case.

Responses
200

Success

put/people/{personId}/loans/{loanId}/promo-programs/{promoProgramId}
Request samples
application/json
{
  • "externalId": "string",
  • "status": "pending",
  • "promoStartDate": "2019-08-24",
  • "promoStartDatetime": "2019-08-24T14:15:22Z",
  • "promoEndDate": "2019-08-24",
  • "promoDurationDays": 0,
  • "promoGracePeriodDays": 0,
  • "sacDisqualifyOverdueDays": 0,
  • "metaData": { },
  • "caseId": "string"
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Cancel promo program

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

promoProgramId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The promotional program identifier.

query Parameters
promoCancelReason
string

The cancellation reason.

expired - the promo expired.

disqualified - the promo was disqualified for various reasons.

borrowerOptedOut - the borrower decided to opt out from the promotional program.

Enum: "expired" "disqualified" "borrowerOptedOut"
sendNotice
boolean
Default: true

When set to true the system will send a promoProgramCanceled notice to the borrower.

caseId
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The case object unique identifier.

Responses
200

Success

delete/people/{personId}/loans/{loanId}/promo-programs/{promoProgramId}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Activate promo program

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

loanId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The unique identifier of the Loan we wish to retrieve. Can be Peach or lender's external identifier.

promoProgramId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The promotional program identifier.

Request Body schema: application/json
required
promoStartDatetime
string <date-time> (PromoStartDatetime)

Only applicable to draw promo programs.

For line of credit products, the promoStartDatetime is required, as the system takes the outstanding purchase amount on the promoStartDatetime as the amount that needs to be satisfied in order to exercise the promo program. Presently, existence of purchases after the start date will disqualify the promo from being created. If needed, purchases may be backdated prior to promoStartDatetime.

For draw promo programs, the promoStartDatetime is optional at the time of promo program creation in pending status. The promoStartDatetime can be updated while in pending status or passed in during promo program activation. If the value is not passed during activation, the system will check for a promoStartDatetime that was passed in on promo program creation. And in the absence of that, promoStartDatetime will be set equal to the datetime when the promo program is activated.

For Same as Cash promo programs, for line of credit / draws, the waiving of interest benefit only applies from the promoStartDatetime to the promoEndDate.

This datetime field should be in UTC.

Responses
204

Success

post/people/{personId}/loans/{loanId}/promo-programs/{promoProgramId}/activate
Request samples
application/json
{
  • "promoStartDatetime": "2019-08-24T14:15:22Z"
}