Skip to main content

Update Deposit Account

Overview

The UpdateDepositCommand allows you to update an existing deposit account's information in the banking system. This command enables modification of account details, settings, and configuration after the account has been created.

Endpoint

POST /api/bpm/cmd

Request Body

{
"cmd": "UpdateDepositCommand",
"data": {
"depositEncodedKey": "DEP-123456",
"productDisplayName": "John Doe Premium Savings Account",
"associationInformation": {
"accountOfficerEncodedKey": "OFF-789",
"clientBranchEncodedKey": "BRANCH-001"
},
"accountInformation": {
"accountTierId": 2,
"accountState": "Active"
},
"signatoryInformation": [
{
"clientEncodedKey": "CLI-123456",
"role": "Primary",
"signatoryType": "Single"
}
],
"notes": "Updated account tier and officer"
}
}

Request Parameters

ParameterTypeRequiredDescription
cmdstringYesMust be "UpdateDepositCommand"
dataobjectYesUpdate data
↳ depositEncodedKeystringYesDeposit account identifier
↳ productDisplayNamestringNoUpdated account name
↳ associationInformationobjectYesAccount associations
  â†³ accountOfficerEncodedKeystringYesAccount officer identifier
  â†³ clientBranchEncodedKeystringYesBranch identifier
↳ accountInformationobjectYesAccount details
  â†³ accountTierIdintegerNoAccount tier identifier
  â†³ accountStatestringNoAccount state
↳ signatoryInformationarrayYesList of signatories (at least one required)
  â†³ clientEncodedKeystringYesSignatory client identifier
  â†³ rolestringYesSignatory role
  â†³ signatoryTypestringYesType (Single, Joint)
↳ notesstringNoUpdate notes

## Response Structure

### Success Response

```json
{
"succeeded": true,
"message": "Deposit account updated successfully",
"data": {
"depositId": "DEP001234",
"accountNumber": "1234567890",
"accountName": "John Doe Primary Savings Account",
"accountOfficerId": "AO456",
"status": "Active",
"updatedDate": "2024-01-15T14:30:00Z",
"updatedBy": "user@bank.com"
},
"statusCode": 200
}

Error Response

{
"succeeded": false,
"message": "Failed to update deposit account",
"errors": [
{
"code": "DEPOSIT_NOT_FOUND",
"message": "Deposit account with ID DEP001234 does not exist",
"field": "depositId"
}
],
"statusCode": 404
}

Field Descriptions

FieldTypeRequiredDescription
depositIdstringYesUnique identifier of the deposit account to update
accountNamestringNoNew display name for the deposit account
accountOfficerIdstringNoNew account officer to assign to this account
statusstringNoNew account status (Active, Dormant, Frozen, etc.)
additionalPropertiesobjectNoAdditional custom properties to update

Business Rules

  1. Deposit Account Validation

    • Deposit account must exist in the system
    • Account must not be closed
    • User must have permission to update the account
  2. Field Update Restrictions

    • Cannot change account number once created
    • Cannot change customer or product after account creation
    • Cannot change currency after account creation
    • Balance modifications require separate transaction commands
  3. Status Changes

    • Status changes may require approval based on configuration
    • Some status changes may be restricted (e.g., cannot activate a closed account)
    • Status changes must comply with regulatory requirements
  4. Account Officer Assignment

    • New account officer must exist and be active
    • Officer must be assigned to the account's branch
    • Officer must have appropriate permissions

Error Codes

CodeDescriptionHTTP Status
DEPOSIT_NOT_FOUNDDeposit account does not exist404
DEPOSIT_CLOSEDCannot update a closed deposit account400
INVALID_STATUSInvalid status value provided400
INVALID_ACCOUNT_OFFICERAccount officer does not exist or is not assigned to branch400
UNAUTHORIZED_UPDATEUser does not have permission to update this account403
VALIDATION_ERROROne or more validation errors occurred400
INTERNAL_ERRORAn unexpected error occurred500

Code Examples

C# Example

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

JavaScript/TypeScript Example

import { BankLingoClient, UpdateDepositCommand } from '@banklingo/api-client';

class DepositAccountService {
private client: BankLingoClient;

constructor(client: BankLingoClient) {
this.client = client;
}

async updateDepositAccount(
depositId: string,
newAccountName: string,
newAccountOfficerId: string
) {
const command: UpdateDepositCommand = {
depositId,
accountName: newAccountName,
accountOfficerId: newAccountOfficerId,
additionalProperties: {
lastUpdatedReason: 'Account officer reassignment',
updatedChannel: 'BackOffice'
}
};

try {
const response = await this.client.deposits.update(command);

if (response.succeeded) {
console.log(`Deposit account updated: ${response.data.depositId}`);
} else {
console.log(`Error: ${response.message}`);
}

return response;
} catch (error) {
console.error('Exception:', error);
throw error;
}
}
}

cURL Example

curl -X PUT https://api.banklingo.com/api/administration/deposits/update \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"depositId": "DEP001234",
"accountName": "John Doe Primary Savings Account",
"accountOfficerId": "AO456",
"additionalProperties": {
"accountCategory": "Premium",
"monthlyStatementEmail": "john.doe@email.com"
}
}'

Common Use Cases

1. Update Account Name

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

2. Reassign Account Officer

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

3. Change Account Status

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

4. Update Custom Properties

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

See Also