Skip to main content
PUT
/
v1
/
loans
/
{loan_id}
Update a loan
curl --request PUT \
  --url https://api-staging.bsa.ai/v1/loans/{loan_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "principal": 123,
  "numberOfRepayments": 123,
  "interestRatePerPeriod": 123,
  "externalId": "<string>"
}
'

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.

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 and then undo approval. This endpoint is numeric-id only — there is no /v1/loans/external/{loan_external_id} form.

Path parameters

loan_id
string
required

Request body

principal
number
numberOfRepayments
integer
interestRatePerPeriod
number
externalId
string
Only the fields you send are modified.

Example

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.

Errors

CodeWhen
not_foundNo loan with that ID
abortedLoan is not in pending state
invalid_argumentField violates a product-level constraint