Once the code is integrated with your core system and hosted, the same needs to be configured as shown below.
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 .
Login
Customer Profile
Accounts
Cards
Account Transactions
Card Transtions
Fund Transfer
Bill Payment
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.
To know more about customer profile please refer here
URLobj=newURL("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)publicResponseEntity<CustomerProfileResponse>getCustomerProfile(@PathVariable("customerId")StringcustomerId){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());StringcustomerProfileResponseString=customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :"+response.getBody());customerProfileResponse=objectMapper.readValue(customerProfileResponseString,CustomerProfileResponse.class);}returnResponseEntity.ok(customerProfileResponse);
URLobj=newURL("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)publicResponseEntity<CustomerProfileResponse>updateCustomerProfileEmail(@PathVariable("customerId")StringcustomerId,@RequestBodyfinalCustomerProfileRequestcustomerProfileRequest){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());StringcustomerProfileResponseString=customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :"+response.getBody());customerProfileResponse=objectMapper.readValue(customerProfileResponseString,CustomerProfileResponse.class);}returnResponseEntity.ok(customerProfileResponse);
URLobj=newURL("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)publicResponseEntity<CustomerProfileResponse>updateCustomerProfilePhone(@PathVariable("customerId")StringcustomerId,@RequestBodyfinalCustomerProfileRequestcustomerProfileRequest){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());StringcustomerProfileResponseString=customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :"+response.getBody());customerProfileResponse=objectMapper.readValue(customerProfileResponseString,CustomerProfileResponse.class);}returnResponseEntity.ok(customerProfileResponse);
URLobj=newURL("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)publicResponseEntity<CustomerProfileResponse>updateCustomerProfileAddress(@PathVariable("customerId")StringcustomerId,@RequestBodyfinalCustomerProfileRequestcustomerProfileRequest){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());StringcustomerProfileResponseString=customerProfileResponseMapper.getManipulatedCustomerProfileResponse(response.getBody());ApplicationLogger.logInfo("Customer Profile Response Body After Transformation :"+response.getBody());customerProfileResponse=objectMapper.readValue(customerProfileResponseString,CustomerProfileResponse.class);}returnResponseEntity.ok(customerProfileResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<AccountsResponse>getCasaAccounts(@PathVariable(name="customerId",required=true)StringcustomerId){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());StringaccountsResponseString=accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());ApplicationLogger.logInfo("Casa Response Body After Transformation :"+response.getBody());accountsResponse=objectMapper.readValue(accountsResponseString,AccountsResponse.class);}returnResponseEntity.ok(accountsResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<AccountDetailResponse>getCasaAccountDetail(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="accountId",required=true)StringaccountId){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());StringaccountDetailResponseString=accountsResponseMapper.getManipulatedAccountDetailsResponse(response.getBody());ApplicationLogger.logInfo("Casa Account Details Response Body After Transformation :"+response.getBody());accountDetailsResponse=objectMapper.readValue(accountDetailResponseString,AccountDetailResponse.class);}returnResponseEntity.ok(accountDetailsResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<AccountBalanceResponse>getCasaAccountBalance(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="accountId",required=true)StringaccountId){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());StringaccountDetailResponseString=accountsResponseMapper.getManipulatedAccountsBalanceResponse(response.getBody());ApplicationLogger.logInfo("Casa Account Balance Response Body After Transformation :"+response.getBody());accountBalanceResponse=objectMapper.readValue(accountDetailResponseString,AccountBalanceResponse.class);}returnResponseEntity.ok(accountBalanceResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<AccountTransactionsResponse>getCasaAccountTransactions(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="accountId",required=true)StringaccountId){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());StringaccountTransactionsResponseString=accountsResponseMapper.getManipulatedAccountTransactionsResponse(response.getBody());ApplicationLogger.logInfo("Account Transactions Response Body After Transformation :"+response.getBody());accountTransactionsResponse=objectMapper.readValue(accountTransactionsResponseString,AccountTransactionsResponse.class);}returnResponseEntity.ok(accountTransactionsResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<ChequeBookOrderConfirmResponse>confirmChequeBookOrder(@PathVariable(value="customerId",required=true)StringcustomerId,@RequestBodyfinalChequeBookOrderConfirmRequestchequeBookConfirmRequest){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());StringchequeBookOrderConfirmResponseString=accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());ApplicationLogger.logInfo("Credit Card Limit Confirm Response Body After Transformation :"+response.getBody());chequeBookOrderConfirmResponse=objectMapper.readValue(chequeBookOrderConfirmResponseString,ChequeBookOrderConfirmResponse.class);}returnnewResponseEntity<>(chequeBookOrderConfirmResponse,HttpStatus.valueOf(response.getStatus()));
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<CardsResponse>getCreditCards(@PathVariable(value="customerId",required=true)StringcustomerId){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());StringcardsResponseString=cardsResponseMapper.getManipulatedCardsResponse(response.getBody());ApplicationLogger.logInfo("Credit Cards Response Body After Transformation :"+response.getBody());cardsResponse=objectMapper.readValue(cardsResponseString,CardsResponse.class);}returnnewResponseEntity<>(cardsResponse,HttpStatus.valueOf(response.getStatus()));/*End of Bank API Integration*/
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<CardsResponse>getDebitCards(@PathVariable(value="customerId",required=true)StringcustomerId){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());StringcardsResponseString=cardsResponseMapper.getManipulatedCardsResponse(response.getBody());ApplicationLogger.logInfo("Debit Cards Response Body After Transformation :"+response.getBody());cardsResponse=objectMapper.readValue(cardsResponseString,CardsResponse.class);}returnnewResponseEntity<>(cardsResponse,HttpStatus.valueOf(response.getStatus()));/*End of Bank API Integration*/
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<CardDetailResponse>getCreditCardDetails(@PathVariable(value="customerId",required=true)StringcustomerId,@PathVariable(value="cardNumber",required=true)StringcardNumber){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());StringcardDetailsResponseString=cardsResponseMapper.getManipulatedCardDetailsResponse(response.getBody());ApplicationLogger.logInfo("Credit Card Details Response Body After Transformation :"+response.getBody());cardDetailResponse=objectMapper.readValue(cardDetailsResponseString,CardDetailResponse.class);}returnResponseEntity.ok(cardDetailResponse);/*End on Bank API Integration*/
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<CardDetailResponse>getDebitCardDetails(@PathVariable(value="customerId",required=true)StringcustomerId,@PathVariable(value="cardNumber",required=true)StringcardNumber){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());StringcardDetailsResponseString=cardsResponseMapper.getManipulatedCardDetailsResponse(response.getBody());ApplicationLogger.logInfo("Debit Card Details Response Body After Transformation :"+response.getBody());cardDetailResponse=objectMapper.readValue(cardDetailsResponseString,CardDetailResponse.class);}returnResponseEntity.ok(cardDetailResponse);/*End of Bank API Integration*/
URLobj=newURL("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)publicResponseEntity<BlockCardResponse>blockCard(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber,@RequestBodyfinalBlockCardRequestblockCardRequest){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());StringblockCardResponseString=blockCardResponseMapper.getManipulatedBlockCardResponse(response.getBody());ApplicationLogger.logInfo("Block Card Response Body After Transformation :"+response.getBody());blockCardResponse=objectMapper.readValue(blockCardResponseString,BlockCardResponse.class);}returnResponseEntity.ok(blockCardResponse);/*End of API Integration*/
To know more about card activation please refer here
URLobj=newURL("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)publicResponseEntity<ActivationCardResponse>activationCard(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber,@RequestBodyfinalActivationCardRequestactivationCardRequest){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());StringactivationCardResponseString=activationCardResponseMapper.getManipulatedActivationCardResponse(response.getBody());ApplicationLogger.logInfo("Activation Card Response Body After Transformation :"+response.getBody());activationCardResponse=objectMapper.readValue(activationCardResponseString,ActivationCardResponse.class);}returnResponseEntity.ok(activationCardResponse);/*End of API Integration*/
To know more about credit card limits please refer here
URLobj=newURL("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)publicResponseEntity<CreditCardLimitResponse>getCreditCardLimits(@PathVariable(value="customerId",required=true)StringcustomerId,@PathVariable(value="cardNumber",required=true)StringcardNumber){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());StringcreditCardLimitResponseString=creditCardResponseMapper.getManipulatedCreditCardLimitResponse(response.getBody());ApplicationLogger.logInfo("Credit Card Limit Response Body After Transformation :"+response.getBody());creditCardLimitResponse=objectMapper.readValue(creditCardLimitResponseString,CreditCardLimitResponse.class);}returnResponseEntity.ok(creditCardLimitResponse);/*End of Bank API Integration*/
To know more about debit card limits please refer here
URLobj=newURL("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)publicResponseEntity<DebitCardLimitResponse>getDebitCardLimits(@PathVariable(value="customerId",required=true)StringcustomerId,@PathVariable(value="cardNumber",required=true)StringcardNumber){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());StringdebitCardLimitResponseString=debitCardResponseMapper.getManipulatedDebitCardLimitResponse(response.getBody());ApplicationLogger.logInfo("Debit Card Limit Response Body After Transformation :"+response.getBody());debitCardLimitResponse=objectMapper.readValue(debitCardLimitResponseString,DebitCardLimitResponse.class);}returnResponseEntity.ok(debitCardLimitResponse);/*End of Bank API Integration*/
To know more about credit card limit update please refer here
URLobj=newURL("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)publicResponseEntity<CreditCardLimitConfirmResponse>confirmCreditCardLimit(@PathVariable(value="customerId",required=true)StringcustomerId,@RequestBodyfinalCreditCardLimitConfirmRequestcreditCardLimitConfirmRequest){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());StringcreditCardLimitConfirmResponseString=creditCardResponseMapper.getManipulatedCreditCardLimitConfirmResponse(response.getBody());ApplicationLogger.logInfo("Credit Card Limit Confirm Response Body After Transformation :"+response.getBody());creditCardLimitConfirmResponse=objectMapper.readValue(creditCardLimitConfirmResponseString,CreditCardLimitConfirmResponse.class);}returnnewResponseEntity<>(creditCardLimitConfirmResponse,HttpStatus.valueOf(response.getStatus()));/*End of Bank API Integration*/
To know more about debit card limit update please refer here
URLobj=newURL("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)publicResponseEntity<DebitCardLimitConfirmResponse>confirmDebitCardLimit(@PathVariable(value="customerId",required=true)StringcustomerId,@PathVariable(value="cardNumber",required=true)StringcardNumber,@RequestBodyfinalDebitCardLimitConfirmRequestdebitCardLimitConfirmRequest){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());StringdebitCardLimitConfirmResponseString=debitCardResponseMapper.getManipulatedDebitCardLimitConfirmResponse(response.getBody());ApplicationLogger.logInfo("Debit Card Limit Confirm Response Body After Transformation :"+response.getBody());debitCardLimitConfirmResponse=objectMapper.readValue(debitCardLimitConfirmResponseString,DebitCardLimitConfirmResponse.class);}returnnewResponseEntity<>(debitCardLimitConfirmResponse,HttpStatus.valueOf(response.getStatus()));/*End of Bank API Integration*/
To know more about international usage please refer here
isEnabled Post
URLobj=newURL("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)publicResponseEntity<InternationalUsageResponse>updateInternationalUsage(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber,@RequestBodyfinalInternationalCardUsageRequestinternationalCardUsageRequest){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());StringdepositPlanResponseString=cardsResponseMapper.getManipulatedInternationalUsageResponse(response.getBody());ApplicationLogger.logInfo("International Usage Response Body After Transformation :"+response.getBody());internationalUsageResponse=objectMapper.readValue(depositPlanResponseString,InternationalUsageResponse.class);}returnResponseEntity.ok(internationalUsageResponse);/*End of Bank API Integration*/
URLobj=newURL("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)publicResponseEntity<InternationalUsageResponse>updateInternationalUsageFinalApiCall(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber,@RequestBodyfinalInternationalCardUsageRequestinternationalCardUsageRequest){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());StringdepositPlanResponseString=cardsResponseMapper.getManipulatedInternationalUsageResponse(response.getBody());ApplicationLogger.logInfo("International Usage Response Body After Transformation :"+response.getBody());internationalUsageResponse=objectMapper.readValue(depositPlanResponseString,InternationalUsageResponse.class);}returnResponseEntity.ok(internationalUsageResponse);/*End of Bank API Integration*/
To know more about international usage please refer here
URLobj=newURL("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)publicResponseEntity<ReplaceCardConfirmResponse>replaceCard(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber,@RequestBodyfinalReplaceCardConfirmRequestreplaceCardConfirmRequest){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());StringreplaceCardConfirmResponseString=cardsResponseMapper.getManipulatedReplaceCardConfirmResponse(response.getBody());ApplicationLogger.logInfo("CardNumber :"+response.getBody());replaceCardConfirmResponse=objectMapper.readValue(replaceCardConfirmResponseString,ReplaceCardConfirmResponse.class);}returnnewResponseEntity<>(replaceCardConfirmResponse,HttpStatus.valueOf(response.getStatus()));/*End of API Integration*/
To know more about international usage please refer here
URLobj=newURL("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)publicResponseEntity<ResetPinConfirmResponse>resetPin(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber,@RequestBodyfinalResetPinConfirmRequestresetPinConfirmRequest){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());StringresetPinConfirmResponseString=cardsResponseMapper.getManipulatedResetPinConfirmResponse(response.getBody());ApplicationLogger.logInfo("Reset Pin Confirm Response Body After Transformation :"+response.getBody());resetPinConfirmResponse=objectMapper.readValue(resetPinConfirmResponseString,ResetPinConfirmResponse.class);}returnnewResponseEntity<>(resetPinConfirmResponse,HttpStatus.valueOf(response.getStatus()));/*End of API Integration*/
This will be part of balance inquiry, to know more please refer here
Credit Card Transaction Get
URLobj=newURL("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)publicResponseEntity<CardTransactionsResponse>getCreditCardTransactions(@PathVariable(value="customerId",required=true)StringcustomerId,@PathVariable(value="cardNumber",required=true)StringcardNumber){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());StringaccountTransactionsResponseString=cardsResponseMapper.getManipulatedCardTransactionsResponse(response.getBody());ApplicationLogger.logInfo("Credit Card Transactions Response Body After Transformation :"+response.getBody());cardTransactionsResponse=objectMapper.readValue(accountTransactionsResponseString,CardTransactionsResponse.class);}returnResponseEntity.ok(cardTransactionsResponse);/*End of Bank API Integration*/
URLobj=newURL("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)publicResponseEntity<CardTransactionsResponse>getDebitCardTransactions(@PathVariable(value="customerId",required=true)StringcustomerId,@PathVariable(value="cardNumber",required=true)StringcardNumber){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());StringaccountTransactionsResponseString=cardsResponseMapper.getManipulatedCardTransactionsResponse(response.getBody());ApplicationLogger.logInfo("Credit Card Transactions Response Body After Transformation :"+response.getBody());cardTransactionsResponse=objectMapper.readValue(accountTransactionsResponseString,CardTransactionsResponse.class);}returnResponseEntity.ok(cardTransactionsResponse);/*End of Bank API Integration*/
To know more about convert to installments please refer here
URLobj=newURL("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)publicResponseEntity<ConvertEMIResponse>convertEMI(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber){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());StringconvertEMIResponseString=cardsResponseMapper.getManipulatedConvertEMICreditCardConfirmResponse(response.getBody());ApplicationLogger.logInfo("Convert EMI Response Body After Transformation :"+response.getBody());convertEMIResponse=objectMapper.readValue(convertEMIResponseString,ConvertEMIResponse.class);}returnnewResponseEntity<>(convertEMIResponse,HttpStatus.valueOf(response.getStatus()));/*End of Bank API Integration*/
To know more about installment update please refer here
URLobj=newURL("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)publicResponseEntity<ConvertEMICreditCardConfirmResponse>convertEMICreditCard(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="cardNumber",required=true)StringcardNumber,@RequestBodyfinalConvertEMICreditCardConfirmRequestconvertEMICreditCardConfirmRequest){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());StringconvertEMICreditCardConfirmResponseString=cardsResponseMapper.getManipulatedConvertEMICreditCardConfirmResponse(response.getBody());ApplicationLogger.logInfo("Convert EMI Confirm Response Body After Transformation :"+response.getBody());convertEMICreditCardConfirmResponse=objectMapper.readValue(convertEMICreditCardConfirmResponseString,ConvertEMICreditCardConfirmResponse.class);}returnnewResponseEntity<>(convertEMICreditCardConfirmResponse,HttpStatus.valueOf(response.getStatus()));/*End of Bank API Integration*/
This will be part of balance inquiry, to know more please refer here
Get list of loan accounts Get
URLobj=newURL("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)publicResponseEntity<LoanAccountsResponse>getLoanAccounts(@PathVariable(name="customerId",required=true)StringcustomerId){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());StringaccountsResponseString=accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());ApplicationLogger.logInfo(" Loan Response Body After Transformation :"+response.getBody());loanAccountsResponse=objectMapper.readValue(accountsResponseString,LoanAccountsResponse.class);}returnResponseEntity.ok(loanAccountsResponse);
URLobj=newURL("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)publicResponseEntity<LoanAccountDetailResponse>getLoanAccountDetail(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="accountId",required=true)StringaccountId){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());StringaccountDetailResponseString=accountsResponseMapper.getManipulatedAccountDetailsResponse(response.getBody());ApplicationLogger.logInfo("Loan Account Details Response Body After Transformation :"+response.getBody());loanAccountDetailResponse=objectMapper.readValue(accountDetailResponseString,LoanAccountDetailResponse.class);}returnResponseEntity.ok(loanAccountDetailResponse);
URLobj=newURL("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)publicResponseEntity<LoanAccountBalanceResponse>getLoanAccountBalance(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="accountId",required=true)StringaccountId){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());StringaccountDetailResponseString=accountsResponseMapper.getManipulatedAccountsBalanceResponse(response.getBody());ApplicationLogger.logInfo("Loan Account Balance Response Body After Transformation :"+response.getBody());loanAccountBalanceResponse=objectMapper.readValue(accountDetailResponseString,LoanAccountBalanceResponse.class);}returnResponseEntity.ok(loanAccountBalanceResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<DepositAccountsResponse>getDepositAccounts(@PathVariable(name="customerId",required=true)StringcustomerId){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());StringaccountsResponseString=accountsResponseMapper.getManipulatedAccountsResponse(response.getBody());ApplicationLogger.logInfo(" Deposit Response Body After Transformation :"+response.getBody());depositAccountsResponse=objectMapper.readValue(accountsResponseString,DepositAccountsResponse.class);}returnResponseEntity.ok(depositAccountsResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<DepositAccountDetailResponse>getDepositAccountDetail(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="accountId",required=true)StringaccountId){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());StringaccountDetailResponseString=accountsResponseMapper.getManipulatedAccountDetailsResponse(response.getBody());ApplicationLogger.logInfo("Deposit Account Details Response Body After Transformation :"+response.getBody());depositAccountDetailResponse=objectMapper.readValue(accountDetailResponseString,DepositAccountDetailResponse.class);}returnResponseEntity.ok(depositAccountDetailResponse);
This will be part of balance inquiry, to know more please refer here
URLobj=newURL("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)publicResponseEntity<DepositAccountBalanceResponse>getDepositAccountBalance(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="accountId",required=true)StringaccountId){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());StringaccountDetailResponseString=accountsResponseMapper.getManipulatedAccountsBalanceResponse(response.getBody());ApplicationLogger.logInfo("Deposit Account Balance Response Body After Transformation :"+response.getBody());depositAccountBalanceResponse=objectMapper.readValue(accountDetailResponseString,DepositAccountBalanceResponse.class);}returnResponseEntity.ok(depositAccountBalanceResponse);
To know more about open certificate of deposit please refer here
Deposit Plans Post
URLobj=newURL("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)publicResponseEntity<DepositServiceResponse>getDepositPlans(@PathVariable(name="customerId",required=true)StringcustomerId,@RequestBodyfinalDepositServiceRequestdepositServiceRequest){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());StringdepositPlanResponseString=depositPlanResponseMapper.getManipulatedDepositPlanResponse(response.getBody());ApplicationLogger.logInfo("Deposit Plan Response Body After Transformation :"+response.getBody());depositServiceResponse=objectMapper.readValue(depositPlanResponseString,DepositServiceResponse.class);}returnResponseEntity.ok(depositServiceResponse);
URLobj=newURL("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)publicResponseEntity<DepositServiceResponse>getDepositPlanNominees(@PathVariable(name="customerId",required=true)StringcustomerId,@RequestBodyfinalDepositServiceRequestdepositServiceRequest){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());StringnomineesResponseString=depositPlanResponseMapper.getManipulatedNomineeResponse(response.getBody());ApplicationLogger.logInfo("Nominee Response Body After Transformation :"+response.getBody());depositServiceResponse=objectMapper.readValue(nomineesResponseString,DepositServiceResponse.class);}returnResponseEntity.ok(depositServiceResponse);
URLobj=newURL("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)publicResponseEntity<DepositServiceResponse>getDepositPlanFinalResponse(@PathVariable(name="customerId",required=true)StringcustomerId,@RequestBodyfinalDepositServiceRequestdepositServiceRequest){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());StringdepositPlanFinalAPiCallResponseString=depositPlanResponseMapper.getManipulatedDepositPlanFinalApiCallResponse(response.getBody());ApplicationLogger.logInfo("Deposit Plan Final API Response Body After Transformation :"+response.getBody());depositServiceResponse=objectMapper.readValue(depositPlanFinalAPiCallResponseString,DepositServiceResponse.class);}returnResponseEntity.ok(depositServiceResponse);
To know more about close certificate of deposit please refer here
Confirm Deposit Post
URLobj=newURL("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)publicResponseEntity<DepositServiceResponse>getDepositPlanFinalResponse(@PathVariable(name="customerId",required=true)StringcustomerId,@RequestBodyfinalDepositServiceRequestdepositServiceRequest){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());StringdepositPlanFinalAPiCallResponseString=depositPlanResponseMapper.getManipulatedDepositPlanFinalApiCallResponse(response.getBody());ApplicationLogger.logInfo("Deposit Plan Final API Response Body After Transformation :"+response.getBody());depositServiceResponse=objectMapper.readValue(depositPlanFinalAPiCallResponseString,DepositServiceResponse.class);}returnResponseEntity.ok(depositServiceResponse);
URLobj=newURL("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)publicResponseEntity<FundTransferResponse>confirmTransfer(@PathVariable(value="customerId",required=true)IntegercustomerId,@RequestBodyfinalFundTransferRequestfundTransferRequest){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());StringConfirmTransferResponseString=fundTransferResponseMapper.getManipulatedFundTransferResponse(response.getBody());ApplicationLogger.logInfo("Confirm Transfer Response Body After Transformation :"+response.getBody());fundTransferResponse=objectMapper.readValue(ConfirmTransferResponseString,FundTransferResponse.class);}returnResponseEntity.ok(fundTransferResponse);
URLobj=newURL("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)publicResponseEntity<PayeesResponse>getPayeesList(@Valid@RequestBodyfinalPayeesRequestpayeeRequest,@PathVariable(value="customerId",required=true)IntegercustomerId){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());StringpayeesResponseString=fundTransferResponseMapper.getManipulatedPayeesResponse(response.getBody());ApplicationLogger.logInfo("Payees Response Body After Transformation :"+response.getBody());payeeResponse=objectMapper.readValue(payeesResponseString,PayeesResponse.class);}returnResponseEntity.ok(payeeResponse);
URLobj=newURL("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());StringoneTimeTransferResponseString=oneTimeTransferResponseMapper.getManipulatedOneTimeTransferResponse(apiResponse.getBody());ApplicationLogger.logInfo("One Time Transfer Response Body After Transformation :"+response);oneTimeTransferResponse=objectMapper.readValue(oneTimeTransferResponseString,OneTimeTransferResponse.class);}returnnewResponseEntity<>(oneTimeTransferResponse,HttpStatus.valueOf(response.getStatus()));
URLobj=newURL("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());StringpayeeValidationResponseString=oneTimeTransferResponseMapper.getManipulatedOneTimeTransferPayeeResponse(apiResponse.getBody());ApplicationLogger.logInfo("One Time Transfer Payee Validation Response Body After Transformation :"+response);payeeValidationResponse=objectMapper.readValue(payeeValidationResponseString,PayeesValidationResponse.class);}returnnewResponseEntity<>(payeeValidationResponse,HttpStatus.valueOf(response.getStatus()));
URLobj=newURL("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)publicResponseEntity<BillerResponse>getRegisteredBillerListForCustomer(@PathVariable(name="customerId",required=true)StringcustomerId){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());StringbillerResponseString=billpaymentResponseMapper.getManipulatedRegisteredBillerResponse(response.getBody());ApplicationLogger.logInfo("Registered Billers Response Body After Transformation :"+response.getBody());billerResponse=objectMapper.readValue(billerResponseString,BillerResponse.class);}returnnewResponseEntity<>(billerResponse,HttpStatus.valueOf(response.getStatus()));
URLobj=newURL("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)publicResponseEntity<BillerResponse>getBillerDetialsofBiller(@PathVariable(name="customerId",required=true)StringcustomerId,@PathVariable(name="billerId",required=true)StringbillerId){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());StringbillerDetailsResponseString=billpaymentResponseMapper.getManipulatedBillerDetailsResponse(response.getBody());ApplicationLogger.logInfo("Biller Details Response Body After Transformation :"+response.getBody());billerDetailsResponse=objectMapper.readValue(billerDetailsResponseString,BillerResponse.class);}returnnewResponseEntity<>(billerDetailsResponse,HttpStatus.valueOf(response.getStatus()));
URLobj=newURL("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)publicResponseEntity<BillPaymentResponse>confirmBillPayment(@PathVariable(value="customerId",required=true)StringcustomerId,@RequetBodyfinalBillPaymentRequestbillPaymentRequest){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());StringbillPaymentResponseString=billpaymentResponseMapper.getManipulatedBillPaymentResponse(response.getBody());ApplicationLogger.logInfo("Bill Payment Confirm Response Body After Transformation :"+response.getBody());billPaymentResponse=objectMapper.readValue(billPaymentResponseString,BillPaymentResponse.class);}returnnewResponseEntity<>(billPaymentResponse,HttpStatus.valueOf(response.getStatus()));