Support Logout NAV Navbar
Sample

Implementation

Integration with API

one.active.ai provides APIs for Retail Banking modules, which can be forked from RB Stub Integration Services

Once the code is integrated with your core system and hosted, the same needs to be configured as shown below.

Integration with API

Introduction To APIs

APIs enable any core banking system integration. These endpoints can be used to query and transact from Virtual Assistant. The endpoints integration supports the functionality .

The Virtual Assistant is already integrated with these endpoints, hence just fork it, customise it, deploy it to get your virtual assistant to work with your respective core systems.

  Login

User Login                                Post

To know more about login please refer here

{
  "customerSegments": [
    "string"
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  },
  "user": {
    "address": "string",
    "customerId": "string",
    "customerName": "string",
    "emailId": "string",
    "mobileNumber": "string"
  }
}

Request Parameters

Field Data Type Description
userId string customer's Id
password string customer's password

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
customerSegments string
result object
      message string
      messageCode string
      status 0
user object
      address string customer's address
      customerId string customer's login id
      customerName string customer's name
      emailId string customer's email id
      mobileNumber string customer's mobile number

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Login credentials

User Id Password
stuart stuart@123
james james@123
henry henry@123

  Customer Profile

Get Customer Profile             Get

To know more about customer profile please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/customers/profile/{customerId}");
/* API call to get customer details */
@RequestMapping(value = "/customers/profile/{customerId}", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<CustomerProfileResponse> getCustomerProfile(@PathVariable("customerId") String customerId) {
ApplicationLogger.logInfo("Entering CustomerProfile Controller");
/* End of API call */
/* Bank API integration to get customer details */
 HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CUSTOMER_PROFILE_API_END_POINT, customerId, null))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
 if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Customer Profile Response Body Before Transformation :" + response.getBody());
String customerProfileResponseString = customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());
ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :" + response.getBody());
 customerProfileResponse = objectMapper.readValue(customerProfileResponseString, CustomerProfileResponse.class);
}
return ResponseEntity.ok(customerProfileResponse);

Example responses

200 Response

{
  "customerProfile": {
    "address": [
      {
      "addressLine1": "string",
      "addressLine2": "string",
      "addressLine3": "string",
      "addressType": "PRIMARY",
      "city": "string",
      "country": "string",
      "countryCode": "string",
      "province": "string",
      "state": "string"
    }
    ],
    "customerId": 0,
    "customerSegment": "string",
    "firstName": "string",
    "lastName": "string",
    "middleName": "string",
    "DOB":"string",
    "age":"string",
    "gender":"string",
    "updatedDate":"string",
    "updatedBy":"string",
    "createdDate":"string",
    "createdBy":"string",
    "phone": [
      {
        "phoneType": "PRIMARY",
        "phoneCountryCode": "string",
        "phoneNo": 0
      }
    ],
    "email":[
      {
        "emailType":"PRIMARY",
        "emailId":"string"
      }
    ],
    "title": "string",
    "customerProfileUpdationStatus":"string",
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email id
address string customer's address

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
customerProfile object customer's details
      address object customer's address details
            addressLine1 string customer's house no address
            addressLine2 string customer's street address
            addressLine3 string customer's landmark address
           addressType PRIMARY customer's address type
            city string customer's city
            country string customer's country
            countryCode string customer's country code
            province string customer's province
            state string customer's state
      customerId 0 customer's id
      customerSegment string customer's segment
      firstName string customer's firstname
      lastName string customer's lastname
      middleName string customer's middlename
      DOB string customer's date of birth
      age string customer's age
      gender string customer's gender
      updatedDate string customer's profile updation date
      updatedBy string customer's profile updated by
      createdDate string customer's profile creation date
      createdBy string customer's profile created by
      phone Object Array customer's phone details
  phoneCountryCode string customer's phone countrycode
           phoneNo 0 customer's phone number
           phoneType PRIMARY customer's phone type
      email Object Array customer's email address details
            emailType string PRIMARY
            emailId string customer's email id
      title Mr. customer's title
customerProfileUpdationStatus string customer's profile updation status
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Update Customer Email        Put

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/customers/profile/{customerId}/email");
/* API call for updating customer email address */
@RequestMapping(value = "/customers/profile/{customerId}/email", produces = {"application/json"}, method = RequestMethod.PUT)
public ResponseEntity<CustomerProfileResponse> updateCustomerProfileEmail(@PathVariable("customerId") String customerId,
@RequestBody final CustomerProfileRequest customerProfileRequest) {
ApplicationLogger.logInfo("Entering CustomerProfile Controller");
/* End of API call */
/* Bank API integration to update customer email address */
HttpResponse<String> response =
Unirest.put(propertyUtil.getAPIUrl(PropertyConstants.UPDATE_EMAIL_API_END_POINT, customerId, null))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Customer Profile Response Body Before Transformation :" + response.getBody());
String customerProfileResponseString = customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());
ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :" + response.getBody());
customerProfileResponse = objectMapper.readValue(customerProfileResponseString, CustomerProfileResponse.class);
}
return ResponseEntity.ok(customerProfileResponse);

Example responses

200 Response

{
  "result": {
    "status": 0,
    "message": "message",
    "messageCode": "messageCode"
  },
  "customerProfile": {
    "customerProfileUpdationStatus":"SUCCESS"
}
}

Request URL

Request Parameters

Field Data type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email id
address string customer's address

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
customerProfile object customer's details
      address object customer's address details
            addressLine1 string customer's house no address
            addressLine2 string customer's street address
            addressLine3 string customer's landmark address
           addressType PRIMARY customer's address type
            city string customer's city
            country string customer's country
            countryCode string customer's country code
            province string customer's province
            state string customer's state
      customerId 0 customer's id
      customerSegment string customer's segment
      firstName string customer's firstname
      lastName string customer's lastname
      middleName string customer's middlename
      DOB string customer's date of birth
      age string customer's age
      gender string customer's gender
      updatedDate string customer's profile updation date
      updatedBy string customer's profile updated by
      createdDate string customer's profile creation date
      createdBy string customer's profile created by
      phone Object Array customer's phone details
  phoneCountryCode string customer's phone countrycode
           phoneNo 0 customer's phone number
           phoneType PRIMARY customer's phone type
      email Object Array customer's email address details
            emailType string PRIMARY
            emailId string customer's email id
      title Mr. customer's title
customerProfileUpdationStatus string customer's profile updation status
result object
      status 0
      message message
      messageCode messageCode

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Update Customer Phone       Put

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/customers/profile/{customerId}/phoneNo");
/* API to update customer phone number */
@RequestMapping(value = "/customers/profile/{customerId}/phoneNo", produces = {"application/json"}, method = RequestMethod.PUT)
public ResponseEntity<CustomerProfileResponse> updateCustomerProfilePhone(@PathVariable("customerId") String customerId,
@RequestBody final CustomerProfileRequest customerProfileRequest) {
ApplicationLogger.logInfo("Entering CustomerProfile Controller");
/* End of API call */
/* Bank integration to update phone number */
 HttpResponse<String> response =
 Unirest.put(propertyUtil.getAPIUrl(PropertyConstants.UPDATE_PHONE_API_END_POINT, customerId, null))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Customer Profile Response Body Before Transformation :" + response.getBody());
String customerProfileResponseString = customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());
ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :" + response.getBody());
customerProfileResponse = objectMapper.readValue(customerProfileResponseString, CustomerProfileResponse.class);
}
return ResponseEntity.ok(customerProfileResponse);

Example responses

200 Response

{
  "result": {
    "status": 0,
    "message": "message",
    "messageCode": "messageCode"
  },
  "customerProfile": {
    "customerProfileUpdationStatus":"SUCCESS"
}
}

Request URL

Request Parameters

Field Data type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email id
address string customer's address

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
customerProfile object customer's details
      address object customer's address details
            addressLine1 string customer's house no address
            addressLine2 string customer's street address
            addressLine3 string customer's landmark address
           addressType PRIMARY customer's address type
            city string customer's city
            country string customer's country
            countryCode string customer's country code
            province string customer's province
            state string customer's state
      customerId 0 customer's id
      customerSegment string customer's segment
      firstName string customer's firstname
      lastName string customer's lastname
      middleName string customer's middlename
      phone Object Array customer's phone details
            phoneCountryCode string customer's phone countrycode
           phoneNo 0 customer's phone number
           phoneType PRIMARY customer's phone type
      title Mr. customer's title
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Update Customer Address    Put

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/customers/profile/{customerId}/address");
/* API to update customer phone number */
 @RequestMapping(value = "/customers/profile/{customerId}/address", produces = {"application/json"}, method = RequestMethod.PUT)
public ResponseEntity<CustomerProfileResponse> updateCustomerProfileAddress(@PathVariable("customerId") String customerId,
@RequestBody final CustomerProfileRequest customerProfileRequest) {
ApplicationLogger.logInfo("Entering CustomerProfile Controller");
/* End of API call */
/* Bank integration to update phone number */
 HttpResponse<String> response =
Unirest.put(propertyUtil.getAPIUrl(PropertyConstants.UPDATE_ADDRESS_API_END_POINT, customerId, null))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Customer Profile Response Body Before Transformation :" + response.getBody());
String customerProfileResponseString = customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());
ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :" + response.getBody());
customerProfileResponse = objectMapper.readValue(customerProfileResponseString, CustomerProfileResponse.class);
}
return ResponseEntity.ok(customerProfileResponse);

Example responses

200 Response

{
  "result": {
    "status": 0,
    "message": "message",
    "messageCode": "messageCode"
  },
  "customerProfile": {
    "customerProfileUpdationStatus":"SUCCESS"
}
}

Request URL

Request Parameters

Field Data type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email id
address string customer's address

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
customerProfile object customer's details
      address object customer's address details
            addressLine1 string customer's house no address
            addressLine2 string customer's street address
            addressLine3 string customer's landmark address
           addressType PRIMARY customer's address type
            city string customer's city
            country string customer's country
            countryCode string customer's country code
            province string customer's province
            state string customer's state
      customerId 0 customer's id
      customerSegment string customer's segment
      firstName string customer's firstname
      lastName string customer's lastname
      middleName string customer's middlename
      phone Object Array customer's phone details
            phoneCountryCode string customer's phone countrycode
           phoneNo 0 customer's phone number
           phoneType PRIMARY customer's phone type
      title Mr. customer's title
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

  Accounts

Get list of accounts                   Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/casa");

/* API to get all current and savings account */
@ApiOperation(value = "Returns list of casa accounts based on customer ID")
  @RequestMapping(value = "/{customerId}/accounts/casa", produces{"application/json"}, method = RequestMethod.GET)
public ResponseEntity<AccountsResponse> getCasaAccounts(@PathVariable(name
= "customerId", required = true) String customerId) {
ApplicationLogger.logInfo("Entering getCasaAccountsResponseEntity API");
/* End of API call */
/* Bank integration to get all current and savings account */
 HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CASA_ACCOUNT_API_END_POINT, customerId,null)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("Casa API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo(" Casa Response Body Before Transformation :" + response.getBody());
String accountsResponseString = accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());
ApplicationLogger.logInfo("Casa Response Body After Transformation :" + response.getBody());
accountsResponse = objectMapper.readValue(accountsResponseString, AccountsResponse.class);
}
return ResponseEntity.ok(accountsResponse);

Example responses

200 Response

