Skip to main content

Open Teller Till

Overview​

Opens a new teller till for a teller to conduct cash transactions during their shift.

Command​

OpenTellerTillCommand

Endpoint​

POST /api/bpm/cmd

Request Headers​

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

Request Body​

{
"cmd": "OpenTellerTillCommand",
"data": {
"tellerId": "TELLER-001",
"branchId": "BRANCH-001",
"currencyCode": "NGN",
"openingBalance": 500000.00,
"vaultId": "VLT-001",
"shiftStartTime": "2024-01-15T08:00:00Z"
}
}

Request Parameters​

ParameterTypeRequiredDescription
cmdstringYesMust be "OpenTellerTillCommand"
dataobjectYesTill opening data
↳ tellerIdstringYesUnique identifier of the teller
↳ branchIdstringYesBranch where the till is being opened
↳ currencyCodestringYesCurrency for the till (e.g., "NGN", "USD")
↳ openingBalancedecimalYesInitial cash amount in the till
↳ vaultIdstringNoSource vault ID for opening balance verification
↳ shiftStartTimedatetimeNoShift start time (defaults to current time)
  • Description: Source vault for the opening balance

shiftStartTime​

  • Type: datetime
  • Required: No
  • Default: Current date/time
  • Description: Start time of the teller's shift

Response​

Success Response (200 OK)​

{
"success": true,
"message": "Teller till opened successfully",
"data": {
"tillId": "string",
"tellerId": "string",
"tellerName": "string",
"branchId": "string",
"branchName": "string",
"currencyCode": "string",
"openingBalance": "decimal",
"currentBalance": "decimal",
"status": "Open",
"shiftStartTime": "datetime"
}
}

Error Responses​

400 Bad Request​

{
"success": false,
"message": "Validation failed",
"errors": ["Teller ID is required", "Opening balance must be positive"]
}

409 Conflict​

{
"success": false,
"message": "Teller already has an open till"
}

Business Rules​

  1. Teller can only have one open till at a time
  2. Opening balance must be positive
  3. Vault must have sufficient funds if specified
  4. Teller must be assigned to the branch
  5. Creates audit trail for till opening

Code Example​

async function openTellerTill(tellerId, branchId, openingBalance, currencyCode) {
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: 'OpenTellerTillCommand',
data: {
tellerId: tellerId,
branchId: branchId,
currencyCode: currencyCode,
openingBalance: openingBalance,
shiftStartTime: new Date().toISOString()
}
})
});

return await response.json();
}

Notes​

  • Always verify opening balance against vault records
  • Document denominations for cash count verification
  • Ensure teller has proper permissions before opening till
  • Opening balance should match physical cash on hand