Skip to main content
POST
/
v1
/
loans
/
{loan_id}
/
writeoff
Write off a loan
curl --request POST \
  --url https://api-dev.bsa.ai/v1/loans/{loan_id}/writeoff \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "transactionDate": "<string>",
  "note": "<string>"
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.api.bsa.ai/llms.txt

Use this file to discover all available pages before exploring further.

Writes off the entire outstanding balance of a loan. The loan transitions to closed (written off). Use this when the loan is deemed uncollectible. Recovery payments collected after write-off can still be recorded via Recover.

Path parameters

loan_id
string
required

Request body

transactionDate
string
required
ISO-8601 YYYY-MM-DD. The effective date of the write-off.
note
string
Optional. Justification for the write-off.

Example

curl -sf -X POST "$BASE/v1/loans/501/writeoff" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "transactionDate": "2027-01-15",
    "note": "Borrower deceased — no estate"
  }'

Response

200 OK returns the loan object with status="Closed (written off)".

Errors

CodeWhen
not_foundNo loan with that ID
abortedLoan has no outstanding balance, or is in a state that cannot be written off