Skip to main content

Reject Deposit Account

Overviewโ€‹

The RejectDepositCommand allows supervisors or authorized users to reject a pending deposit account with a reason for rejection.

Endpointโ€‹

POST /api/bpm/cmd

Request Bodyโ€‹

{
"cmd": "RejectDepositCommand",
"data": {
"accountEncodedKey": "DEP-123456",
"comment": "Documentation incomplete"
}
}

Request Parametersโ€‹

ParameterTypeRequiredDescription
cmdstringYesMust be "RejectDepositCommand"
dataobjectYesRejection data
รขโ€ ยณ accountEncodedKeystringYesDeposit account identifier
รขโ€ ยณ commentstringNoRejection reason

## Response Structure

### Success Response

```json
{
"succeeded": true,
"message": "Deposit account rejected successfully",
"data": {
"depositId": "DEP001234",
"accountNumber": "1234567890",
"status": "Rejected",
"rejectedBy": "supervisor@bank.com",
"rejectedDate": "2024-01-16T10:00:00Z",
"rejectionReason": "Incomplete documentation. Customer KYC verification failed."
},
"statusCode": 200
}

Error Responseโ€‹

{
"succeeded": false,
"message": "Failed to reject deposit account",
"errors": [
{
"code": "DEPOSIT_NOT_PENDING",
"message": "Deposit account is not in Pending_Approval status",
"field": "depositId"
}
],
"statusCode": 400
}

Field Descriptionsโ€‹

FieldTypeRequiredDescription
depositIdstringYesUnique identifier of the deposit account to reject
rejectionReasonstringYesReason for rejecting the deposit account

Business Rulesโ€‹

  1. Status Requirements

    • Deposit account must be in "Pending_Approval" status
    • Account must not already be approved or rejected
  2. Authorization

    • User must have approval permissions
    • User cannot reject their own requests (maker-checker separation)
  3. Rejection Reason

    • Rejection reason is mandatory
    • Reason must be clear and specific
  4. Post-Rejection

    • Account status changes to "Rejected"
    • Account cannot be used for transactions
    • Rejection notification sent to initiator

Error Codesโ€‹

CodeDescriptionHTTP Status
DEPOSIT_NOT_FOUNDDeposit account does not exist404
DEPOSIT_NOT_PENDINGDeposit account is not pending approval400
REJECTION_REASON_REQUIREDRejection reason is mandatory400
INSUFFICIENT_PERMISSIONSUser does not have rejection permissions403
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 rejectDepositAccount(depositId: string, reason: string) {
const command = {
depositId,
rejectionReason: reason
};

const response = await this.client.deposits.reject(command);

if (response.succeeded) {
console.log(`Deposit account ${response.data.accountNumber} rejected`);
console.log(`Reason: ${response.data.rejectionReason}`);
}

return response;
}