Approve Deposit Account
Overviewโ
The ApproveDepositCommand allows supervisors or authorized users to approve a pending deposit account, activating it for use.
Endpointโ
POST /api/bpm/cmd
Request Bodyโ
{
"cmd": "ApproveDepositCommand",
"data": {
"accountEncodedKey": "DEP-123456",
"comment": "Account approved after verification"
}
}
Request Parametersโ
| Parameter | Type | Required | Description |
|---|---|---|---|
| cmd | string | Yes | Must be "ApproveDepositCommand" |
| data | object | Yes | Approval data |
| รขโ ยณ accountEncodedKey | string | Yes | Deposit account identifier |
| รขโ ยณ comment | string | No | Approval comment |
## Response Structure
### Success Response
```json
{
"succeeded": true,
"message": "Deposit account approved successfully",
"data": {
"depositId": "DEP001234",
"accountNumber": "1234567890",
"status": "Active",
"approvedBy": "supervisor@bank.com",
"approvedDate": "2024-01-16T10:00:00Z",
"approvalComments": "Account documentation verified. Approved for activation."
},
"statusCode": 200
}
Error Responseโ
{
"succeeded": false,
"message": "Failed to approve deposit account",
"errors": [
{
"code": "DEPOSIT_NOT_PENDING",
"message": "Deposit account is not in Pending_Approval status",
"field": "depositId"
}
],
"statusCode": 400
}
Field Descriptionsโ
| Field | Type | Required | Description |
|---|---|---|---|
depositId | string | Yes | Unique identifier of the deposit account to approve |
approvalComments | string | No | Comments explaining the approval decision |
Business Rulesโ
-
Status Requirements
- Deposit account must be in "Pending_Approval" status
- Account must not already be approved or rejected
-
Authorization
- User must have approval permissions
- User cannot approve their own requests (maker-checker separation)
- User must be assigned to the same branch or have cross-branch approval rights
-
Account Activation
- Upon approval, account status changes to "Active"
- Account becomes available for transactions
- Customer notifications are triggered
Error Codesโ
| Code | Description | HTTP Status |
|---|---|---|
DEPOSIT_NOT_FOUND | Deposit account does not exist | 404 |
DEPOSIT_NOT_PENDING | Deposit account is not pending approval | 400 |
SELF_APPROVAL_NOT_ALLOWED | Cannot approve your own request | 403 |
INSUFFICIENT_PERMISSIONS | User does not have approval permissions | 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 approveDepositAccount(depositId: string, comments: string) {
const command = {
depositId,
approvalComments: comments
};
const response = await this.client.deposits.approve(command);
if (response.succeeded) {
console.log(`Deposit account ${response.data.accountNumber} approved`);
console.log(`Status: ${response.data.status}`);
}
return response;
}
cURL Exampleโ
curl -X POST https://api.banklingo.com/api/administration/deposits/approve \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"depositId": "DEP001234",
"approvalComments": "Account documentation verified. Approved for activation."
}'
Related Commandsโ
- Request Deposit Approval - Submit deposit for approval
- Reject Deposit - Reject pending deposit account
- Retrieve Deposit By ID - Get deposit account details