Skip to main content

Tellering Account Search

Overview

Searches for customer accounts to use in teller transactions.

Command

TelleringAccountSearchCommand

Endpoint

POST /api/bpm/cmd

Request Headers

Authorization: Bearer {access_token}
Content-Type: application/json
X-Tenant-Id: {tenant_id}

Request Body

{
"cmd": "TelleringAccountSearchCommand",
"data": {
"searchTerm": "0123456789",
"accountType": "Savings",
"branchId": "BRANCH-001",
"pageNumber": 1,
"pageSize": 20
}
}

Request Parameters

ParameterTypeRequiredDescription
cmdstringYesMust be "TelleringAccountSearchCommand"
dataobjectYesSearch criteria
↳ searchTermstringYesAccount number, customer name, or phone number to search
↳ accountTypestringNoFilter by account type (Savings, Current, Loan, FixedDeposit)
↳ branchIdstringNoFilter by branch
↳ pageNumberintegerNoPage number for pagination (default: 1)
↳ pageSizeintegerNoNumber of records per page (default: 20)

Response

Success Response (200 OK)

{
"success": true,
"message": "Accounts found",
"data": {
"accounts": [
{
"accountNumber": "string",
"accountName": "string",
"accountType": "string",
"customerName": "string",
"phoneNumber": "string",
"currentBalance": "decimal",
"accountStatus": "string",
"branchName": "string"
}
],
"pagination": {
"currentPage": 1,
"pageSize": 20,
"totalRecords": 50,
"totalPages": 3
}
}
}

Error Responses

400 Bad Request

{
"success": false,
"message": "Search term is required"
}

404 Not Found

{
"success": false,
"message": "No accounts found matching search criteria"
}

Business Rules

  1. Search term must be at least 3 characters
  2. Results limited to accounts user has access to
  3. Only active accounts shown by default
  4. Results sorted by relevance
  5. Maximum page size is 100 records

Code Example

async function searchAccounts(searchTerm, accountType = null) {
const response = await fetch('/api/bpm/cmd', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json',
'X-Tenant-Id': tenantId
},
body: JSON.stringify({
commandType: 'TelleringAccountSearchCommand',
data: {
searchTerm: searchTerm,
accountType: accountType,
pageNumber: 1,
pageSize: 20
}
})
});

return await response.json();
}

Notes

  • Use for quick account lookup during teller transactions
  • Search by partial account number or customer name
  • Verify customer identity before processing transactions
  • Consider using account number for exact match searches