Skip to content

Create promo program type

Request

Security
oauth2(Required scopes: loan.promoprogram.type:create) or bearerAuth or apiKeyHeader
Path
companyIdstringrequired

The unique company identifier.

Bodyapplication/jsonrequired
promoTypestring(PromoType)required

The promotional program type.

sameAsCash - presently only available for installment loans.

deferredInterest - presently only available for Lines of Credit / Draws.

Enum:"sameAsCash""deferredInterest"
descriptionstring, <= 10000 characters

A legal description of the promotional program as it should be communicated and shown to borrowers. If the description is provided, borrowers will see the description in the App / Borrower Portal and/or on statements.

displayNamestringrequired

The promotional program name as it is shown to borrowers in the App / Borrower Portal and/or on statements.

externalIdstring

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

metaDataobject or null

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

statusstring

The promo type status. A new type is normally created in the draft status. When you are ready to offer the promotional program type on loans, update the status to active.

Setting the status to inactive means the promotional program cannot be used on new loans. Loans in-flight will continue to be eligible. deprecated is the legacy equivalent of inactive: it is never returned in responses (such rows serialize as inactive) and is rejected as a write value.

archived is a terminal state set via the archive (DELETE) endpoint, not via update. Archived types cannot be edited.

Default:"draft"
Enum:"draft""active""deprecated""inactive""archived"
POST
/companies/{companyId}/promo-program-types
curl -i -X POST \
  'https://sandboxapi.peach.finance/api/companies/{companyId}/promo-program-types' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "promoType": "sameAsCash",
    "description": "string",
    "displayName": "string",
    "externalId": "string",
    "metaData": {},
    "status": "draft"
  }'

Responses

Success

Bodyapplication/json
messagestring

Description of the server action or error.

statusinteger

HTTP status code.

dataobject(PromoProgramTypeFields)
Response
{ "message": "string", "status": 0, "data": { "archived": true, "archivedAt": "2019-08-24T14:15:22Z", "archivedBy": "string", "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "description": "string", "displayName": "string", "externalId": "string", "id": "string", "metaData": {}, "status": "draft", "updatedAt": "2019-08-24T14:15:22Z" } }