Skip to main content

Add Cash To Teller Till

Overview

Adds cash to a teller till from a vault or external source.

Command

AddCashToTellerTillCommand

Endpoint

POST /api/bpm/cmd

Request Headers

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

Request Body

{
"cmd": "AddCashToTellerTillCommand",
"data": {
"tillId": "TILL-T001",
"amount": 100000.00,
"sourceType": "Vault",
"sourceId": "VLT-001",
"narration": "Mid-day till replenishment from vault"
}
}

Request Parameters

ParameterTypeRequiredDescription
cmdstringYesMust be "AddCashToTellerTillCommand"
dataobjectYesCash addition data
↳ tillIdstringYesUnique identifier of the till
↳ amountdecimalYesAmount to add (must be positive)
↳ sourceTypestringYesSource of cash (Vault, BankTransfer, CashDeposit)
↳ sourceIdstringNoIdentifier of the source (vault ID, etc.)
↳ narrationstringYesDescription of the cash addition
  • Description: Transaction description

Response

Success Response (200 OK)

{
"success": true,
"message": "Cash added to till successfully",
"data": {
"transactionId": "string",
"tillId": "string",
"amount": "decimal",
"previousBalance": "decimal",
"newBalance": "decimal",
"transactionDate": "datetime"
}
}

Error Responses

400 Bad Request

{
"success": false,
"message": "Validation failed",
"errors": ["Till ID is required", "Amount must be positive"]
}

409 Conflict

{
"success": false,
"message": "Till is not open"
}

Business Rules

  1. Till must be in "Open" status
  2. Amount must be positive
  3. Creates audit trail entry
  4. If from vault, vault must have sufficient balance

Code Example

async function addCashToTellerTill(tillId, amount, narration) {
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: 'AddCashToTellerTillCommand',
data: {
tillId: tillId,
amount: amount,
sourceType: 'Vault',
narration: narration
}
})
});

return await response.json();
}

Notes

  • Verify vault balance before transfers
  • Document denomination details for cash count
  • Keep detailed records for reconciliation