Index Rates

This utility function is used for managing index interest rates (for example, a rate that is pegged to the prime rate of the Fed). Index Interest Rates are set at the loan type level and can be used by loans associated with the loanTypeId. Index Interest Rates are only relevant to interest rates and not relevant to promo rates.

Index Interest Rate values can be updated with a new value with an effective date in the past. When a new Index Interest Rate value is set, the previous rate end date will be set to one calendar day before the new rate's effective date. If the new rate's effective date is in the past, the Peach system will replay all Active loans (to clarify, Active loans at the time of Index Interest Rate update) with the new Index Interest Rate value and re-accrue loans' interest.

Add index interest rate

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

The loan type identifier.

Request Body schema: application/json
required
externalId
string or null (externalId) <= 50 characters

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: "ACBCE", ... } in the request body.

indexDescription
string

The index interest rate description. For example: "1 Month LIBOR Rate" or "Custom rate".

country
string = 2 characters

Country. English short name according to ISO 3166-1 standard.

annualRate
required
number <float>

The annual interest rate value for the period defined. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.

startDate
required
string <date>

The start date of the index rate in the product timezone. The start date is inclusive. When a new Index Interest Rate value is added, the previous rate end date will be set to one calendar day before the new rate's start date. If the new rate's start date is in the past, the Peach system will replay all "active" loans (to clarify, "active" loans at the time of Index Interest Rate addition) with the new Index Interest Rate value and re-accrue loans' interest. Replaying the entire portfolio of loans might take time. It is recommended that the Customer set the new Index Interest Rate at night.

endDate
string or null <date>

The index rate end date n the product timezone. The end date is inclusive. Pass null if you do not know when the rate will expire. If null, the rate is applicable until it changes.

Responses
200

Success

post/loan-types/{loanTypeId}/index-rates
Request samples
application/json
{
  • "externalId": "string",
  • "indexDescription": "string",
  • "country": "st",
  • "annualRate": 0,
  • "startDate": "2019-08-24",
  • "endDate": "2019-08-24"
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Get index interest rates

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

The loan type identifier.

query Parameters
fromDate
string <date>

The from date of the index rate. Pass the same value in the fromDate and toDate if you need to get the index rate for a specific date.

toDate
string <date>

The end date of the index rate. Pass the same value in the fromDate and toDate if you need to get the index rate for a specific date. If only a fromDate is specified, we assume no end date for the filter.

Responses
200

Success

get/loan-types/{loanTypeId}/index-rates
Response samples
application/json
{
  • "status": 0,
  • "count": 0,
  • "data": [
    ]
}

Update index interest rate

This endpoint is used for updating index interest rates.

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

The loan type identifier.

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

The index rate identifier. Can be Peach or lender's external identifier.

Request Body schema: application/json
required
annualRate
number <float>

The annual interest rate value for the period defined. Format is decimal. For example, 0.01 is 1% annual rate, 0.2 is 20% annual rate.

endDate
string or null <date>

The index rate end date in the product timezone. The end date is inclusive. Pass null if you do not know when the rate will expire. If null, the rate is applicable until it changes.

indexDescription
string

The index interest rate description. For example: "1 Month LIBOR Rate" or "Custom rate".

Responses
200

Success

put/loan-types/{loanTypeId}/index-rates/{indexRateId}
Request samples
application/json
{
  • "annualRate": 0,
  • "endDate": "2019-08-24",
  • "indexDescription": "string"
}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Get index interest rate by ID

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

The loan type identifier.

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

The index rate identifier. Can be Peach or lender's external identifier.

Responses
200

Success

get/loan-types/{loanTypeId}/index-rates/{indexRateId}
Response samples
application/json
{
  • "status": 0,
  • "message": "string",
  • "data": {
    }
}

Cancel index interest rate

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

The loan type identifier.

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

The index rate identifier. Can be Peach or lender's external identifier.

Responses
204

Success no content

delete/loan-types/{loanTypeId}/index-rates/{indexRateId}