Skip to main content

Request Loan Approval

Overviewโ€‹

Submits a loan for approval workflow when all documentation is complete.

Endpointโ€‹

POST /api/bpm/cmd

Request Headersโ€‹

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

Request Bodyโ€‹

{
"cmd": "RequestLoanApprovalCommand",
"data": {
"accountEncodedKey": "LN-2024-001234",
"comment": "All documentation complete"
}
}

Parametersโ€‹

ParameterTypeRequiredDescription
cmdstringYesMust be "RequestLoanApprovalCommand"
dataobjectYesApproval request data
รขโ€ ยณ accountEncodedKeystringYesLoan account identifier (EncodedKey or AccountNumber)
รขโ€ ยณ commentstringNoNotes for approver

Responseโ€‹

Success Response (200 OK)โ€‹

{
"success": true,
"message": "Loan approval request submitted successfully",
"data": {
"loanId": "LA-2024-00001",
"status": "PendingApproval",
"requestedAt": "2024-01-12T10:00:00Z",
"requestedBy": "officer@bank.com",
"approvalLevel": "Level1",
"assignedTo": "manager@bank.com",
"estimatedApprovalTime": "24 hours"
}
}

Status Codesโ€‹

CodeDescription
200Approval request submitted successfully
400Loan not ready for approval
401Unauthorized
404Loan not found
409Loan already in approval workflow
500Internal server error

Business Rulesโ€‹

  • All required fields must be completed
  • Guarantors must be in place
  • Documentation must be complete
  • Loan automatically routed to appropriate approver based on amount
  • Approver notified automatically

Code Examplesโ€‹

C# Exampleโ€‹

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

TypeScript Exampleโ€‹

async function requestLoanApproval(loanId: string, notes?: string): Promise<ApprovalRequestResponse> {
const response = await fetch('/api/administration/loan/request-approval', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`,
'X-Tenant-Id': tenantId
},
body: JSON.stringify({ loanId, notes })
});

const result = await response.json();
return result.data;
}

Notesโ€‹

  • Validates all prerequisites before submission
  • Routes to appropriate approval level based on amount
  • Tracks approval request in workflow system
  • Notifications sent to approvers