Skip to main content

Undo Loan Approval

Overviewโ€‹

Reverses a loan approval before disbursement has occurred.

Endpointโ€‹

POST /api/bpm/cmd

Request Headersโ€‹

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

Request Bodyโ€‹

{
"cmd": "UndoLoanApprovalCommand",
"data": {
"loanAccountId": 12345,
"reason": "Incorrect information discovered",
"comments": "Need to reverify credit history"
}
}

Parametersโ€‹

ParameterTypeRequiredDescription
cmdstringYesMust be "UndoLoanApprovalCommand"
dataobjectYesUndo approval data
รขโ€ ยณ loanAccountIdintegerYesLoan account ID to undo approval for
รขโ€ ยณ reasonstringYesReason for undoing approval
รขโ€ ยณ commentsstringNoAdditional comments

Responseโ€‹

Success Response (200 OK)โ€‹

{
"success": true,
"message": "Loan approval undone successfully",
"data": {
"loanId": "LA-2024-00001",
"status": "Draft",
"approvalUndoneAt": "2024-01-16T09:00:00Z",
"undoneBy": "manager@bank.com",
"reason": "Additional documentation required"
}
}

Status Codesโ€‹

CodeDescription
200Approval undone successfully
400Cannot undo approval (loan disbursed)
401Unauthorized
403Insufficient authority
404Loan not found
409Loan not in approved status
500Internal server error

Business Rulesโ€‹

  • Can only undo before disbursement
  • Requires supervisory authority
  • Reason is mandatory
  • Loan returns to draft status
  • Re-approval required before disbursement

Code Examplesโ€‹

C# Exampleโ€‹

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

TypeScript Exampleโ€‹

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

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

Notesโ€‹

  • Cannot undo after disbursement
  • Requires higher authority than original approval
  • All approval history maintained in audit trail
  • Loan officer and customer notified
  • Loan must go through approval again