Skip to content

Update loan rate

Request

This endpoint is used for updating a single interest or promo rate. (don't pass both in the same call). The updating of an interest rate cannot lead to a gap in the loan where there is no reference interest rate.

Security
oauth2(Required scopes: rates:update) or bearerAuth or apiKeyHeader
Path
personIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

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

loanIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

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

rateIdstringrequired

Unique identifier of an interest or promo rate.

Bodyapplication/jsonrequired
interestRateobject(Interest rate)

An interest rate on a loan.

The system will treat the provided value according on the interest type that was set at the time of origination (see atOrigination.interestType attribute.)

To remind, interestType can have one of the following values: absolute or spread.

absolute - interest rates defined as absolute will use the value as provided in the annualRate attribute without adding the Index Interest Rate.

  • Negative interest annualRate value is not allowed.
  • If the provided annualRate is outside of the range defined on the loan type, the system will accept the annualRate 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 annualRate 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 annualRate 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, annualRate (aka spread) plus Index Interest Rate, is outside of the range defined on the loan type, the system will accept the annualRate but will return a warning in the response's object ratesValidation.
promoRateobject(Promo rate)

A promo rate on a loan. If the annual interest rate is 0.25 and the promo rate for the corresponding period is 0.05, the net interest rate after application of the promo rate would be 0.2.

caseIdstring

An identifier for an existing case.

PUT
/people/{personId}/loans/{loanId}/rates/{rateId}
curl -i -X PUT \
  'https://sandboxapi.peach.finance/api/people/{personId}/loans/{loanId}/rates/{rateId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "interestRate": {
      "annualRate": 0.1,
      "endDate": "2019-08-24",
      "startDate": "2019-08-24",
      "status": "active"
    },
    "promoRate": {
      "annualRate": 0.1,
      "endDate": "2019-08-24",
      "startDate": "2019-08-24",
      "status": "active"
    },
    "caseId": "string"
  }'

Responses

Success

Bodyapplication/json
messagestring

Description of the server action or error.

statusinteger

HTTP status code.

dataobject
Response
{ "message": "string", "status": 0, "data": { "ratesValidation": { … } } }