> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lms.bsa.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a loan

> Modify a loan that is still in submitted and pending approval state.

Modify a loan that is still in **submitted and pending approval**
state. Send only the fields you want to change. Once a loan is
approved or active, this endpoint will reject the update — to reach a
pending state you must first
[undo disbursal](/loans/undo-disbursal) and then
[undo approval](/loans/undo-approval).

This endpoint is **numeric-id only** — there is no
`/v1/loans/external/{loan_external_id}` form.

## Path parameters

<ParamField path="loan_id" type="string" required />

## Request body

<ParamField body="principal" type="number" />

<ParamField body="numberOfRepayments" type="integer" />

<ParamField body="interestRatePerPeriod" type="number" />

<ParamField body="externalId" type="string" />

Only the fields you send are modified.

## Example

```bash theme={null}
curl -sf -X PUT "$BASE/v1/loans/501" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "principal": 6000,
    "numberOfRepayments": 18
  }'
```

## Response

`200 OK` returns the updated [loan object](/loans/overview).

## Errors

| Code               | When                                      |
| ------------------ | ----------------------------------------- |
| `not_found`        | No loan with that ID                      |
| `aborted`          | Loan is not in pending state              |
| `invalid_argument` | Field violates a product-level constraint |
