Skip to main content

Request Deposit Approval

Overviewโ€‹

The RequestDepositApprovalCommand submits a deposit account for approval, initiating the maker-checker workflow.

Endpointโ€‹

POST /api/bpm/cmd

Request Bodyโ€‹

{
"cmd": "RequestDepositApprovalCommand",
"data": {
"accountEncodedKey": "DEP-123456",
"comment": "Ready for approval"
}
}

Request Parametersโ€‹

ParameterTypeRequiredDescription
cmdstringYesMust be "RequestDepositApprovalCommand"
dataobjectYesApproval request data
รขโ€ ยณ accountEncodedKeystringYesDeposit account identifier
รขโ€ ยณ commentstringNoRequest comment

## Response Structure

### Success Response

```json
{
"succeeded": true,
"message": "Approval request submitted successfully",
"data": {
"depositId": "DEP001234",
"accountNumber": "1234567890",
"status": "Pending_Approval",
"requestedBy": "user@bank.com",
"requestedDate": "2024-01-15T14:30:00Z",
"comments": "New savings account for VIP customer. Please review and approve.",
"priority": "High"
},
"statusCode": 200
}

Field Descriptionsโ€‹

FieldTypeRequiredDescription
depositIdstringYesUnique identifier of the deposit account
commentsstringNoComments for the approver
prioritystringNoPriority level (Low, Normal, High)

Business Rulesโ€‹

  1. Status Requirements

    • Account must exist and not be closed
    • Account must not already be pending approval
  2. Authorization

    • User must have permission to request approval
    • System validates approval workflow requirements

Error Codesโ€‹

CodeDescriptionHTTP Status
DEPOSIT_NOT_FOUNDDeposit account does not exist404
ALREADY_PENDING_APPROVALAccount is already pending approval400
INSUFFICIENT_PERMISSIONSUser does not have permission403
INTERNAL_ERRORAn unexpected error occurred500

Code Examplesโ€‹

C# Exampleโ€‹

Code Removed

Implementation details removed for security.

Contact support for implementation guidance.

JavaScript/TypeScript Exampleโ€‹

async requestApproval(depositId: string) {
const command = {
depositId,
comments: 'Please review and approve this deposit account',
priority: 'Normal'
};

const response = await this.client.deposits.requestApproval(command);
return response;
}