Approve Loan Account
Overviewโ
Approves a loan application allowing it to proceed to disbursement.
Endpointโ
POST /api/bpm/cmd
Request Headersโ
| Header | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication |
| Content-Type | string | Yes | Must be application/json |
| X-Tenant-Id | string | Yes | Tenant identifier |
Request Bodyโ
{
"cmd": "ApproveLoanCommand",
"data": {
"accountEncodedKey": "LN-2024-001234",
"comment": "Approved - All documentation verified"
}
}
Parametersโ
| Parameter | Type | Required | Description |
|---|---|---|---|
| cmd | string | Yes | Must be "ApproveLoanCommand" |
| data | object | Yes | Approval data |
| รขโ ยณ accountEncodedKey | string | Yes | Loan account identifier (EncodedKey or AccountNumber) |
| รขโ ยณ comment | string | No | Approval comments or notes |
Responseโ
Success Response (200 OK)โ
{
"success": true,
"message": "Loan approved successfully",
"data": {
"loanId": "LA-2024-00001",
"status": "Approved",
"approvalDate": "2024-01-15T14:00:00Z",
"approvedBy": "manager@bank.com",
"approvalComments": "Approved - All documentation complete",
"readyForDisbursement": true
}
}
Status Codesโ
| Code | Description |
|---|---|
| 200 | Loan approved successfully |
| 400 | Invalid request or loan not eligible for approval |
| 401 | Unauthorized |
| 403 | Insufficient approval authority |
| 404 | Loan not found |
| 409 | Loan already approved or in wrong status |
| 500 | Internal server error |
Business Rulesโ
- Loan must be in PendingApproval status
- Approver must have sufficient authority for loan amount
- All required documentation must be complete
- Credit checks must pass
- Approval logged in audit trail
Code Examplesโ
C# Exampleโ
Code Removed
Implementation details removed for security.
Contact support for implementation guidance.
TypeScript/JavaScript Exampleโ
async function approveLoan(loanAccountId: number, comments?: string): Promise<any> {
const commandRequest = {
cmd: 'ApproveLoanCommand',
data: { loanAccountId, comments }
};
const response = await fetch('/api/bpm/cmd', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`,
'X-Tenant-Id': tenantId
},
body: JSON.stringify({ loanId, approvalComments: comments })
});
const result = await response.json();
return result.data;
}
Notesโ
- Approval may trigger multiple approval levels
- System validates approver authority automatically
- Notifications sent to relevant parties
- Loan becomes eligible for disbursement
- Repayment schedule generated automatically