Retrieve Deposit List
Overview
The RetrieveDepositListQuery allows you to retrieve a paginated list of deposit accounts from the banking system with various filtering and sorting options.
API Endpoint
POST /api/bpm/cmd
Headers
Content-Type: application/json
Authorization: Bearer {access_token}
X-Tenant-ID: {tenant_id}
Request Structure
{
"cmd": "RetrieveDepositListQuery",
"data": {
"pageNumber": 1,
"pageSize": 20,
"searchText": "string",
"id": "integer",
"status": [0, 1, 2],
"startDate": "2024-01-01",
"endDate": "2024-12-31",
"holderId": "long",
"asAcountHolder": false,
"asSignatory": false,
"isExport": false
}
}
Request Fields
| Field | Type | Required | Description | Default |
|---|---|---|---|---|
pageNumber | integer | No | Page number to retrieve | 1 |
pageSize | integer | No | Number of records per page | 10 |
searchText | string | No | Search text to filter accounts | - |
id | integer | No | Specific account ID to retrieve | - |
status | array | No | Array of deposit states to filter by | - |
startDate | string | No | Start date for date range filter (YYYY-MM-DD) | - |
endDate | string | No | End date for date range filter (YYYY-MM-DD) | - |
holderId | long | Conditional | Client ID (required if asAcountHolder or asSignatory is true) | - |
asAcountHolder | boolean | No | Filter accounts where client is account holder | false |
asSignatory | boolean | No | Filter accounts where client is signatory | false |
isExport | boolean | No | Whether to export all data (ignores pagination) | false |
Deposit Status Codes
Common deposit account states:
0- Pending Approval1- Approved/Active2- Closed3- Dormant4- Locked
Sample Request
{
"cmd": "RetrieveDepositListQuery",
"data": {
"pageNumber": 1,
"pageSize": 20,
"status": [1],
"searchText": "John"
}
}
Response Structure
Success Response
{
"isSuccessful": true,
"message": "Deposit list retrieved successfully",
"statusCode": "00",
"data": {
"pageNumber": 1,
"pageSize": 20,
"totalCount": 95,
"totalPages": 5,
"items": [
{
"id": 12345,
"accountNumber": "1234567890",
"accountName": "John Doe Savings Account",
"clientId": 67890,
"clientName": "John Doe",
"productId": 101,
"productName": "Regular Savings",
"currency": "NGN",
"balance": 250000.00,
"depositState": 1,
"branchId": 5,
"branchName": "Main Branch",
"dateCreated": "2024-01-15T10:30:00Z",
"lastModifiedDate": "2024-03-10T14:20:00Z"
}
]
}
}
Error Response
{
"isSuccessful": false,
"message": "Invalid date range provided",
"statusCode": "99",
"data": null
}
Use Cases
1. Retrieve Active Accounts
{
"cmd": "RetrieveDepositListQuery",
"data": {
"pageNumber": 1,
"pageSize": 50,
"status": [1]
}
}
2. Search for Customer Accounts
{
"cmd": "RetrieveDepositListQuery",
"data": {
"searchText": "John Doe",
"status": [1]
}
}
3. Get Accounts as Account Holder
{
"cmd": "RetrieveDepositListQuery",
"data": {
"holderId": 67890,
"asAcountHolder": true
}
}
4. Get Accounts as Signatory
{
"cmd": "RetrieveDepositListQuery",
"data": {
"holderId": 67890,
"asSignatory": true
}
}
5. Export All Accounts
{
"cmd": "RetrieveDepositListQuery",
"data": {
"isExport": true,
"status": [1]
}
}
Notes
- When
isExportis set totrue, pagination is ignored and all matching records are returned - Date filters use the
DateCreatedfield of the deposit account - The
startDatefilter includes accounts from the beginning of that day (00:00:00) - The
endDatefilter includes accounts up to the end of that day (23:59:59) - Search text filters across multiple fields including account number, account name, and customer name
- When
asAcountHolderorasSignatoryis true,holderIdis required - The
dataobject can include additional predicate filters using theDynamicPredicateBuilder
Related Commands
- Create Deposit - Create a new deposit account
- Retrieve Deposit By ID - Get specific deposit account details
- Retrieve Deposit Transaction List - Get transactions for deposit accounts