{
  "accounts": [
    {
      "accountId": "string",
      "accountName": "string",
      "accountNumber": "string",
      "balance": {
        "amount": 0,
        "availableBalance": 0,
        "currencyCode": "string",
        "currentBalance": 0
      },
      "bankName": "string",
      "branchAddress": "string",
      "branchId": "string",
      "branchName": "string",
      "category": "string",
      "displayAccountNumber": "string",
      "lastStatementBalance": 0,
      "lastStatementDate": "string",
      "openingDate": "string",
      "product": "string",
      "productCode": "string",
      "status": "ACTIVE",
      "type": "SAVINGS"
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accounts Object Array customer's accounts
     accountId string customer's account id
     accountName string customer's account name
     accountNumber string customer's account number
     balance object customer's account balance
            amount 0 customer's balance amount
        availableBalance 0 customer's available balance
            currencyCode string customer's amount's currency code
          currentBalance 0 customer's current balance
      bankName string customer's bank name
      branchAddress string customer's bank branch address
      branchId string customer's bank branch id
      branchName string customer's bank branch name
      category string customer's account category
displayAccountNumber string customer's account number
lastStatementBalance 0 customer's last statement balance
lastStatementDate string customer's last statement date
      openingDate string customer's account opening date
      product string customer's product
      status ACTIVE customer's status
      type SAVINGS customer's account type
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Account Details                         Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/casa/{accountId}");
/* API to get current and savings account details */
@ApiOperation(value = "Returns selected casa account details")
@RequestMapping(value = "/{customerId}/accounts/casa/{accountId}", produces
= {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<AccountDetailResponse> getCasaAccountDetail(@PathVariable(name = "customerId", required = true) String customerId,
@PathVariable(name = "accountId", required = true) String accountId) {
ApplicationLogger.logInfo("Entering getCasaAccountDetail API");
/* End of API call */
/* Bank integration to get current and savings account details */
 HttpResponse<String>
response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CASA_ACCOUNT_DETAILS_API_END_POINT, customerId, accountId))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Casa Account Details Response Body Before Transformation :" + response.getBody());
String accountDetailResponseString = accountsResponseMapper.getManipulatedAccountDetailsResponse(response.getBody());
ApplicationLogger.logInfo("Casa Account Details Response Body After Transformation :" + response.getBody());
accountDetailsResponse = objectMapper.readValue(accountDetailResponseString, AccountDetailResponse.class);
}
return ResponseEntity.ok(accountDetailsResponse);

Example responses

200 Response

{
  "accountDetail": {
    "accountId": "string",
    "accountName": "string",
    "accountNumber": "string",
    "balance": {
      "amount": 0,
      "availableBalance": 0,
      "currencyCode": "string",
      "currentBalance": 0
    },
    "bankName": "string",
    "branchAddress": "string",
    "branchId": "string",
    "branchName": "string",
    "category": "string",
    "displayAccountNumber": "string",
    "lastStatementBalance": 0,
    "lastStatementDate": "string",
    "openingDate": "string",
    "product": "string",
    "productCode": "string",
    "status": "ACTIVE",
    "type": "SAVINGS"
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
accountId string customer's account Id

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accountDetail object customer's account details
     accountId string customer's account id
     ifscCode string customer's bank ifsc code
     branchName string customer's bank branch name
     branchAddress string customer's bank branch address
  accountHolderName string customer's name
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Account Balance                       Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/casa/{accountId}/balance");
/* API to get current and savings account balance */
@ApiOperation(value = "Returns selected casa account balance")
@RequestMapping(value = "/{customerId}/accounts/casa/{accountId}/balance", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<AccountBalanceResponse> getCasaAccountBalance(@PathVariable(name = "customerId", required = true) String customerId,
@PathVariable(name = "accountId", required = true) String accountId) {
ApplicationLogger.logInfo("Entering getCasaAccountBalance API");
/* End of API call */
/* Bank integration to get current and savings account balance */
HttpResponse<String>
response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CASA_ACCOUNT_BALANCE_API_END_POINT, customerId, accountId))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Casa Account Balance Response Body Before Transformation :" + response.getBody());
String accountDetailResponseString = accountsResponseMapper.getManipulatedAccountsBalanceResponse(response.getBody());
ApplicationLogger.logInfo("Casa Account Balance Response Body After Transformation :" + response.getBody());
accountBalanceResponse = objectMapper.readValue(accountDetailResponseString, AccountBalanceResponse.class);
}
return ResponseEntity.ok(accountBalanceResponse);

Example responses

200 Response

{
  "accountSelected": {
    "accountId": "string",
    "balance":
    {
      "amount": 0,
      "availableBalance": 0,
      "currentBalance": 0,
      "monthlyAverageBalance": 0,
      "currencyCode": "string"
    }
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string
accountId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accountSelected object customer's account balance
      accountId string customer's account Id
      balance object customer's balance
           amount string customer's amount currency code
        availableBalance 0 customer's account available balance
        currentBalance 0 customer's account current balance
monthlyAverageBalance 0 customer's monthly average balance
            currencyCode 0 customer's balance currency code
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Account Transactions               Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/{accountId}/transactions");
/* API to get current and savings account transactions */
@ApiOperation(value = "Returns selected casa account transaction history")
@RequestMapping(value = "/{customerId}/accounts/{accountId}/transactions", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<AccountTransactionsResponse> getCasaAccountTransactions(
@PathVariable(name = "customerId", required = true) String customerId,
@PathVariable(name = "accountId", required = true) String accountId) {
ApplicationLogger.logInfo("Entering getCasaAccountTransactions API");
/* End of API call */
/* Bank integration to get current and savings account transactions */
 HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CASA_ACCOUNT_TRANSACTIONS_HISTORY_API_END_POINT, customerId, accountId))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Account Transactions Response Body Before Transformation :" + response.getBody());
String accountTransactionsResponseString = accountsResponseMapper.getManipulatedAccountTransactionsResponse(response.getBody());
ApplicationLogger.logInfo("Account Transactions Response Body After Transformation :" + response.getBody());
accountTransactionsResponse = objectMapper.readValue(accountTransactionsResponseString, AccountTransactionsResponse.class);
}
return ResponseEntity.ok(accountTransactionsResponse);

{
  "accountTransactions": [
    {
      "foreignTxnCurrency":"string",
      "amount":0,
      "description":"string",
      "currency":"USD",
      "foreignTxnAmount":0,
      "isDebit":true,
      "cardType":"string",
      "foreignTxnExchangeRate":0,
      "txnDate":"string",
      "referenceId":"string"
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string
accountId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accountTransactions object array
      foreignTxnCurrency string customer's foreign transaction currency
      amount 0 customer's transaction amount
      description string customer's transaction description
      currency string customer's transaction currency
      foreignTxnAmount 0 customer's foreign transaction amount
      isDebit true customer's transaction is a debit transaction
      cardType string customer's card category
foreignTxnExchangeRate 0 customer's foreign transaction exchange rate
      txnDate string customer's transaction date
      referenceId string customer's transaction referance id
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Order Check Book                    Post

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/chequebook/order/confirm");
/* API to get confirmation of ordered cheque book */
@ApiOperation(value = "Returns confirmation of order cheque book")
@RequestMapping(value = "/{customerId}/chequebook/order/confirm", produces= {"application/json"}, consumes = {
"application/json"}, method = RequestMethod.POST) public ResponseEntity<ChequeBookOrderConfirmResponse> confirmChequeBookOrder(
@PathVariable(value = "customerId", required = true) String customerId,
@RequestBody final ChequeBookOrderConfirmRequest chequeBookConfirmRequest) {
ApplicationLogger.logInfo("Entering getconfirmChequeBookOrder API");
/* End of API call */
/* Bank integration to get confirmation of ordered cheque book */
HttpResponse<String> response = Unirest.get(propertyUtil
.getAPIUrl(PropertyConstants.CHEQUE_BOOK_ORDER_CONFIRM_API_ENDPOINT, chequeBookOrderConfirmRequest.getCustomerId(),
chequeBookOrderConfirmRequest.getAccount().getAccountNumber())).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Credit Card Limit Confirm Response Body Before Transformation :" + response.getBody());
String chequeBookOrderConfirmResponseString = accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());
ApplicationLogger.logInfo("Credit Card Limit Confirm Response Body After Transformation :" + response.getBody());
chequeBookOrderConfirmResponse = objectMapper.readValue(chequeBookOrderConfirmResponseString, ChequeBookOrderConfirmResponse.class);
}
return new ResponseEntity<>(chequeBookOrderConfirmResponse, HttpStatus.valueOf(response.getStatus()));

{
"accounts":[
    {
    "transactionStatus" : "SUCCESS",
    "referenceId" : "string"
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email Id
address string customer's address
account object customer's details
   accountId string customer's account Id
   branchId string customer's branch Id
   accountName string customer's account name
   leavesCount string customer's leaves count

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accounts object array
      transactionStatus string customer's ordered cheque book confimation status
      referenceId string customer's ordered cheque book reference Id
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

  Cards

Cards List

   CreditCards List                      Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/creditcards");
/*API call for Credit Cards List*/
 @ApiOperation(value = "Returns list of credit cards based on customer ID")
  @RequestMapping(value = "/{customerId}/cards/creditcards", produces = {"application/json"}, method = RequestMethod.GET)
  public ResponseEntity<CardsResponse> getCreditCards(@PathVariable(value = "customerId", required = true) String customerId) {
    logger.info("Entering getCreditCards");
/*End of API Call*/
/*Bank API Integration for Credit Cards List*/
HttpResponse<String> response =
          Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CREDIT_CARDS_API_END_POINT, customerId, null)).header("cache-control", "no-cache")
              .asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Credit Cards Response Body Before Transformation :" + response.getBody());
        String cardsResponseString = cardsResponseMapper.getManipulatedCardsResponse(response.getBody());
        ApplicationLogger.logInfo("Credit Cards Response Body After Transformation :" + response.getBody());
        cardsResponse = objectMapper.readValue(cardsResponseString, CardsResponse.class);
      }
      return new ResponseEntity<>(cardsResponse, HttpStatus.valueOf(response.getStatus()));
/*End of Bank API Integration*/

Response Example

{
  "cards": [
    {
      "accountId": "string",
      "accountNumber": "string",
      "cardNumber":"string",
      "cardIssuer": "string",
      "status": "string",
      "type": "string"
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

No Request Parameters

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cards object array customer's cards
      accountId string customer's account id
      accountNumber string customer's account number
      cardNumber string customer's cardNumber
      cardIssuer string customer's card issuer
      status string customer's card's status
      type string customer's card's type
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

   DebitCards List                       Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/debitcards");
/*API Call for Debit Cards List*/
@ApiOperation(value = "Returns list of debit cards based on customer ID")
  @RequestMapping(value = "/{customerId}/cards/debitcards", produces = {"application/json"}, method = RequestMethod.GET)
  public ResponseEntity<CardsResponse> getDebitCards(@PathVariable(value = "customerId", required = true) String customerId) {
    logger.info("Entering getDebitCards");
/*End of API call*/
/*Bank API Integration for Debit Cards List*/
HttpResponse<String> response =
              Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.DEBIT_CARDS_API_END_POINT, customerId, null)).header("cache-control", "no-cache")
                      .asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Debit Cards Response Body Before Transformation :" + response.getBody());
        String cardsResponseString = cardsResponseMapper.getManipulatedCardsResponse(response.getBody());
        ApplicationLogger.logInfo("Debit Cards Response Body After Transformation :" + response.getBody());
        cardsResponse = objectMapper.readValue(cardsResponseString, CardsResponse.class);
      }
      return new ResponseEntity<>(cardsResponse, HttpStatus.valueOf(response.getStatus()));
/*End of Bank API Integration*/

Response Example

{
  "cards": [
    {
      "accountId": "string",
      "accountNumber": "string",
      "cardNumber":"string",
      "cardIssuer": "string",
      "status": "string",
      "type": "string"
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

No Request Parameters

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cards object array customer's cards
      accountId string customer's account id
      accountNumber string customer's account number
      cardNumber string customer's cardNumber
      cardIssuer string customer's card issuer
      status string customer's card's status
      type string customer's card's type
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Card Details

    CreditCard Details                 Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/creditcards/{cardNumber}");
/* API call for CreditCard Details*/
H@ApiOperation(value = "Returns selected credit card details")
  @RequestMapping(value = "/{customerId}/cards/creditcards/{cardNumber}", produces = {"application/json"}, method = RequestMethod.GET)
  public ResponseEntity<CardDetailResponse> getCreditCardDetails(@PathVariable(value = "customerId", required = true) String customerId,
      @PathVariable(value = "cardNumber", required = true) String cardNumber) {
    logger.info("Entering getCreditCardDetails");
/*End of API Call*/
/*Bank API Integration of Credit Card Details*/
HttpResponse<String> response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CREDIT_CARD_DETAILS_API_END_POINT, customerId, cardNumber))
          .header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Credit Card Details Response Body Before Transformation :" + response.getBody());
        String cardDetailsResponseString = cardsResponseMapper.getManipulatedCardDetailsResponse(response.getBody());
        ApplicationLogger.logInfo("Credit Card Details Response Body After Transformation :" + response.getBody());
        cardDetailResponse = objectMapper.readValue(cardDetailsResponseString, CardDetailResponse.class);
      }
      return ResponseEntity.ok(cardDetailResponse);
/*End on Bank API Integration*/

Response Example

{
  "cardDetails":{
    "accountId": "string",
    "cardHolderName" : "string",
    "cardIssuer": "string",
    "paymentDueDate": "string"
  },
  "result": {
    "status": 0,
    "message": "string",
    "messageCode": "string"
  }
}

Request URL

Request Parameters

No Request Parameters

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail object
      accountId string customer's account id
      accountName string customer's account name
      accountNumber string customer's account number
      cardHolderName string customer's cardHolderName
      cardIssuer string customer's card issuer
      paymentDueDate string customer's card's payment due date
      status ACTIVE customer's card's status
result
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

    DebitCard Details                  Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/debitcards/{cardNumber}");
/*API call for DebitCard Details*/
@ApiOperation(value = "Returns selected debit card details")
  @RequestMapping(value = "/{customerId}/cards/debitcards/{cardNumber}", produces = {"application/json"}, method = RequestMethod.GET)
  public ResponseEntity<CardDetailResponse> getDebitCardDetails(@PathVariable(value = "customerId", required = true) String customerId,
      @PathVariable(value = "cardNumber", required = true) String cardNumber) {
    logger.info("Entering getDebitCardDetails");
/*End of API Call*/
/*Bank API Integration for Debit Cards Details*/
HttpResponse<String> response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.DEBIT_CARD_DETAILS_API_END_POINT, customerId, cardNumber))
              .header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Debit Card Details Response Body Before Transformation :" + response.getBody());
        String cardDetailsResponseString = cardsResponseMapper.getManipulatedCardDetailsResponse(response.getBody());
        ApplicationLogger.logInfo("Debit Card Details Response Body After Transformation :" + response.getBody());
        cardDetailResponse = objectMapper.readValue(cardDetailsResponseString, CardDetailResponse.class);
      }
      return ResponseEntity.ok(cardDetailResponse);
/*End of Bank API Integration*/

Response Example

{
  "cardDetails":{
    "accountId": "string",
    "cardHolderName" : "string",
    "cardIssuer": "string",
    "paymentDueDate": "string"
  },
  "result": {
    "status": 0,
    "message": "string",
    "messageCode": "string"
  }
}

Request URL

Request Parameters

No Request Parameters

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail object
      accountId string customer's account id
      accountName string customer's account name
      accountNumber string customer's account number
      cardHolderName string customer's cardHolderName
      cardIssuer string customer's card issuer
      paymentDueDate string customer's card's payment due date
      status ACTIVE customer's card's status
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Block Card                                Post

To know more about block card please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/{cardId}/block/confirm");
/*API CALL for Block Card*/
@ApiOperation("Return blocking status of selected card")
  @RequestMapping(value = "/{customerId}/cards/{cardNumber}/block/confirm", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<BlockCardResponse> blockCard(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber, @RequestBody final BlockCardRequest blockCardRequest) {
       ApplicationLogger.logInfo("Entering getBlockStatus API");
/*End of API Call*/

/*Bank API Integration for Block Card*/
HttpResponse<String> response =
          Unirest.post(propertyUtil.getAPIUrlForBlockCard(PropertyConstants.BLOCK_CARD_DETAILS_API_END_POINT, blockCardRequest))
              .header("Content-Type", "application/json").body(objectMapper.writeValueAsString(blockCardRequest)).asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Block Card Response Body Before Transformation :" + response.getBody());
        String blockCardResponseString = blockCardResponseMapper.getManipulatedBlockCardResponse(response.getBody());
        ApplicationLogger.logInfo("Block Card Response Body After Transformation :" + response.getBody());
        blockCardResponse = objectMapper.readValue(blockCardResponseString, BlockCardResponse.class);
      }
      return ResponseEntity.ok(blockCardResponse);
/*End of API Integration*/

Request Example

{
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails":{
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber":"string",
    "displayCardNumber":"string",
    "cardType":"string",
    "cardStatus":"string",
    "blockType":"string"
  }
}

Response Example

{
  "cardDetail": {
    "referenceId": "String",
    "transactionStatus": "String"
  },
  "result": {
    "messageCode": "String",
    "message": "String",
    "status": 200
  }
}

Request URL

Request Parameters

Field Data type Description
      customerId String customer's customerId
      customerName String customer's customerName
      mobileNumber String customer's mobileNumber
      emailId String customer's emailId
      address String customer's address
cardDetails
      accountNumber String customer's accountNumber
      accountId String customer's accountId
      cardNumber String customer's card's cardNumber
 displayCardNumber String customer's card's displayCardNumber
      cardName String customer's cardName
      cardType String customer's card's cardType
      cardStatus String customer's card's cardStatus
      blockType String card's blockType

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail
      referenceId String customer's card's referenceId
      transactionStatus string customer's card's transaction Status
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Card Activation                        Post

To know more about card activation please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/{cardId}/activation/confirm");
/*API CALL for Activate Card*/
@ApiOperation("Return activation status of selected card")
  @RequestMapping(value = "/{customerId}/cards/{cardNumber}/activation/confirm", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<ActivationCardResponse> activationCard(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber, @RequestBody final ActivationCardRequest activationCardRequest) {
    ApplicationLogger.logInfo("Entering getActivationStatus API");
/*End of API Call*/

/*Bank API Integration for Activation Card*/
HttpResponse<String> response =
          Unirest.post(propertyUtil.getAPIUrlForActivateCard(PropertyConstants.ACTIVATE_CARD_DETAILS_API_END_POINT, activationCardRequest))
              .header("Content-Type", "application/json").body(objectMapper.writeValueAsString(activationCardRequest)).asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Activation Card Response Body Before Transformation :" + response.getBody());
        String activationCardResponseString = activationCardResponseMapper.getManipulatedActivationCardResponse(response.getBody());
        ApplicationLogger.logInfo("Activation Card Response Body After Transformation :" + response.getBody());
        activationCardResponse = objectMapper.readValue(activationCardResponseString, ActivationCardResponse.class);
      }
      return ResponseEntity.ok(activationCardResponse);
/*End of API Integration*/

Request Example

{
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails":{
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber":"string",
    "displayCardNumber":"string",
    "cardType":"string",
    "cardStatus":"string"
  }
}

Response Example

{
  "cardDetail": {
    "referenceId": "String",
    "transactionStatus": "String"
  },
   "result": {
    "messageCode": "String",
    "message": "String",
    "status": 200
  }
}

Request URL

Request Parameters

Field Data type Description
      customerId String customer's customerId
      customerName String customer's customerName
      mobileNumber String customer's mobileNumber
      emailId String customer's emailId
      address String customer's address
cardDetails
      accountNumber String customer's accountNumber
      accountId String customer's accountId
      cardNumber String customer's card's cardNumber
 displayCardNumber String customer's card's displayCardNumber
      cardName String customer's cardName
      cardType String customer's card's cardType
      cardStatus String customer's card's cardStatus

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail
      referenceId String customer's card's referenceId
      transactionStatus string customer's card's transaction Status
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Card Limits

   Credit Card Limits                 Get

To know more about credit card limits please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/creditcards/{cardNumber}/getLimits");
/*API CAll for Credit Card Limits*/
 @ApiOperation(value = "Returns credit card limit")
  @RequestMapping(value = "/{customerId}/creditcards/{cardNumber}/getLimits", produces = {"application/json"}, method = RequestMethod.GET)
  public ResponseEntity<CreditCardLimitResponse> getCreditCardLimits(@PathVariable(value = "customerId", required = true) String customerId,
      @PathVariable(value = "cardNumber", required = true) String cardNumber) {
    logger.info("Entering getCreditLimitResponse");
/*End of API Call*/
/*Bank API Integration for CreditCard Limits*/
HttpResponse<String> response =
                Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CREDIT_CARD_LIMIT_API_END_POINT, customerId, cardNumber))
                    .header("cache-control", "no-cache").asString();
            ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
            if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
                ApplicationLogger.logInfo("Credit Card Limit Response Body Before Transformation :" + response.getBody());
                String creditCardLimitResponseString = creditCardResponseMapper.getManipulatedCreditCardLimitResponse(response.getBody());
                ApplicationLogger.logInfo("Credit Card Limit Response Body After Transformation :" + response.getBody());
                creditCardLimitResponse = objectMapper.readValue(creditCardLimitResponseString, CreditCardLimitResponse.class);
            }
            return ResponseEntity.ok(creditCardLimitResponse);
/*End of Bank API Integration*/

Response Example

{
  "card": [
    {
      "cardNumber": 0,
      "domesticATMLimit": 0,
      "domesticPOSLimit": 0,
      "internationalATMLimit": 0,
      "internationalPOSLimit": 0,
      "isInternationalEnabled": true,
      "maxCashLimit": 0,
      "maxCreditLimit": 0,
      "maxDomesticATMLimit": 0,
      "maxDomesticPOSLimit": 0,
      "maxInternationalATMLimit": 0,
      "maxInternationalPOSLimit": 0,
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data type Description
customerId 0 customer's customerId
cardNumber 0 customer's card's cardNumber

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
card object customer's card details
cardNumber 0 customer's cardNumber
domesticATMLimit 0 customer's domesticATMLimit
domesticPOSLimit 0 customer's domesticPOSLimit
internationalATMLimit 0 customer's internationalATMLimit
internationalPOSLimit 0 customer's internationalPOSLimit
isInternationalEnabled Boolean customer's isInternationalEnabled
internationalPOSLimit 0 customer's internationalPOSLimit
maxCreditLimit 0 customer's card's maxCreditLimit
maxCashLimit 0 customer's card's maxCashLimit
maxDomesticATMLimit 0 customer's card's maxDomesticATMLimit
maxDomesticPOSLimit 0 customer's card's maxDomesticPOSLimit
maxInternationalATMLimit 0 customer's card's maxInternationalATMLimit
maxInternationalPOSLimit 0 customer's card's maxInternationalPOSLimit
result object
message string
messageCode string
status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

   Debit Card Limits                  Get

To know more about debit card limits please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/debitcards/{cardNumber}/getLimits");
/*API CAll for Debit Card Limits*/
 @ApiOperation(value = "Returns debit card limit")
  @RequestMapping(value = "/{customerId}/cards/debitcards/{cardNumber}/getLimits", produces = {"application/json"}, method = RequestMethod.GET)
  public ResponseEntity<DebitCardLimitResponse> getDebitCardLimits(@PathVariable(value = "customerId", required = true) String customerId,
      @PathVariable(value = "cardNumber", required = true) String cardNumber) {
    logger.info("Entering getDebitLimitResponse");
/*End of API Call*/
/*Bank API Integration for DebitCard Limits*/
HttpResponse<String> response =
          Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.DEBIT_CARD_LIMIT_API_END_POINT, customerId, cardNumber))
              .header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Debit Card Limit Response Body Before Transformation :" + response.getBody());
        String debitCardLimitResponseString = debitCardResponseMapper.getManipulatedDebitCardLimitResponse(response.getBody());
        ApplicationLogger.logInfo("Debit Card Limit Response Body After Transformation :" + response.getBody());
        debitCardLimitResponse = objectMapper.readValue(debitCardLimitResponseString, DebitCardLimitResponse.class);
      }
      return ResponseEntity.ok(debitCardLimitResponse);
/*End of Bank API Integration*/

Response Example

{
  "card": [
    {
      "cardNumber": 0,
      "domesticATMLimit": 0,
      "domesticPOSLimit": 0,
      "internationalATMLimit": 0,
      "internationalPOSLimit": 0,
      "isInternationalEnabled": true,
      "maxCashLimit": 0,
      "maxCreditLimit": 0,
      "maxDomesticATMLimit": 0,
      "maxDomesticPOSLimit": 0,
      "maxInternationalATMLimit": 0,
      "maxInternationalPOSLimit": 0,
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data type Description
customerId 0 customer's customerId
cardNumber 0 customer's card's cardNumber

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
card object customer's card details
cardNumber 0 customer's cardNumber
domesticATMLimit 0 customer's domesticATMLimit
domesticPOSLimit 0 customer's domesticPOSLimit
internationalATMLimit 0 customer's internationalATMLimit
internationalPOSLimit 0 customer's internationalPOSLimit
isInternationalEnabled Boolean customer's isInternationalEnabled
internationalPOSLimit 0 customer's internationalPOSLimit
maxCreditLimit 0 customer's card's maxCreditLimit
maxCashLimit 0 customer's card's maxCashLimit
maxDomesticATMLimit 0 customer's card's maxDomesticATMLimit
maxDomesticPOSLimit 0 customer's card's maxDomesticPOSLimit
maxInternationalATMLimit 0 customer's card's maxInternationalATMLimit
maxInternationalPOSLimit 0 customer's card's maxInternationalPOSLimit
result object
message string
messageCode string
status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Limit Update

   Credit Limit Update              Post

To know more about credit card limit update please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/creditcards/limit/confirm");
/*API Call for Credit Limit Update*/
@ApiOperation(value = "Returns confirmation of credit card limit")
  @RequestMapping(value = "/{customerId}/creditcards/limit/confirm", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST) public ResponseEntity<CreditCardLimitConfirmResponse> confirmCreditCardLimit(
      @PathVariable(value = "customerId", required = true) String customerId,
      @RequestBody final CreditCardLimitConfirmRequest creditCardLimitConfirmRequest) {
    ApplicationLogger.logInfo("Entering getCreditCardLimitConfirm API");
/*End of API Call*/
/*Bank API Integration for Credit Limit Update*/
HttpResponse<String> response = Unirest.get(propertyUtil
                .getAPIUrl(PropertyConstants.CREDIT_CARD_LIMIT_CONFIRM_API_ENDPOINT, creditCardLimitConfirmRequest.getCustomerId(),
                    creditCardLimitConfirmRequest.getCardDetails().getCardNumber())).header("cache-control", "no-cache").asString();
            ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
            if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
                ApplicationLogger.logInfo("Credit Card Limit Confirm Response Body Before Transformation :" + response.getBody());
                String creditCardLimitConfirmResponseString = creditCardResponseMapper.getManipulatedCreditCardLimitConfirmResponse(response.getBody());
                ApplicationLogger.logInfo("Credit Card Limit Confirm Response Body After Transformation :" + response.getBody());
                creditCardLimitConfirmResponse = objectMapper.readValue(creditCardLimitConfirmResponseString, CreditCardLimitConfirmResponse.class);
            }
            return new ResponseEntity<>(creditCardLimitConfirmResponse, HttpStatus.valueOf(response.getStatus()));
/*End of Bank API Integration*/

Request Example

{
  "address": "string",
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails": {
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber": "string",
    "cardStatus": "string",
    "cardType": "string",
    "cashLimit": 0,
    "creditLimit": 0,
    "domesticATMLimit": 0,
    "domesticPOSLimit": 0,
    "internationalATMLimit": 0,
    "internationalEnabled": true,
    "internationalPOSLimit": 0,
    "isInternationalEnabled": true,
    "maxCashLimit": 0,
    "maxCreditLimit": 0,
    "maxDomesticATMLimit": 0,
    "maxDomesticPOSLimit": 0,
    "maxInternationalATMLimit": 0,
    "maxInternationalPOSLimit": 0
  }
}

Response Example

{
  "cardDetail": {
    "dailyLimit": 0,
    "overseasDailyLimit": 0,
    "overseasMonthlyLimit": 0,
    "newDomesticATMLimit": 0,
    "newDomesticPOSLimit": 0,
    "newInternationalPOSLimit": 0,
    "newInternationalATMLimit": 0,
    "newCreditLimit": 0,
    "newCashLimit": 0,
    "referenceId": "string",
    "transactionStatus": "string"
  },
  "result": {
    "status": 0,
    "message": "string",
    "messageCode": "string"
  }
}

Request URL

Request Parameters

Field Data type Description
customerId String customer's customerId
customerName String customer's customerName
mobileNumber String customer's mobileNumber
emailId String customer's emailId
address String customer's address
cardDetails
accountNumber String customer's accountNumber
accountId String customer's accountId
cardNumber String customer's card's cardNumber
cardType String customer's card's cardType
cardStatus String customer's card's cardStatus
cashLimit 0 customer's card's cashLimit
creditLimit 0 customer's card's creditLimit
domesticATMLimit 0 customer's card's domesticATMLimit
domesticPOSLimit 0 customer's domesticPOSLimit
internationalATMLimit 0 customer's internationalATMLimit
internationalPOSLimit 0 customer's card's internationalPOSLimit
isInternationalEnabled Boolean customer's card's isInternationalEnabled
maxCashLimit 0 customer's card's maxCashLimit
maxCreditLimit 0 customer's card's maxCreditLimit
maxDomesticATMLimit 0 customer's card's maxDomesticATMLimit
maxDomesticPOSLimit 0 customer's card's maxDomesticPOSLimit
maxInternationalATMLimit 0 customer's card's maxInternationalATMLimit
maxInternationalPOSLimit 0 customer's card's maxInternationalPOSLimit

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail object
dailyLimit 0 customer's card dailyLimit
overseasDailyLimit 0 customer's card overseasDailyLimit
overseasMonthlyLimit 0 customer's card overseasMonthlyLimit
newDomesticATMLimit 0 customer's card newDomesticATMLimit
newDomesticPOSLimit 0 customer's card newDomesticPOSLimit
newInternationalATMLimit 0 customer's card newInternationalATMLimit
newInternationalPOSLimit 0 customer's card newInternationalPOSLimit
newCreditLimit 0 customer's card newCreditLimit
newCashLimit 0 customer's card newCashLimit
referenceId 0 customer's card referenceId
transactionStatus 0 customer's card transactionStatus
result object
message string
messageCode string
status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

   Debit Limit Update               Post

To know more about debit card limit update please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/debitcards/limit/confirm");
/*API Call for Debit Limit Update*/
@ApiOperation(value = "Returns confirmation of debit card limit")
  @RequestMapping(value = "/{customerId}/debitcards/{cardNumber}/limit/confirm", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST) public ResponseEntity<DebitCardLimitConfirmResponse> confirmDebitCardLimit(
      @PathVariable(value = "customerId", required = true) String customerId,@PathVariable(value = "cardNumber", required = true) String cardNumber,
      @RequestBody final DebitCardLimitConfirmRequest debitCardLimitConfirmRequest) {
    ApplicationLogger.logInfo("Entering getDebitCardLimitConfirm API");
/*End of API Call*/
/*Bank API Integration for Debit Limit Update*/
HttpResponse<String> response = Unirest.post(propertyUtil
          .getAPIUrl(PropertyConstants.DEBIT_CARD_LIMIT_CONFIRM_API_ENDPOINT, debitCardLimitConfirmRequest.getCustomerId(),
              debitCardLimitConfirmRequest.getCardDetails().getCardNumber())).header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Debit Card Limit Confirm Response Body Before Transformation :" + response.getBody());
        String debitCardLimitConfirmResponseString = debitCardResponseMapper.getManipulatedDebitCardLimitConfirmResponse(response.getBody());
        ApplicationLogger.logInfo("Debit Card Limit Confirm Response Body After Transformation :" + response.getBody());
        debitCardLimitConfirmResponse = objectMapper.readValue(debitCardLimitConfirmResponseString, DebitCardLimitConfirmResponse.class);
      }
      return new ResponseEntity<>(debitCardLimitConfirmResponse, HttpStatus.valueOf(response.getStatus()));
/*End of Bank API Integration*/

Request Example

{
  "address": "string",
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails": {
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber": "string",
    "cardStatus": "string",
    "cardType": "string",
    "cashLimit": 0,
    "creditLimit": 0,
    "domesticATMLimit": 0,
    "domesticPOSLimit": 0,
    "internationalATMLimit": 0,
    "internationalEnabled": true,
    "internationalPOSLimit": 0,
    "isInternationalEnabled": true,
    "maxCashLimit": 0,
    "maxCreditLimit": 0,
    "maxDomesticATMLimit": 0,
    "maxDomesticPOSLimit": 0,
    "maxInternationalATMLimit": 0,
    "maxInternationalPOSLimit": 0
  }
}

Response Example

{
  "cardDetail": {
    "dailyLimit": 0,
    "overseasDailyLimit": 0,
    "overseasMonthlyLimit": 0,
    "newDomesticATMLimit": 0,
    "newDomesticPOSLimit": 0,
    "newInternationalPOSLimit": 0,
    "newInternationalATMLimit": 0,
    "newCreditLimit": 0,
    "newCashLimit": 0,
    "referenceId": "string",
    "transactionStatus": "string"
  },
  "result": {
    "status": 0,
    "message": "string",
    "messageCode": "string"
  }
}

Request URL

Request Parameters

Field Data type Description
customerId String customer's customerId
customerName String customer's customerName
mobileNumber String customer's mobileNumber
emailId String customer's emailId
address String customer's address
cardDetails
accountNumber String customer's accountNumber
accountId String customer's accountId
cardNumber String customer's card's cardNumber
cardType String customer's card's cardType
cardStatus String customer's card's cardStatus
cashLimit 0 customer's card's cashLimit
creditLimit 0 customer's card's creditLimit
domesticATMLimit 0 customer's card's domesticATMLimit
domesticPOSLimit 0 customer's domesticPOSLimit
internationalATMLimit 0 customer's internationalATMLimit
internationalPOSLimit 0 customer's card's internationalPOSLimit
isInternationalEnabled Boolean customer's card's isInternationalEnabled
maxCashLimit 0 customer's card's maxCashLimit
maxCreditLimit 0 customer's card's maxCreditLimit
maxDomesticATMLimit 0 customer's card's maxDomesticATMLimit
maxDomesticPOSLimit 0 customer's card's maxDomesticPOSLimit
maxInternationalATMLimit 0 customer's card's maxInternationalATMLimit
maxInternationalPOSLimit 0 customer's card's maxInternationalPOSLimit

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail object
dailyLimit 0 customer's card dailyLimit
overseasDailyLimit 0 customer's card overseasDailyLimit
overseasMonthlyLimit 0 customer's card overseasMonthlyLimit
maxDomesticATMLimit 0 customer's card's maxDomesticATMLimit
maxDomesticPOSLimit 0 customer's card's maxDomesticPOSLimit
maxInternationalATMLimit 0 customer's card's maxInternationalATMLimit
maxInternationalPOSLimit 0 customer's card's maxInternationalPOSLimit
newCreditLimit 0 customer's card newCreditLimit
newCashLimit 0 customer's card newCashLimit
referenceId 0 customer's card referenceId
transactionStatus 0 customer's card transactionStatus
result object
message string
messageCode string
status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

InternationalUsage

To know more about international usage please refer here

    isEnabled                              Post

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/{cardId}/internationalUsage/enabled");
/*API Call for International Usage Enabled*/
  @ApiOperation("Return international usage of card is enabled or disabled")
  @RequestMapping(value = "/{customerId}/cards/{cardNumber}/internationalUsage/enabled", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<InternationalUsageResponse> updateInternationalUsage(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber, @RequestBody final InternationalCardUsageRequest internationalCardUsageRequest ) {
    ApplicationLogger.logInfo("Entering updateInternationalUsage  API");
/*End of API Call*/
/*Bank API Integration for International Usage Enabled*/
HttpResponse<String> response =
          Unirest
              .post(propertyUtil.getAPIUrl(PropertyConstants.INTERNATIONAL_USAGE_ENABLED_API_END_POINT, internationalCardUsageRequest.getCustomerId(),internationalCardUsageRequest.getCardDetails().getCardNumber())).header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("International Usage API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo(" International Usage Response Body Before Transformation :" + response.getBody());
        String depositPlanResponseString = cardsResponseMapper.getManipulatedInternationalUsageResponse(response.getBody());
        ApplicationLogger.logInfo("International Usage Response Body After Transformation :" + response.getBody());
        internationalUsageResponse = objectMapper.readValue(depositPlanResponseString, InternationalUsageResponse.class);
      }
      return ResponseEntity.ok(internationalUsageResponse);
/*End of Bank API Integration*/

Request Example

{
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails":{
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber":"string",
    "displayCardNumber":"string",
    "cardType":"string",
    "cardStatus":"string",
    "isInternationalEnabled":true
  }
}

Response Example

{
  "referenceId": "string",
  "transactionStatus": "string",
  "isInternationalEnabled": true,
  "result": {
    "messageCode": "string",
    "message": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data type Description
      customerId String customer's customerId
      customerName String customer's customerName
      mobileNumber String customer's mobileNumber
      emailId String customer's emailId
      address String customer's address
cardDetails
      accountNumber String customer's accountNumber
      accountId String customer's accountId
      cardNumber String customer's card's cardNumber
 displayCardNumber String customer's card's displayCardNumber
      cardName String customer's cardName
      cardType String customer's card's cardType
      cardStatus String customer's card's cardStatus
      isInternationalEnabled Boolean card's isInternationalUsageEnabled

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail
      referenceId String customer's card's referenceId
      transactionStatus string customer's card's transaction Status
  isInternationalEnabled Boolean customer's card's International Usage Enabled
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

    Update                                  Post

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/{cardId}/internationalUsage/api");
/*API Call for International Usage Update*/
 @ApiOperation("Return international usage reference id and status ")
  @RequestMapping(value = "/{customerId}/cards/{cardNumber}/internationalUsage/api", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<InternationalUsageResponse> updateInternationalUsageFinalApiCall(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber, @RequestBody final InternationalCardUsageRequest internationalCardUsageRequest ) {
    ApplicationLogger.logInfo("Entering updateInternationalUsage  API");
/*End of API Call*/
/*Bank API Integration for International Usage Update*/
HttpResponse<String> response =
          Unirest
              .post(propertyUtil.getAPIUrl(PropertyConstants.INTERNATIONAL_USAGE_API_END_POINT, internationalCardUsageRequest.getCustomerId(),internationalCardUsageRequest.getCardDetails().getCardNumber())).header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("International Usage API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo(" International Usage Response Body Before Transformation :" + response.getBody());
        String depositPlanResponseString = cardsResponseMapper.getManipulatedInternationalUsageResponse(response.getBody());
        ApplicationLogger.logInfo("International Usage Response Body After Transformation :" + response.getBody());
        internationalUsageResponse = objectMapper.readValue(depositPlanResponseString, InternationalUsageResponse.class);
      }
      return ResponseEntity.ok(internationalUsageResponse);
/*End of Bank API Integration*/

Request Example

{
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails":{
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber":"string",
    "displayCardNumber":"string",
    "cardType":"string",
    "cardStatus":"string",
    "isInternationalEnabled":true
  }
}

Response Example

{
  "referenceId": "string",
  "transactionStatus": "string",
  "result": {
    "messageCode": "string",
    "message": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data type Description
      customerId String customer's customerId
      customerName String customer's customerName
      mobileNumber String customer's mobileNumber
      emailId String customer's emailId
      address String customer's address
cardDetails
      accountNumber String customer's accountNumber
      accountId String customer's accountId
      cardNumber String customer's card's cardNumber
 displayCardNumber String customer's card's displayCardNumber
      cardName String customer's cardName
      cardType String customer's card's cardType
      cardStatus String customer's card's cardStatus

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail
      referenceId String customer's card's referenceId
      transactionStatus string customer's card's transaction Status
  isInternationalEnabled Boolean customer's card's International Usage Enabled
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Replace Card                            Post

To know more about international usage please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/{cardId}/replaceCard/confirm");
/*API CALL for Replace Card*/
 @ApiOperation("Return status of replacement of card")
  @RequestMapping(value = "/{customerId}/cards/{cardNumber}/replaceCard/confirm", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<ReplaceCardConfirmResponse> replaceCard(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber, @RequestBody final ReplaceCardConfirmRequest replaceCardConfirmRequest) {
    ApplicationLogger.logInfo("Entering getReplaceCard Confirm API");
/*End of API Call*/
/*Bank API Integration for Replacement of Card*/
HttpResponse<String> response =
          Unirest.post(propertyUtil.getAPIUrlForReplaceCard(PropertyConstants.REPLACE_CARD_CONFIRM_API_ENDPOINT, replaceCardConfirmRequest))
              .header("Content-Type", "application/json").body(objectMapper.writeValueAsString(replaceCardConfirmRequest)).asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Replace Card Confirm Response Body Before Transformation :" + response.getBody());
        String replaceCardConfirmResponseString = cardsResponseMapper.getManipulatedReplaceCardConfirmResponse(response.getBody());
        ApplicationLogger.logInfo("CardNumber :" + response.getBody());
        replaceCardConfirmResponse = objectMapper.readValue(replaceCardConfirmResponseString, ReplaceCardConfirmResponse.class);
      }
      return new ResponseEntity<>(replaceCardConfirmResponse, HttpStatus.valueOf(response.getStatus()));
/*End of API Integration*/

Request Example

{
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails":{
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber":"string",
    "displayCardNumber":"string",
    "cardType":"string",
    "cardStatus":"string",
    "replaceType":"String",
  }
}

Response Example

{
  "result": {
    "messageCode": "String",
    "message": "String",
    "status": 200
  },
  "cardDetail": {
    "referenceId": "String",
    "transactionStatus": "String"
  }
}

Request URL

Request Parameters

Field Data type Description
      customerId String customer's customerId
      customerName String customer's customerName
      mobileNumber String customer's mobileNumber
      emailId String customer's emailId
      address String customer's address
cardDetails
      accountNumber String customer's accountNumber
      accountId String customer's accountId
      cardNumber String customer's card's cardNumber
 displayCardNumber String customer's card's displayCardNumber
      cardName String customer's cardName
      cardType String customer's card's cardType
      cardStatus String customer's card's cardStatus
      replaceType String card's replaceType

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
result object
      message string
      messageCode string
      status 0
cardDetail
      referenceId String customer's card's referenceId
      transactionStatus string customer's card's transaction Status

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Reset Pin                                   Post

To know more about international usage please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/{cardId}/resetPin/confirm");
/*API CALL for Reset Pin*/
@ApiOperation("Return reset pin status of selected card")
  @RequestMapping(value = "/{customerId}/cards/{cardNumber}/resetPin/confirm", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<ResetPinConfirmResponse> resetPin(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber, @RequestBody final ResetPinConfirmRequest resetPinConfirmRequest) {
    ApplicationLogger.logInfo("Entering getResetPin Confirm API");
/*End of API Call*/
/*Bank API Integration for Reset Pin of Card*/
HttpResponse<String> response =
          Unirest.post(propertyUtil.getAPIUrlForResetPin(PropertyConstants.RESET_PIN_CONFIRM_API_ENDPOINT, resetPinConfirmRequest))
              .header("Content-Type", "application/json").body(objectMapper.writeValueAsString(resetPinConfirmRequest)).asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Reset Pin Confirm Response Body Before Transformation :" + response.getBody());
        String resetPinConfirmResponseString = cardsResponseMapper.getManipulatedResetPinConfirmResponse(response.getBody());
        ApplicationLogger.logInfo("Reset Pin Confirm Response Body After Transformation :" + response.getBody());
        resetPinConfirmResponse = objectMapper.readValue(resetPinConfirmResponseString, ResetPinConfirmResponse.class);
      }
      return new ResponseEntity<>(resetPinConfirmResponse, HttpStatus.valueOf(response.getStatus()));
/*End of API Integration*/

Request Example

{
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails":{
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber":"string",
    "displayCardNumber":"string",
    "cardType":"string",
    "cardStatus":"string",
    "inputPin":"String",
  }
}

Response Example

{
  "result": {
    "messageCode": "String",
    "message": "String",
    "status": 200
  },
  "cardDetail": {
    "referenceId": "String",
    "transactionStatus": "String"
  }
}

Request URL

Request Parameters

Field Data type Description
      customerId String customer's customerId
      customerName String customer's customerName
      mobileNumber String customer's mobileNumber
      emailId String customer's emailId
      address String customer's address
cardDetails
      accountNumber String customer's accountNumber
      accountId String customer's accountId
      cardNumber String customer's card's cardNumber
 displayCardNumber String customer's card's displayCardNumber
      cardName String customer's cardName
      cardType String customer's card's cardType
      cardStatus String customer's card's cardStatus
      inputPin String card's inputPin

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
result object
      message string
      messageCode string
      status 0
cardDetail
      referenceId String customer's card's referenceId
      transactionStatus string customer's card's transaction Status

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Card Transactions

This will be part of balance inquiry, to know more please refer here

   Credit Card Transaction         Get

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/creditcards/{cardNumber}/transactions");
/*API Call for Credit Card Transaction*/
@ApiOperation(value = "Returns selected card transaction history")
  @RequestMapping(value = "/{customerId}/cards/creditcards/{cardNumber}/transactions", produces = {
      "application/json"}, method = RequestMethod.GET) public ResponseEntity<CardTransactionsResponse> getCreditCardTransactions(
      @PathVariable(value = "customerId", required = true) String customerId,
      @PathVariable(value = "cardNumber", required = true) String cardNumber) {
    logger.info("Entering getCreditCardTransactions");
/*End of API call*/
/*Bank API Integration for Credit Cards Transaction*/
HttpResponse<String> response =
          Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.CREDIT_CARD_TRANSACTIONS_HISTORY_API_END_POINT, customerId, accountId))
              .header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Credit Card Transactions Response Body Before Transformation :" + response.getBody());
        String accountTransactionsResponseString = cardsResponseMapper.getManipulatedCardTransactionsResponse(response.getBody());
        ApplicationLogger.logInfo("Credit Card Transactions Response Body After Transformation :" + response.getBody());
        cardTransactionsResponse = objectMapper.readValue(accountTransactionsResponseString, CardTransactionsResponse.class);
      }
      return ResponseEntity.ok(cardTransactionsResponse);
/*End of Bank API Integration*/

Response Example

{
   "cardTransactions":[
      {
         "transactionId": "string",
         "accountId": "string",
         "accountNumber": "string",
         "foreignTxnCurrency":"string",
         "amount":0.00,
         "description":"string",
         "currency":"string",
         "foreignTxnAmount":0.00,
         "transactionType": "string",
         "cardType":"string",
         "foreignTxnExchangeRate":0.00,
         "txnDate":"string",
         "referenceId":"string",
         "categoryType": "string",
         "categorySubType": "string",
         "merchantName": "string"
      }
   ],
   "result":{
      "messageCode":"string",
      "message":"string",
      "status":0
   }
}

Request URL

Request Parameters

Field Data type Description
customerId 0 customer's customerId
cardNumber 0 customer's card's cardNumber

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardTransactions object customer's card's transactions
      transactionId String customer's transactionId
      accountId String customer's accountId
      accountNumber String customer's accountNumber
      foreignTxnCurrency string customer's card's foreign transaction currency
      description string customer's card's transaction description
      currency string customer's card's transaction currency
      foreignTxnAmount 0 customer's card's foreign transaction amount
      amount 0 customer's card's transaction amount
      transactionType String customer's transactionType
      cardType String customer's cardType
  foreignTxnExchangeRate 0 customer's card's foreign transaction exchange rate
      txnDate string customer's card's transaction date
      referenceId string customer's card's transaction refernce id
      category string customer's card's transaction category
      categorySubType string customer's card's transaction subcategoryType
      currency string customer's card's transaction currency
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

   Debit Card Transaction          Get

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/debitcards/{cardNumber}/transactions");
/*API Call for Debit Cards Transactions*/
H@ApiOperation(value = "Returns selected card transaction history")
  @RequestMapping(value = "/{customerId}/cards/debitcards/{cardNumber}/transactions", produces = {
      "application/json"}, method = RequestMethod.GET) public ResponseEntity<CardTransactionsResponse> getDebitCardTransactions(
      @PathVariable(value = "customerId", required = true) String customerId,
      @PathVariable(value = "cardNumber", required = true) String cardNumber) {
    logger.info("Entering getDebitCardTransactions");
/*End of API Call*/
/*Bank API Integration for Debit Cards Transactions*/
HttpResponse<String> response =
          Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.DEBIT_CARD_TRANSACTIONS_HISTORY_API_END_POINT, customerId, accountId))
              .header("cache-control", "no-cache").asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Credit Card Transactions Response Body Before Transformation :" + response.getBody());
        String accountTransactionsResponseString = cardsResponseMapper.getManipulatedCardTransactionsResponse(response.getBody());
        ApplicationLogger.logInfo("Credit Card Transactions Response Body After Transformation :" + response.getBody());
        cardTransactionsResponse = objectMapper.readValue(accountTransactionsResponseString, CardTransactionsResponse.class);
      }
      return ResponseEntity.ok(cardTransactionsResponse);
/*End of Bank API Integration*/

Response Example

{
   "cardTransactions":[
      {
         "transactionId": "string",
         "accountId": "string",
         "accountNumber": "string",
         "foreignTxnCurrency":"string",
         "amount":0.00,
         "description":"string",
         "currency":"string",
         "foreignTxnAmount":0.00,
         "transactionType": "string",
         "cardType":"string",
         "foreignTxnExchangeRate":0.00,
         "txnDate":"string",
         "referenceId":"string",
         "categoryType": "string",
         "categorySubType": "string",
         "merchantName": "string"
      }
   ],
   "result":{
      "messageCode":"string",
      "message":"string",
      "status":0
   }
}

Request URL

Request Parameters

Field Data type Description
customerId 0 customer's customerId
cardNumber 0 customer's card's cardNumber

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardTransactions object customer's card's transactions
      transactionId String customer's transactionId
      accountId String customer's accountId
      accountNumber String customer's accountNumber
      foreignTxnCurrency string customer's card's foreign transaction currency
      description string customer's card's transaction description
      currency string customer's card's transaction currency
      foreignTxnAmount 0 customer's card's foreign transaction amount
      amount 0 customer's card's transaction amount
      transactionType String customer's transactionType
      cardType String customer's cardType
  foreignTxnExchangeRate 0 customer's card's foreign transaction exchange rate
      txnDate string customer's card's transaction date
      referenceId string customer's card's transaction refernce id
      category string customer's card's transaction category
      categorySubType string customer's card's transaction subcategoryType
      currency string customer's card's transaction currency
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Convert to Installments

   Credit Card Conversion         Get

To know more about convert to installments please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/creditcards/{cardNumber}/convertEMI");
/*API Call for Conversion of CreditCards Transactions to Installments*/
@ApiOperation("Return Conversion to EMI from Transaction of Credit card")
  @RequestMapping(value = "/{customerId}/cards/creditcards/{cardNumber}/convertEMI", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<ConvertEMIResponse> convertEMI(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber) {
    ApplicationLogger.logInfo("Entering getEMIConversion API");
/*End of API Call*/
/*Bank API Integration for Conversion of CreditCards Transactions to Installments*/
try {
      HttpResponse<String> response =
          Unirest.get(propertyUtil.getAPIUrlForConvertEMI(PropertyConstants.CONVERT_EMI_API_ENDPOINT,customerId,cardNumber))
              .header("Content-Type", "application/json").body(objectMapper.writeValueAsString(convertEMIRequest)).asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Convert EMI Response Body Before Transformation :" + response.getBody());
        String convertEMIResponseString = cardsResponseMapper.getManipulatedConvertEMICreditCardConfirmResponse(response.getBody());
        ApplicationLogger.logInfo("Convert EMI Response Body After Transformation :" + response.getBody());
        convertEMIResponse = objectMapper.readValue(convertEMIResponseString, ConvertEMIResponse.class);
      }
      return new ResponseEntity<>(convertEMIResponse, HttpStatus.valueOf(response.getStatus()));
/*End of Bank API Integration*/

Response Example

{
  "listofEMIPlan": [
    {
      "amount": {
        "amount": 0.00,
        "amountFormatted": "string",
        "currency": "string"
      },
      "emiAmount": {
        "amount": 0.00,
        "amountFormatted": "string",
        "currency": "string"
      },
      "processingFee": {
        "amount": 0.00,
        "amountFormatted": "string",
        "currency": "string"
      },
      "gst": {
        "amount": 0.00,
        "amountFormatted": "string",
        "currency": "string"
      },
      "interestRate": "string",
      "tenure": {
        "years": "0",
        "months": "0",
        "days": "0",
        "tenureFormatted": "string"
      },
      "totalAmount": {
        "amount": 0.00,
        "amountFormatted": "string",
        "currency": "string"
      },
      "transactionSerialNumber": "string"
    }
  ],
  "result": {
    "status": 200,
    "message": "string",
    "messageCode": "string"
  }
}

Request URL

Request Parameters

No Request Parameters

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
listofEMIPlan
   amount
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   emiAmount
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   processingFee
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   gst
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   totalAmount
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   interestRate String amount's interestRate
   tenure
      years String years
      months String amount's months
      days String amount's days
      tenureFormatted String amount's tenureFormatted
   interestRate String amount's interestRate
   transactionSerialNumber String customer's transactionSerialNumber
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Installments Update

   CreditCard                             Post

To know more about installment update please refer here

URL obj = new URL("https://one-api.active.ai/banking-integration/v1/{customerId}/cards/creditcards/{cardNumber}/convertEMI/confirm");
/*API Call for Confirmation of Credit Cards Transactions to Installments*/
  @ApiOperation("Return status of Conversion to EMI from Transaction of Credit card")
  @RequestMapping(value = "/{customerId}/cards/creditcards/{cardNumber}/convertEMI/confirm", produces = {"application/json"}, consumes = {
      "application/json"}, method = RequestMethod.POST)
  public ResponseEntity<ConvertEMICreditCardConfirmResponse> convertEMICreditCard(@PathVariable(name = "customerId", required = true) String customerId,
      @PathVariable(name = "cardNumber", required = true) String cardNumber, @RequestBody final ConvertEMICreditCardConfirmRequest convertEMICreditCardConfirmRequest) {
    ApplicationLogger.logInfo("Entering getEMIConversion Confirm API");
/*End of API Call*/
/*Bank API Integration for confirmation of CreditCards Transactions to Installments*/
 HttpResponse<String> response =
          Unirest.post(propertyUtil.getAPIUrlForConvertEMICreditCardConfirm(PropertyConstants.CONVERT_EMI_CREDIT_CARD_CONFIRM_API_ENDPOINT, convertEMICreditCardConfirmRequest))
              .header("Content-Type", "application/json").body(objectMapper.writeValueAsString(convertEMICreditCardConfirmRequest)).asString();
      ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
      if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
        ApplicationLogger.logInfo("Convert EMI Confirm Response Body Before Transformation :" + response.getBody());
        String convertEMICreditCardConfirmResponseString = cardsResponseMapper.getManipulatedConvertEMICreditCardConfirmResponse(response.getBody());
        ApplicationLogger.logInfo("Convert EMI Confirm Response Body After Transformation :" + response.getBody());
        convertEMICreditCardConfirmResponse = objectMapper.readValue(convertEMICreditCardConfirmResponseString, ConvertEMICreditCardConfirmResponse.class);
      }
      return new ResponseEntity<>(convertEMICreditCardConfirmResponse, HttpStatus.valueOf(response.getStatus()));
/*End of Bank API Integration*/

Request Example

{
  "customerId": "string",
  "customerName": "string",
  "emailId": "string",
  "mobileNumber": "string",
  "cardDetails":{
    "accountNumber":"string",
    "accountId": "string",
    "cardNumber":"string",
    "displayCardNumber":"string",
    "cardType":"string",
    "cardStatus":"string",
  },
  "selectedEMIPlan": {
    "amount": {
      "amount": 0.00,
      "amountFormatted": "string",
      "currency": "string"
    },
    "emiAmount": {
      "amount": 0.00,
      "amountFormatted": "string",
      "currency": "string"
    },
    "processingFee": {
      "amount": 0.00,
      "amountFormatted": "string",
      "currency": "string"
    },
    "gst": {
      "amount": 0.00,
      "amountFormatted": "string",
      "currency": "string"
    },
    "interestRate": "string",
    "tenure": {
      "years": "0",
      "months": "0",
      "days": "0",
      "tenureFormatted": "string"
    },
    "totalAmount": {
      "amount": 0.00,
      "amountFormatted": "string",
      "currency": "string"
    },
    "transactionSerialNumber": "string"
  }
}

Response Example

{
  "cardDetail": {
    "referenceId": "String",
    "transactionStatus": "String"
  },
  "result": {
    "messageCode": "String",
    "message": "String",
    "status": 200
  }
}

Request URL

Request Parameters

Field Data type Description
      customerId String customer's customerId
      customerName String customer's customerName
      mobileNumber String customer's mobileNumber
      emailId String customer's emailId
      address String customer's address
cardDetails
      accountNumber String customer's accountNumber
      accountId String customer's accountId
      cardNumber String customer's card's cardNumber
 displayCardNumber String customer's card's displayCardNumber
      cardName String customer's cardName
      cardType String customer's card's cardType
      cardStatus String customer's card's cardStatus
selectedEMIPlan
   amount
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   emiAmount
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   processingFee
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   gst
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   totalAmount
      amount String amount
      amountFormatted String amount's amountFormatted
      currency String amount's currency
   interestRate String amount's interestRate
   tenure
      years String years
      months String amount's months
      days String amount's days
      tenureFormatted String amount's tenureFormatted
   interestRate String amount's interestRate
   transactionSerialNumber String customer's transactionSerialNumber

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
cardDetail
      referenceId String customer's card's referenceId
      transactionStatus string customer's card's transaction Status
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

  Loan              

This will be part of balance inquiry, to know more please refer here

Get list of loan accounts     Get

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/loan");
/* API to get loan accounts */
@ApiOperation(value = "Returns list of loan accounts based on customer ID")
@RequestMapping(value = "/{customerId}/accounts/loan", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<LoanAccountsResponse> getLoanAccounts(@PathVariable(name = "customerId", required = true) String customerId) { ApplicationLogger.logInfo("Entering getLoanAccountsResponseEntity API");
/* End of API call */
/* Bank API to get loan accounts */
 HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.LOAN_ACCOUNT_API_END_POINT, customerId, null)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("Loan API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo(" Loan Response Body Before Transformation :" + response.getBody());
String accountsResponseString = accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());
ApplicationLogger.logInfo(" Loan Response Body After Transformation :" + response.getBody());
loanAccountsResponse = objectMapper.readValue(accountsResponseString, LoanAccountsResponse.class);
}
return ResponseEntity.ok(loanAccountsResponse);

Example responses

200 Response

{
  "loanAccounts": [
    {
      "accountId": "string",
      "accountName": "string",
      "accountNumber": "string",
      "balance": {
        "amount": 0,
        "availableBalance": 0,
        "currencyCode": "string",
        "currentBalance": 0
      },
      "bankName": "string",
      "branchAddress": "string",
      "branchId": "string",
      "branchName": "string",
      "category": "string",
      "displayAccountNumber": "string",
      "lastStatementBalance": 0,
      "lastStatementDate": "string",
      "openingDate": "string",
      "product": "string",
      "productCode": "string",
      "status": "ACTIVE",
      "type": "LOAN",
      "originalPrincipalAmount": 0,
      "emiPaymentMethod": "string",
      "originalClosingDate": "string",
      "loanFundingDate": "string",
      "interestCalculationDate": "string",
      "interestRate": "string",
      "tenorTerm": 0,
      "tenorPeriod": "string",
      "maturityDate": "string",
      "interestAnnualPercentageRate": "string"
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accounts Object Array customer's accounts
     accountId string customer's account id
     accountName string customer's account name
     accountNumber string customer's account number
      balance object customer's account balance
            amount 0 customer's balance amount
            availableBalance 0 customer's available balance
            currencyCode string customer's amount's currency code
            currentBalance 0 customer's current balance
      bankName string customer's bank name
      branchAddress string customer's bank branch address
      branchId string customer's bank branch id
      branchName string customer's bank branch name
      category string customer's account category
      displayAccountNumber string customer's account number
      lastStatementBalance 0 customer's last statement balance
      lastStatementDate string customer's last statement date
      openingDate string customer's account opening date
      product string customer's ----
      status ACTIVE customer's status
      type LOAN customer's account type
      originalPrincipalAmount 0 customer's principle amount
     emiPaymentMethod string customer's emi payment method
      originalClosingDate string customer's loan closing date
      loanFundingDate string customer's loan funding date
     interestCalculationDate string customer's loan's interest calculation date
      interestRate 0 customer's loan interest rate
      tenorTerm 0 customer's loan tenor time
      tenorPeriod string customer's loan tenor period
      maturityDate string customer's loan maturity date
interestAnnualPercentageRate string customer's loan annual interest percentage rate
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Loan Account Details          Get

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/loan/{accountId}");
/* API to get loan account details */
@ApiOperation(value = "Returns selected loan account details")
@RequestMapping(value = "/{customerId}/accounts/loan/{accountId}", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<LoanAccountDetailResponse> getLoanAccountDetail(@PathVariable(name = "customerId", required = true) String customerId,
 @PathVariable(name = "accountId", required = true) String accountId) {
ApplicationLogger.logInfo("Entering getLoanAccountDetail API");
/* End of API call */
/*Bank integration to get loan account details */
HttpResponse<String>
response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.LOAN_ACCOUNT_DETAILS_API_END_POINT, customerId, accountId))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Loan Account Details Response Body Before Transformation :" + response.getBody());
String accountDetailResponseString = accountsResponseMapper.getManipulatedAccountDetailsResponse(response.getBody());
ApplicationLogger.logInfo("Loan Account Details Response Body After Transformation :" + response.getBody());
loanAccountDetailResponse = objectMapper.readValue(accountDetailResponseString, LoanAccountDetailResponse.class);
}
return ResponseEntity.ok(loanAccountDetailResponse);

Example responses

200 Response

{
  "accountDetails": {
    "accountId": "string",
    "ifscCode": "string",
    "branchName": "string",
    "branchAddress": "string",
    "accountHolderName": "string"
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string
accountId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accountDetail object customer's account details
     accountId string customer's account id
     accountName string customer's account name
      ifscCode string customer's bank account number
      branchName string customer's bank branch name
      branchAddress string customer's bank branch address
accountHolderName string customer's name
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Loan Account Balance        Get

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/loan/{accountId}/balance");
/* API to get loan account balance */
@ApiOperation(value = "Returns selected loan account balance")
@RequestMapping(value = "/{customerId}/accounts/loan/{accountId}/balance"
  produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<LoanAccountBalanceResponse> getLoanAccountBalance(@PathVariable(name = "customerId", required = true) String customerId,
@PathVariable(name = "accountId", required = true) String accountId) {
ApplicationLogger.logInfo("Entering getCasaAccountBalance API");
/* End of API call */
/*Bank integration to get loan account balance */
HttpResponse<String>
response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.LOAN_ACCOUNT_BALANCE_API_END_POINT, customerId, accountId))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Loan Account Balance Response Body Before Transformation :" + response.getBody());
String accountDetailResponseString = accountsResponseMapper.getManipulatedAccountsBalanceResponse(response.getBody());
ApplicationLogger.logInfo("Loan Account Balance Response Body After Transformation :" + response.getBody());
loanAccountBalanceResponse = objectMapper.readValue(accountDetailResponseString, LoanAccountBalanceResponse.class);
}
return ResponseEntity.ok(loanAccountBalanceResponse);

Example responses

200 Response

{
  "accountBalance": {
    "amount": 0,
    "availableBalance": 0,
    "currencyCode": "string",
    "currentBalance": 0
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string
accountId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accountBalance object customer's account balance
      amount 0 customer's balance amount
      availableBalance 0 customer's available balance
      currencyCode string customer's amount currency code
      currentBalance 0 customer's account current balance
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

  Deposit         

Get list of deposit accounts     Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/deposit");
/* API to get deposit accounts */
@ApiOperation(value = "Returns list of deposit accounts based on customer ID")
@RequestMapping(value = "/{customerId}/accounts/deposit", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<DepositAccountsResponse> getDepositAccounts(@PathVariable(name = "customerId", required = true) String customerId) {
ApplicationLogger.logInfo("Entering getDepositAccountsResponseEntity API");
/* End of API call */
/* Bank integration to get deposit accounts */
HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.DEPOSIT_ACCOUNT_API_END_POINT, customerId, null)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("Deposit API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo(" Deposit Response Body Before Transformation :" + response.getBody());
String accountsResponseString = accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());
ApplicationLogger.logInfo(" Deposit Response Body After Transformation :" + response.getBody());
depositAccountsResponse = objectMapper.readValue(accountsResponseString, DepositAccountsResponse.class);
}
return ResponseEntity.ok(depositAccountsResponse);

Example responses

200 Response

{
  "depositAccounts": [
    {
      "accountId": "string",
      "bankName":"string",
      "accountName": "string",
      "accountNumber": "string",
      "balance": {
        "amount": 0,
        "availableBalance": 0,
        "currencyCode": "string",
        "currentBalance": 0
      },
      "bankName": "string",
      "branchAddress": "string",
      "branchId": "string",
      "branchName": "string",
      "category": "string",
      "ifscCode":"string",
      "displayAccountNumber": "string",
      "lastStatementBalance": 0,
      "lastStatementDate": "string",
      "openingDate": "string",
      "product": "string",
      "productCode": "string",
      "status": "ACTIVE",
      "accountType": "DEPOSIT",
      "accountHolderName":"string",
      "earlyWithdrawalFee":"string",
      "earlyWithdrawalAmount":"string",
      "maturityDate":"string",
      "maturityAmount":"string",
      "maturityInstruction":"string",
      "initialPrincipalAmount":"string",
      "interestRate":"string",
      "tenorTerm":"string",
      "tenorPeriod":"string",
      "totalInterestAmountEarned":"string",
      "lastRenewalDate":"string",
      "depositName":"string"

    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accounts Object Array customer's accounts
     accountId string customer's account id
     accountName string customer's account name
     accountNumber string customer's account number
     balance object customer's account balance
            amount 0 customer's balance amount
            availableBalance 0 customer's available balance
            currencyCode string customer's amount's currency code
            currentBalance 0 customer's current balance
      bankName string customer's bank name
      branchAddress string customer's bank branch address
      branchId string customer's bank branch id
      branchName string customer's bank branch name
      category string customer's account category
      displayAccountNumber string customer's account number
      lastStatementBalance 0 customer's last statement balance
      lastStatementDate string customer's last statement date
      openingDate string customer's account opening date
      product string customer's account product name
      status ACTIVE customer's status
      type DEPOSIT customer's account type
  accountHolderName string customer's name
    earlyWithdrawalFee 0 customer's deposit accounts early withdrawl fee
    earlyWithdrawalAmount 0 customer's deposit accounts early withdrawl amount
      maturityDate string customer's deposit account maturity date
      maturityAmount 0 customer's deposit account maturity amount
      maturityInstruction string customer's deposit account maturity instruction
      initialPrincipalAmount 0 customer's deposit account initial principle amount
      interestRate string customer's deposit account interest rate
      tenorTerm 0 customer's deposit account tenor term
      tenorPeriod string customer's deposit account tenor period
totalInterestAmountEarned 0 customer's deposit account total interest amount earned
      lastRenewalDate string customer's deposit account last renewal date
      depositName string customer's name
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Deposit Account Details          Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/deposit/{accountId}");
/* API to get deposit account details */
@ApiOperation(value = "Returns selected deposit account details")
@RequestMapping(value = "/{customerId}/accounts/deposit/{accountId}", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<DepositAccountDetailResponse> getDepositAccountDetail(@PathVariable(name = "customerId", required = true) String customerId,
@PathVariable(name = "accountId", required = true) String accountId) {
ApplicationLogger.logInfo("Entering getDepositAccountDetail API");
/* End of API call */
/* Bank integration to get deposit account details */
HttpResponse<String>
response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.DEPOSIT_ACCOUNT_DETAILS_API_END_POINT, customerId, accountId)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Deposit Account Details Response Body Before Transformation :" + response.getBody());
String accountDetailResponseString = accountsResponseMapper.getManipulatedAccountDetailsResponse(response.getBody());
ApplicationLogger.logInfo("Deposit Account Details Response Body After Transformation :" + response.getBody());
depositAccountDetailResponse = objectMapper.readValue(accountDetailResponseString, DepositAccountDetailResponse.class);
}
return ResponseEntity.ok(depositAccountDetailResponse);

Example responses

200 Response

{
  "accountDetails": {
    "accountId": "string",
    "ifscCode": "string",
    "branchName": "string",
    "branchAddress": "string",
    "accountHolderName": "string"
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string
accountId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accountDetail object customer's account details
     accountId string customer's account id
     accountName string customer's account name
      ifscCode string customer's bank account number
      branchName string customer's bank branch name
      branchAddress string customer's bank branch address
accountHolderName string customer's name
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Deposit Account Balance        Get

This will be part of balance inquiry, to know more please refer here

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/accounts/deposit/{accountId}/balance");
/* API to get deposit account balance */
@ApiOperation(value = "Returns selected deposit account balance")
@RequestMapping(value = "/{customerId}/accounts/deposit/{accountId}/balance", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<DepositAccountBalanceResponse> getDepositAccountBalance(@PathVariable(name = "customerId", required = true) String customerId,
@PathVariable(name = "accountId", required = true) String accountId) {
ApplicationLogger.logInfo("Entering getDepositAccountBalance API");
/* End of API call */
/* Bank integration to get deposit account balance */
 HttpResponse<String>
 response = Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.DEPOSIT_ACCOUNT_BALANCE_API_END_POINT, customerId, accountId)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Deposit Account Balance Response Body Before Transformation :" + response.getBody());
String accountDetailResponseString = accountsResponseMapper.getManipulatedAccountsBalanceResponse(response.getBody());
ApplicationLogger.logInfo("Deposit Account Balance Response Body After Transformation :" + response.getBody());
depositAccountBalanceResponse = objectMapper.readValue(accountDetailResponseString, DepositAccountBalanceResponse.class);
}
return ResponseEntity.ok(depositAccountBalanceResponse);

Example responses

200 Response

{
  "accountBalance": {
    "amount": 0,
    "availableBalance": 0,
    "currencyCode": "string",
    "currentBalance": 0
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string
accountId string

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
accountBalance object customer's account balance
      amount 0 customer's balance amount
      availableBalance 0 customer's available balance
      currencyCode string customer's amount currency code
      currentBalance 0 customer's account current balance
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Open Certificate of Deposit

To know more about open certificate of deposit please refer here

    Deposit Plans                        Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/deposit/plans");
/* API to fetch deposit plans for fixed deposit */
@ApiOperation(value = "Returns available deposit service plans")
@RequestMapping(value = "/{customerId}/deposit/plans", produces ={"application/json"}, consumes = {"application/json"}, method = RequestMethod.POST)
public ResponseEntity<DepositServiceResponse> getDepositPlans(@PathVariable(name = "customerId", required = true) String customerId,@RequestBody final DepositServiceRequest depositServiceRequest) {
ApplicationLogger.logInfo("Entering getDepositPlans API");
/* End of API call */
/* Bank integration to fetch deposit plans for fixed deposit */
HttpResponse<String> response =
Unirest.post(propertyUtil.getAPIUrl(PropertyConstants.DEPOSIT_PLAN_API_END_POINT, depositServiceRequest.getCustomerId(),depositServiceRequest.getCreditableAccounts().getAccountId())).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("Deposit Plan API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo(" Deposit Plan Response Body Before Transformation :" + response.getBody());
String depositPlanResponseString = depositPlanResponseMapper.getManipulatedDepositPlanResponse(response.getBody());
ApplicationLogger.logInfo("Deposit Plan Response Body After Transformation :" + response.getBody());
depositServiceResponse = objectMapper.readValue(depositPlanResponseString, DepositServiceResponse.class);
}
return ResponseEntity.ok(depositServiceResponse);

Example responses

200 Response

{
  "depositPlans": [
    {
      "amount": 0,
      "tenure": {
        "years": "string",
        "months": "string",
        "days": "string",
        "tenureFormatted": "string"
      },
      "interestRate": "string.",
      "maturityAmount": 0
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email Id
address string customer's address
depositPlans object array
    amount string customer's fixed deposit amount
    interestRate string customer's fixed deposit interest rate
    maturityAmount string customer's fixed deposit maturity amount
debitableAccounts object array
    accountId string customer's fixed deposit debitable account Id
    accountHolderName string customer's name
    branchId string customer's branch Id
    branchName string customer's branch name

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
depositPlans object array
      amount 0 customer's fixed deposit amount
      tenure object
            years string customer's fixed deposit tenure year
            months string customer's fixed deposit tenure month
            days string customer's fixed deposit tenure days
            tenureFormatted string customer's fixed deposit tenure formatted
      interestRate string customer's fixed deposit interest rate
      maturityAmount 0 customer's fixed deposit maturity amount
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

    Deposit Nominees                Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/deposit/nominees");
/* API to fetch nominees for fixed deposit */
@ApiOperation(value = "Returns nominees for deposit service")
@RequestMapping(value = "/{customerId}/deposit/nominees", produces = {"application/json"},consumes = {"application/json"}, method = RequestMethod.POST)
public ResponseEntity<DepositServiceResponse> getDepositPlanNominees(@PathVariable(name = "customerId", required = true) String customerId,@RequestBody final DepositServiceRequest depositServiceRequest) {
ApplicationLogger.logInfo("Entering getDepositPlanNominees API");
/* End of API call */
/* Bank integration to fetch nominees for fixed deposit */
HttpResponse<String> response =
Unirest.post(propertyUtil.getAPIUrl(PropertyConstants.NOMINEE_API_END_POINT, depositServiceRequest.getCustomerId(),
depositServiceRequest.getCreditableAccounts().getAccountId())).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("Nominee API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo(" Nominee Response Body Before Transformation :" + response.getBody());
String nomineesResponseString = depositPlanResponseMapper.getManipulatedNomineeResponse(response.getBody());
ApplicationLogger.logInfo("Nominee Response Body After Transformation :" + response.getBody());
depositServiceResponse = objectMapper.readValue(nomineesResponseString, DepositServiceResponse.class);
}
return ResponseEntity.ok(depositServiceResponse);

Example responses

200 Response

{
  "depositPlans": {
    "nominee": {
    "nomineeName": "string",
    "nomineeAddress": "string",
    "nomineeRelationship": "string",
    "minor": false,
    "guardian": "string"
  }
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email Id
address string customer's address
depositPlans object array
    amount string customer's fixed deposit amount
    interestRate string customer's fixed deposit interest rate
    maturityAmount string customer's fixed deposit maturity amount
debitableAccounts object array
    accountId string customer's fixed deposit debitable account Id
    accountHolderName string customer's name
    branchId string customer's branch Id
    branchName string customer's branch name

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
depositPlans object array
      nominee object
        nomineeName string customer's fixed deposit nominee name
      nomineeAddress string customer's fixed deposit nominee address
  nomineeRelationship string customer's relationship with nominee
            minor 0 whether nominee is a minor
            guardian 0 minor nominees guadian
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

    Confirm Deposit                   Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/deposit/confirm");
/* API to get status of opening or closing fixed deposit */
@ApiOperation(value = "Final API call for fixed deposit status and reference id ")
@RequestMapping(value = "/{customerId}/deposit/confirm", produces = {"application/json"}, consumes = {"application/json"},method = RequestMethod.POST)
public ResponseEntity<DepositServiceResponse> getDepositPlanFinalResponse(@PathVariable(name = "customerId", required = true) String customerId,@RequestBody final DepositServiceRequest depositServiceRequest) {
ApplicationLogger.logInfo("Entering getDepositPlanFinalResponse API");
/* End of API call */
/* Bank integration to get status of opening or closing  fixed deposit */
HttpResponse<String> response =
Unirest.post(propertyUtil.getAPIUrl(PropertyConstants.OPEN_FD_API_END_POINT, depositServiceRequest.getCustomerId(),
depositServiceRequest.getCreditableAccounts().getAccountId())).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("Deposit Plan Final API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo(" Deposit Plan Final API Response Body Before Transformation :" + response.getBody());
String depositPlanFinalAPiCallResponseString = depositPlanResponseMapper.getManipulatedDepositPlanFinalApiCallResponse(response.getBody());
ApplicationLogger.logInfo("Deposit Plan Final API Response Body After Transformation :" + response.getBody());
depositServiceResponse = objectMapper.readValue(depositPlanFinalAPiCallResponseString, DepositServiceResponse.class);
}
return ResponseEntity.ok(depositServiceResponse);

Example responses

200 Response

{
  "depositPlans": {
    "status": "SUCCESS",
    "FDAccountId": "987654323011"
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email Id
address string customer's address
depositPlans object array
    amount string customer's fixed deposit amount
    interestRate string customer's fixed deposit interest rate
    maturityAmount string customer's fixed deposit maturity amount
debitableAccounts object array
    accountId string customer's fixed deposit debitable account Id
    accountHolderName string customer's name
    branchId string customer's branch Id
    branchName string customer's branch name

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
depositPlans object array
      FDAccountId string customer's fixed deposit refernce Id
      status string customer's fixed deposit status
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Close Certificate of Deposit

To know more about close certificate of deposit please refer here

    Confirm Deposit                   Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/deposit/confirm");
/* API to get status of opening or closing fixed deposit */
@ApiOperation(value = "Final API call for fixed deposit status and reference id ")
@RequestMapping(value = "/{customerId}/deposit/confirm", produces = {"application/json"}, consumes = {"application/json"},method = RequestMethod.POST)
public ResponseEntity<DepositServiceResponse> getDepositPlanFinalResponse(@PathVariable(name = "customerId", required = true) String customerId,@RequestBody final DepositServiceRequest depositServiceRequest) {
ApplicationLogger.logInfo("Entering getDepositPlanFinalResponse API");
/* End of API call */
/* Bank integration to get status of opening or closing  fixed deposit */
HttpResponse<String> response =
Unirest.post(propertyUtil.getAPIUrl(PropertyConstants.OPEN_FD_API_END_POINT, depositServiceRequest.getCustomerId(),
depositServiceRequest.getCreditableAccounts().getAccountId())).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("Deposit Plan Final API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo(" Deposit Plan Final API Response Body Before Transformation :" + response.getBody());
String depositPlanFinalAPiCallResponseString = depositPlanResponseMapper.getManipulatedDepositPlanFinalApiCallResponse(response.getBody());
ApplicationLogger.logInfo("Deposit Plan Final API Response Body After Transformation :" + response.getBody());
depositServiceResponse = objectMapper.readValue(depositPlanFinalAPiCallResponseString, DepositServiceResponse.class);
}
return ResponseEntity.ok(depositServiceResponse);

Example responses

200 Response

{
  "depositPlans": {
    "status": "SUCCESS",
    "FDAccountId": "987654323011"
  },
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email Id
address string customer's address
depositPlans object array
    amount string customer's fixed deposit amount
    interestRate string customer's fixed deposit interest rate
    maturityAmount string customer's fixed deposit maturity amount
debitableAccounts object array
    accountId string customer's fixed deposit debitable account Id
    accountHolderName string customer's name
    branchId string customer's branch Id
    branchName string customer's branch name

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
depositPlans object array
      FDAccountId string customer's fixed deposit refernce Id
      status string customer's fixed deposit status
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

  Transfer

To know more about transfer please refer here

Confirm Transfer                   Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/transfer/confirm");
/* API to get transfer status */
@RequestMapping(value = "/{customerId}/transfer/confirm", produces = {"application/json"}, consumes = {"application/json"},
method = RequestMethod.POST)
public ResponseEntity<FundTransferResponse> confirmTransfer(@PathVariable(value = "customerId", required = true) Integer customerId,
@RequestBody final FundTransferRequest fundTransferRequest) {
ApplicationLogger.logInfo("Entering confirmTransfer API");
/* End of API call */
/* Bank integration to get transfer status */
 HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrlForFundTransfer(PropertyConstants.TRANSFER_CONFIRM_API_END_POINT, fundTransferRequest))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Confirm Transfer Response Body Before Transformation :" + response.getBody());
String ConfirmTransferResponseString = fundTransferResponseMapper.getManipulatedFundTransferResponse(response.getBody());
ApplicationLogger.logInfo("Confirm Transfer Response Body After Transformation :" + response.getBody());
fundTransferResponse = objectMapper.readValue(ConfirmTransferResponseString, FundTransferResponse.class);
}
return ResponseEntity.ok(fundTransferResponse);


Example responses

200 Response

{
  "txnReferenceId":"string",
  "transactionStatus":"string",
  "transactionFee":0,
  "transferAmount":0,
  "isChargeTransactionFee":false,
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email Id
address string customer's address
type string payee's transaction type
payeeType string payee's type
amount string payee's transaction amount
payeeId string payee's Id
payeeAccountId string payee's account Id
payeeBankId string payee's bank Id
purpose string payee's transaction purpose

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
transactionStatus SUCCESS customer's card's transaction status
txnReferenceId string customer's card's transaction reference id
transactionFee 0 Transaction fee
transferAmount 0 Amount need to be transfered
isChargeTransactionFee boolean transaction fee is applicable or not
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Payee List                              Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/transfer/payees");
/* API to get list of payees  */
@RequestMapping(value = "/{customerId}/transfer/payees", produces = {"application/json"}, consumes = {"application/json"}, method = RequestMethod.POST)
public ResponseEntity<PayeesResponse> getPayeesList(@Valid @RequestBody final PayeesRequest payeeRequest,@PathVariable(value = "customerId", required = true) Integer customerId) {
ApplicationLogger.logInfo("Entering getPayeesList API");
  /* End of API call */
  /* Bank integration to get list of payees */
HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrlForPayees(PropertyConstants.PAYEES_API_END_POINT, payeeRequest))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Payees Response Body Before Transformation :" + response.getBody());
 String payeesResponseString = fundTransferResponseMapper.getManipulatedPayeesResponse(response.getBody());
ApplicationLogger.logInfo("Payees Response Body After Transformation :" + response.getBody());
payeeResponse = objectMapper.readValue(payeesResponseString, PayeesResponse.class);
}
return ResponseEntity.ok(payeeResponse);

Example responses

200 Response

{
    "payees": [
        {
            "payeeId": "string",
            "payeeName": "string",
            "payeeNickName": "string",
            "payeeType": "string",
            "payeeAccountNo": "string",
            "payeeMaskedAccountNo": "string",
            "payeeAccountId": "string",
            "currency": "USD",
            "status": "ACTIVE",
            "payeeBank": "string",
            "ifscCode": "string",
            "payeeBankBranch": "string",
            "payeeBankIFSC": "string",
            "payeeBankSWIFT": "string"
        }
    ],
     "result": {
        "messageCode": "string",
        "message": "string",
        "status": 0
    },
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
customerName string customer's name
mobileNumber string customer's mobile number
emailId string customer's email Id
address string customer's address
payeeId string payee's Id
payeeName string payee's name
payeeBankId string payee's bank Id
payeeAccountNo string payee's account number
payeeBankIFSC string payee's bank ifsc code
accountIds array

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
payeeDetails object array payee details
      currency string payment currency
      payeeAccountId string payee's account id
      payeeAccountNo string payee's account number
      payeeBank string payee's bank
      payeeBankBranch string payee's bank branch
      payeeBankIFSC string payee's bank ifsc code
      payeeBankSWIFT string payee's bank swift
      payeeId string payee's id
payeeMaskedAccountNo string payee's masked account number
      payeeName string payee's name
      payeeNickName string payee's nick name
      payeeType string payee's type
      status string payee's status
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

One Time Transfer Inputs     Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/onetime-transfer/payee/inputs");
/* API call to get inputs for one time transfer  */
@ApiOperation(value = "Returns inputs for one time transfer")
@RequestMapping(value = "/{customerId}/onetime-transfer/payee/inputs", produces = {"application/json"}, method = RequestMethod.POST)
ApplicationLogger.logInfo("Entering getOneTimeTransferInputList API");
/* End of API call */
/*Bank integration to get one time transfer inputs */
HttpResponse<String> apiResponse =Unirest.post(propertyUtil.getAPIUrl(PropertyConstants.ONE_TIME_TRANSFER_API_END_POINT, payeesRequest.getCustomerId(), null)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("One Time Transfer API Response status: " + apiResponse.getStatus() + " and response status text :" + apiResponse.getStatusText());
if (StringUtils.isNotEmpty(apiResponse.getBody())) {
ApplicationLogger.logInfo(" One Time Transfer  Response Body Before Transformation :" + apiResponse.getBody());
String oneTimeTransferResponseString = oneTimeTransferResponseMapper.getManipulatedOneTimeTransferResponse(apiResponse.getBody());
ApplicationLogger.logInfo("One Time Transfer  Response Body After Transformation :" + response);
oneTimeTransferResponse = objectMapper.readValue(oneTimeTransferResponseString, OneTimeTransferResponse.class);
}
return new ResponseEntity<>(oneTimeTransferResponse, HttpStatus.valueOf(response.getStatus()));

Example responses

200 Response

{
  "oneTimeTransferInputs": [
    {
      "displayPayeeType": "string",
      "payeeType": "INTERNAL_DOMESTIC",
      "userIdentityInputs": [
        {
          "errorMessage": "string",
          "message": "string",
          "name": "string",
          "regex": "string",
          "userIdentityInputDisplayTypeEnum": "TEXT",
          "value": "string",
          "values": [
            {
              "name": "string",
              "value": "string"
            }
          ]
        }
      ]
    }
  ],
  "referenceId": "string",
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
oneTimeTransferInputs object array list of one time transfer inputs object
  displayPayeeType string Whether payee is of Same Bank or Other Bank
 payeeType enum Internal payee, external payee, adhoc payee
 userIdentityInputs object array
   errorMessage string Error message if regex validation failed
   message string Message for transaction
   name string Payee's name
   regex string Regex for validation
   userIdentityInputDisplayTypeEnum enum Values to be displayed as text or list
    value string Value
    values object array UserIdentityData values
      name string User Name
      value string Value
referenceId string Reference ID
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

One Time Transfer Validation  Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/onetime-transfer/payee/validation");
/* API call to validate for one time transfer payee details */
@ApiOperation(value = "Returns payee validation for one time transfer")
@RequestMapping(value = "/{customerId}/onetime-transfer/payee/validation", produces = {"application/json"}, method = RequestMethod.POST)
 ApplicationLogger.logInfo("Entering getOneTimeTransferPayeeValidation API");
/* End of API call */
/*Bank integration to validate one time transfer payee inputs */
HttpResponse<String> apiResponse =
Unirest.post(propertyUtil.getAPIUrl(PropertyConstants.ONE_TIME_TRANSFER_PAYEE_VALIDATION_API_END_POINT, payeesValidationRequest.getCustomerId(), null))
.header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("One Time Transfer Payee Validation API Response status: " + apiResponse.getStatus() + " and response status text :" + apiResponse.getStatusText());
if (StringUtils.isNotEmpty(apiResponse.getBody())) {
 ApplicationLogger.logInfo(" One Time Transfer Payee Validation Response Body Before Transformation :" + apiResponse.getBody());
String payeeValidationResponseString = oneTimeTransferResponseMapper.getManipulatedOneTimeTransferPayeeResponse(apiResponse.getBody());
ApplicationLogger.logInfo("One Time Transfer Payee Validation Response Body After Transformation :" + response);
payeeValidationResponse = objectMapper.readValue(payeeValidationResponseString, PayeesValidationResponse.class);
}
return new ResponseEntity<>(payeeValidationResponse, HttpStatus.valueOf(response.getStatus()));

Example responses

200 Response

{
  "referenceId": "string",
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  },
  "transactionStatus": "SUCCESS",
  "validPayee": true
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
referenceId string transaction reference ID
transactionStatus SUCCESS transaction status
validPayee boolean true / false
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

  Bill Payment

To know more about bill payment please refer here

Biller list                                Get

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/billers");
/* API call to get list of registered billers */
@ApiOperation(value = "Returns list of registered billers based on customerId")
@RequestMapping(value = "/{customerId}/billers", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<BillerResponse> getRegisteredBillerListForCustomer(@PathVariable(name = "customerId", required = true) String customerId) {
ApplicationLogger.logInfo("Entering getRegisteredBillers API");
/* End of API call */
/*Bank integration to get list of registered billers */
 HttpResponse<String> response =
 Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.REGISTERED_BILLERS_API_ENDPOINT, customerId,null)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Registered Billers Response Body Before Transformation :" + response.getBody());
String billerResponseString = billpaymentResponseMapper.getManipulatedRegisteredBillerResponse(response.getBody());
ApplicationLogger.logInfo("Registered Billers Response Body After Transformation :" + response.getBody());
billerResponse = objectMapper.readValue(billerResponseString, BillerResponse.class);
}
return new ResponseEntity<>(billerResponse, HttpStatus.valueOf(response.getStatus()));

Example responses

200 Response

{
   "billers": [
    {
      "billerId": "string",
      "billerCategoryId": "string",
      "billerType": "string",
      "partialPayment": "string",
      "billerName":"string",
      "billerCategory":"string",
      "billDate":"string",
      "billDueDate":"string",
      "billNumber":"string",
      "dueAmount":0,
      "lastStatementBalance":0
    }
   ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
billers object array list of billers
      allowPartialPay true allow partial payment
      billerId string biller's id
      billerCategoryId string biller's category Id
      billerType string biller's type
      partialPayment string partial payment is allowed or not
      billerName string biller's name
      billerCategory string biller's category
      billDate string bill date
      billDueDate string bill payment due date
      billNumber string bill number
      dueAmount 0 bill due amount
 lastStatementBalance 0 bill last statement balance
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Biller Details                         Get

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/billers/{billerId}");
/* API call to get biller details */
@ApiOperation(value = "Returns Biller details of biller based on billerId")
@RequestMapping(value = "/{customerId}/billers/{billerId}", produces = {"application/json"}, method = RequestMethod.GET)
public ResponseEntity<BillerResponse> getBillerDetialsofBiller(@PathVariable(name = "customerId", required = true) String customerId,@PathVariable(name = "billerId", required = true) String billerId) {
ApplicationLogger.logInfo("Entering getBillerDetails API");
/* End of API call */
/* Bank integration to get biller details */
 HttpResponse<String> response =
Unirest.get(propertyUtil.getAPIUrl(PropertyConstants.BILLER_DETAILS_API_ENDPOINT, customerId,billerId)).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Biller Details Response Body Before Transformation :" + response.getBody());
String billerDetailsResponseString = billpaymentResponseMapper.getManipulatedBillerDetailsResponse(response.getBody());
ApplicationLogger.logInfo("Biller Details Response Body After Transformation :" + response.getBody());
billerDetailsResponse = objectMapper.readValue(billerDetailsResponseString, BillerResponse.class);
}
return new ResponseEntity<>(billerDetailsResponse, HttpStatus.valueOf(response.getStatus()));

Example responses

200 Response

{
  "billers": [
    {
      "dueAmount": 0,
      "billDate": "string",
      "billDueDate": "string",
      "lastStatementBalance": 0,
      "payWithOutBill" : "string"
    }
  ],
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data Type Description
customerId string customer's Id
billerId string biller's Id

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
billers object array
      dueAmount 0 bill due amount
      billDate string bill date
      billDueDate string bill payment due date
lastStatementBalance 0 bill last statement balance
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None

Confirm Bill Payment           Post

URL obj = new URL("http://one-api.active.ai/banking-integration/v1/{customerId}/bill/payment/confirm");
/* API to get bill payment status */
@ApiOperation(value = "Returns confirmation of bill payment")
  @RequestMapping(value = "/{customerId}/bill/payment/confirm", produces = {"application/json"}, consumes = {"application/json"},
          method = RequestMethod.POST)
  public ResponseEntity<BillPaymentResponse> confirmBillPayment(@PathVariable(value = "customerId", required = true) String customerId,
  @RequetBody final BillPaymentRequest billPaymentRequest) {
    ApplicationLogger.logInfo("Entering getBillPaymentConfirm API");
/* End of API call */
/* Bank integration to get bill payment status */
HttpResponse<String> response =
Unirest.post(propertyUtil.getAPIUrl(PropertyConstants.BILL_PAYMENT_API_ENDPOINT, billPaymentRequest.getCustomerId(), billPaymentRequest.getBillerDetails().getBillerId() )).header("cache-control", "no-cache").asString();
ApplicationLogger.logInfo("API Response status: " + response.getStatus() + " and response status text :" + response.getStatusText());
 if (Objects.nonNull(response) && StringUtils.isNotEmpty(response.getBody())) {
ApplicationLogger.logInfo("Bill Payment Confirm Response Body Before Transformation :" + response.getBody());
 String billPaymentResponseString = billpaymentResponseMapper.getManipulatedBillPaymentResponse(response.getBody());
ApplicationLogger.logInfo("Bill Payment Confirm Response Body After Transformation :" + response.getBody());
billPaymentResponse = objectMapper.readValue(billPaymentResponseString, BillPaymentResponse.class);
}
return new ResponseEntity<>(billPaymentResponse, HttpStatus.valueOf(response.getStatus()));

Example responses

200 Response

{
  "billerName": "string",
  "transactionStatus": "string",
  "pooledPayeeAccNumber": "string",
  "billDeskTransactionId": "string",
  "txnReferenceId": "string",
  "result": {
    "message": "string",
    "messageCode": "string",
    "status": 0
  }
}

Request URL

Request Parameters

Field Data type Description
billers object array list of billers
      allowPartialPay true allow partial payment
      billerId string biller's id
      billerCategoryId string biller's category Id
      billerType string biller's type
      partialPayment string partial payment is allowed or not
      billerName string biller's name
      billerCategory string biller's category
      billDate string bill date
      billDueDate string bill payment due date
      billNumber string bill number
      dueAmount 0 bill due amount
lastStatementBalance 0 bill last statement balance

Success Responses

Status Meaning Description Schema
200 OK OK ResponseObject

Response Parameter

Field Data type Description
      billerName string biller's name
      transactionStatus string bill payment status
pooledPayeeAccNumber string payee's account number
billDeskTransactionId string bill payment desk transaction Id
      txnReferenceId string bill payment transaction reference Id
result object
      message string
      messageCode string
      status 0

Error Responses

Status Meaning Description Schema
400 Bad Request Bad Request None
401 Unauthorized Unauthorized None
404 Not Found Not Found None