# Update loan rate cap

This endpoint is used for updating a single rate cap on a loan.
If a rate cap is updated on a loan for past periods and the
loan rate exceeds the cap, we will replay the loan to apply
the capped rate. If a rate cap is added for past periods and the loan
rate is not affected by the `maxRate` update, then we will not replay the loan.

Endpoint: PUT /people/{personId}/loans/{loanId}/rate-caps/{rateCapId}
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `personId` (string, required)
    A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

  - `loanId` (string, required)
    The unique identifier of the Loan we wish to retrieve. Can be
Peach or lender's external identifier.

  - `rateCapId` (string, required)
    The unique identifier of the Rate Cap we wish to retrieve.

## Request fields (application/json):

  - `endDate` (string)
    Rate cap end date in product timezone, inclusive. If null, applies until end of loan/draw.

  - `maxRate` (number)
    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.

  - `rateCapReason` (string)
    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"

  - `startDate` (string)
    Rate cap start date in product timezone, inclusive.

## Response 200 fields (application/json):

  - `message` (string)
    Description of the server action or error.

  - `status` (integer)
    HTTP status code.

  - `data` (object)
    The Rate Cap object represents the rate caps associated with each loan or draw.
Rate caps apply to both `spread` and `absolute` rate types. If two or more rate
caps overlap on the same dates, we will use the lowest value.

  - `data.createdAt` (string)
    When the rate cap was created.

  - `data.endDate` (string)
    Rate cap end date in product timezone, inclusive. If null, applies until end of loan/draw.

  - `data.id` (string)
    The rate cap identifier.

  - `data.maxRate` (number)
    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.

  - `data.rateCapReason` (string)
    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"

  - `data.startDate` (string)
    Rate cap start date in product timezone, inclusive.

  - `data.updatedAt` (string)
    When the rate cap was last updated.

