Skip to main content
POST
/
v1
/
customers
/
{customer_id}
/
close
Close a customer
curl --request POST \
  --url https://api-staging.bsa.ai/v1/customers/{customer_id}/close \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "closureDate": "<string>",
  "closureReasonId": 123
}
'

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.

Closes a customer. The customer can no longer hold new loans or accounts but historical records remain queryable. Closure cannot be undone — there is no “reopen” endpoint.
Customers with open loans or active savings accounts cannot be closed. Close those first.
Two equivalent forms — see Addressing a customer.

Path parameters

customer_id
string
required
LMS id, or the externalId on the /external/{customer_external_id}/close form.

Request body

closureDate
string
required
ISO-8601 YYYY-MM-DD. The effective date of closure.
closureReasonId
integer
required
Closure reason code. Valid values are configured per deployment.

Examples

# By LMS id
curl -sf -X POST "$BASE/v1/customers/42/close" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"closureDate": "2026-12-31", "closureReasonId": 17}'

# By externalId
curl -sf -X POST "$BASE/v1/customers/external/ext-ada-001/close" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"closureDate": "2026-12-31", "closureReasonId": 17}'

Response

200 OK returns the customer object with status="Closed".

Errors

CodeWhen
not_foundNo customer with that ID
abortedCustomer has open loans/accounts, or is already closed
invalid_argumentMissing closureDate or closureReasonId