Skip to main content

Approve Loan Account

Overviewโ€‹

Approves a loan application allowing it to proceed to disbursement.

Endpointโ€‹

POST /api/bpm/cmd

Request Headersโ€‹

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
Content-TypestringYesMust be application/json
X-Tenant-IdstringYesTenant identifier

Request Bodyโ€‹

{
"cmd": "ApproveLoanCommand",
"data": {
"accountEncodedKey": "LN-2024-001234",
"comment": "Approved - All documentation verified"
}
}

Parametersโ€‹

ParameterTypeRequiredDescription
cmdstringYesMust be "ApproveLoanCommand"
dataobjectYesApproval data
รขโ€ ยณ accountEncodedKeystringYesLoan account identifier (EncodedKey or AccountNumber)
รขโ€ ยณ commentstringNoApproval 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โ€‹

CodeDescription
200Loan approved successfully
400Invalid request or loan not eligible for approval
401Unauthorized
403Insufficient approval authority
404Loan not found
409Loan already approved or in wrong status
500Internal 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