Undo Deposit Approval
Overviewโ
The UndoDepositApprovalCommand allows users to retract a previously approved deposit account, reverting it to draft status.
Endpointโ
POST /api/bpm/cmd
Request Bodyโ
{
"cmd": "UndoDepositApprovalCommand",
"data": {
"accountEncodedKey": "DEP-123456",
"comment": "Need to reverify documents"
}
}
Request Parametersโ
| Parameter | Type | Required | Description |
|---|---|---|---|
| cmd | string | Yes | Must be "UndoDepositApprovalCommand" |
| data | object | Yes | Undo approval data |
| รขโ ยณ accountEncodedKey | string | Yes | Deposit account identifier |
| รขโ ยณ comment | string | No | Reason for undoing approval |
## Response Structure
### Success Response
```json
{
"succeeded": true,
"message": "Deposit approval undone successfully",
"data": {
"depositId": "DEP001234",
"accountNumber": "1234567890",
"status": "Draft",
"undoneBy": "user@bank.com",
"undoneDate": "2024-01-16T11:00:00Z",
"reason": "Account information needs to be corrected before activation"
},
"statusCode": 200
}
Field Descriptionsโ
| Field | Type | Required | Description |
|---|---|---|---|
depositId | string | Yes | Unique identifier of the deposit account |
reason | string | Yes | Reason for undoing the approval |
Business Rulesโ
-
Status Requirements
- Account must be in "Active" or "Pending_Approval" status
- Account must not have any transactions posted
-
Authorization
- User must have permission to undo approvals
- Typically restricted to supervisors or system administrators
-
Transaction Check
- Cannot undo approval if account has posted transactions
- Balance must be zero or initial deposit only
Error Codesโ
| Code | Description | HTTP Status |
|---|---|---|
DEPOSIT_NOT_FOUND | Deposit account does not exist | 404 |
CANNOT_UNDO_APPROVAL | Account has transactions and cannot be reverted | 400 |
INVALID_STATUS | Account status does not allow undo operation | 400 |
INSUFFICIENT_PERMISSIONS | User does not have permission | 403 |
INTERNAL_ERROR | An unexpected error occurred | 500 |
Code Examplesโ
C# Exampleโ
Code Removed
Implementation details removed for security.
Contact support for implementation guidance.
JavaScript/TypeScript Exampleโ
async undoDepositApproval(depositId: string, reason: string) {
const command = {
depositId,
reason
};
const response = await this.client.deposits.undoApproval(command);
if (response.succeeded) {
console.log(`Deposit approval undone: ${response.data.accountNumber}`);
console.log(`New Status: ${response.data.status}`);
}
return response;
}
Related Commandsโ
- Approve Deposit - Approve pending deposit
- Request Deposit Approval - Submit deposit for approval