Skip to main content
DELETE
/
v1
/
loans
/
{loan_id}
Delete a loan
curl --request DELETE \
  --url https://api-staging.bsa.ai/v1/loans/{loan_id} \
  --header 'Authorization: Bearer <token>'

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.

Only loans in submitted and pending approval state can be deleted. Because POST /v1/loans always lands at Active, reaching a deletable state requires first calling undo disbursal and then undo approval. To stop an active loan without removing it from the record, use Write off instead. Two equivalent forms — prefer the externalId form for partner integrations.
# By loan externalId (recommended)
curl -X DELETE "$BASE/v1/loans/external/halotel-tx-12345" \
  -H "Authorization: Bearer $TOKEN"

# Same effect, by LMS id
curl -X DELETE "$BASE/v1/loans/501" \
  -H "Authorization: Bearer $TOKEN"

Path parameters

loan_id
string
required

Example

curl -sf -X DELETE "$BASE/v1/loans/501" \
  -H "Authorization: Bearer $TOKEN"

Response

204 No Content with an empty body.

Errors

CodeWhen
not_foundNo loan with that ID
permission_deniedLoan is not in Submitted and pending approval state (e.g. Active, Closed, Overpaid). The loan is left untouched.