Deactivate Book Register
Overview
The DeactivateBookRegisterCommand deactivates an active book register, preventing it from being used for transactions. This is typically done when a book is exhausted, lost, or temporarily suspended.
API Endpoint
POST /api/bpm/cmd
Headers
Content-Type: application/json
Authorization: Bearer {access_token}
X-Tenant-ID: {tenant_id}
Request Structure
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 789,
"remarks": "All cheques exhausted, book completed"
}
}
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | long | Yes | The unique identifier of the book register to deactivate |
remarks | string | No | Optional notes explaining the deactivation |
Sample Requests
1. Book Exhausted
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 789,
"remarks": "All 50 cheques used, book completed"
}
}
2. Customer Reported Lost
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 456,
"remarks": "Customer reported cheque book lost - security hold pending investigation"
}
}
3. Account Dormant
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 321,
"remarks": "Account marked dormant, deactivating all books"
}
}
4. Temporary Suspension
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 654,
"remarks": "Temporary hold - pending KYC document verification"
}
}
Response Structure
Success Response
{
"isSuccessful": true,
"message": "Book register deactivated successfully.",
"statusCode": "00",
"data": {
"id": 789,
"bookType": 1,
"bookTypeDescription": "Cheque",
"bookReference": "CHQ-2024-001",
"depositAccountId": 12345,
"accountNumber": "1234567890",
"status": 2,
"statusDescription": "INACTIVE",
"isActive": false,
"remarks": "All cheques exhausted, book completed",
"updatedAt": "2024-12-05T14:30:00Z",
"updatedBy": "admin@bank.com"
}
}
Error Responses
Book Not Found
{
"isSuccessful": false,
"message": "Book register not found.",
"statusCode": "99",
"data": null
}
Already Inactive
{
"isSuccessful": false,
"message": "Book register is already inactive.",
"statusCode": "99",
"data": null
}
Already Blocked
{
"isSuccessful": false,
"message": "Book register is already blocked.",
"statusCode": "99",
"data": null
}
Status Transition Rules
Valid Transitions:
- ACTIVE (1) → INACTIVE (2) ✅ Allowed
Invalid Transitions:
- INACTIVE (2) → INACTIVE (2) ❌ Already inactive
- BLOCKED (3) → INACTIVE (2) ❌ Already permanently blocked
Use Cases
1. Natural Completion - Book Exhausted
The most common scenario: all leaves in the book have been used.
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 789,
"remarks": "All 50 leaves utilized - book lifecycle complete"
}
}
2. Security Hold - Lost/Stolen
Customer reports book as lost or stolen. Immediately deactivate to prevent fraud.
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 456,
"remarks": "URGENT: Customer reported stolen at 10:30 AM - Call log ref #12345"
}
}
3. Regulatory Compliance
Account flagged by compliance, all banking instruments temporarily suspended.
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 321,
"remarks": "Compliance hold - AML review in progress - Case #AML-2024-456"
}
}
4. Account Closure Preparation
Account being closed, deactivate all associated books.
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 654,
"remarks": "Account closure request #CL-789 - deactivating all books"
}
}
5. Issuing Replacement
Old book being replaced with new one. Deactivate old before issuing replacement.
{
"cmd": "DeactivateBookRegisterCommand",
"data": {
"id": 987,
"remarks": "Replaced by new book #1025 - customer requested new design"
}
}
Difference: Deactivate vs Block
| Aspect | Deactivate | Block |
|---|---|---|
| Purpose | Temporary suspension or normal completion | Permanent security action |
| Reversibility | Can be reactivated | Cannot be reversed |
| Reason | Exhausted, lost, temporary hold | Fraud, suspicious activity |
| Severity | Low to medium | High - security incident |
| Remarks | Optional | Mandatory (required) |
Business Rules
-
Status Validation
- Only ACTIVE books can be deactivated
- INACTIVE books return an error (already deactivated)
- BLOCKED books return an error (already permanently disabled)
-
Transaction Prevention
- Deactivated books cannot be used for any transactions
- Any pending transactions using serial numbers from this book should be flagged
-
Reactivation Allowed
- Unlike blocking, deactivation is reversible
- Use
ActivateBookRegisterCommandto reactivate if needed
-
Audit Trail
- All deactivations are logged with timestamp and user
- The
remarksfield provides context for audit reviews
Best Practices
-
Document Reason Thoroughly
- Always provide detailed remarks explaining deactivation
- Include reference numbers for related tickets/calls
- Specify whether it's permanent (exhausted) or temporary (lost/investigation)
-
Immediate Action for Security
- Deactivate immediately when customer reports lost/stolen
- Don't wait for investigation to start deactivation
- Use block command if fraud is confirmed
-
Communication
- Notify customer when their book is deactivated (except fraud cases)
- Provide replacement timeline if applicable
- Document customer interaction
-
Verification
- Verify caller identity when deactivating for "lost" reports
- Check for patterns of repeated lost book reports (potential fraud)
- Review recent transactions on the account
-
Coordinate with Issuance
- Deactivate old book before issuing replacement
- Ensure no serial number overlap between old and new books
- Update customer records with new book details
Notes
- Deactivation is immediate and affects all transactions using this book
- Unlike block, deactivation can be reversed if needed (e.g., book found)
- Cache is automatically invalidated after successful deactivation
- The book's serial numbers remain in the system for audit purposes
- No new transactions can reference serial numbers from an inactive book
- For permanent removal (fraud/security), use the Block command instead
Related Commands
- Activate Book Register - Reactivate an inactive book
- Block Book Register - Permanently block for security
- Retrieve Book Register By ID - Check current status
- Create Book Register - Issue replacement book