Loans API icon

Loans API

(0 reviews)
This application handles operations related to Loans

home

Loans Experience API

Base URLs

Description

This document covers the scope of Loan Interface. Loan interface deals with the services :

  1. Get loan details
  2. Get loan schedule details
  3. Get loan Past Dues
  4. Get New Loan Simulation
  5. Create Loan Simulation
  6. Update Loan Simulation
  7. Create Loan Disbursement
  8. Get Existing Liabilities
  9. Get Existing Collateral
  10. Get Schedule Projection
  11. Create Collateral Right
  12. Create Collateral Right Amendment
  13. Get Eligible Loan Products
  14. Get Guarantor Details
  15. Get Active Lending Products
  16. Get Insurance Company Details
  17. Get Global Child Limits
  18. Get Effective Interest Rate
  19. Get Purpose Facility
  20. Get TML List
  21. Lookup Services
  22. Get Car Types
  23. LOS Get Floating Rates
  24. LOS Get Periodic Rates
  25. Get CustomerAcct interest Details
  26. LOS Create PD Loan

High Level Architecture

Flowchart

resources/loansFlowDiagram-51bbc24c-c911-4c33-ade1-b98d329aaf39.PNG

Technical Specifications

Headers

Below are the headers that are set with every HTTP Request

Header NameSample ValueOptional?
client_id9712801dbaaffg90d43a0b09c59fdaf21e65524235436Mandatory
client_secret234d8AeC33e34bE1b3eiud31b2887cD4Optional
AuthorizationBearer afdca88b-9ed0-344b-8af0-b2195e382574Mandatory
x-channel-idDEVCHLMandatory
x-corrleation-id13243564564Mandatory, Unique - use for idempotent filter,Max 50 chars.
x-bank-idCBOJMandatory
x-debug-flag0Optional (enum - 0 or 1)
x-customer-id2100122Optional (mandatory for customer facing channels)
x-user-id1234Optional
x-sub-channel-idomnichannelOptional

Error handling

HTTP Status:

The HTTP error codes are:

  • 400 - Bad Request: An error in the client request (Mostly due to validations)
  • 401 - Unauthorized: User can't be authenticated
  • 403 - Forbidden: The server cannot give access to the resource
  • 404 - Not Found: The resource defined in the URL doesn't exist
  • 405 - Method Not Allowed
  • 406 - Not Acceptable
  • 415 - Unsupported Media Type
  • 500 - Internal Server Error: The server encountered an unexpected condition
  • 501 - Not Implemented

Error Response

A REST API should reply with an error code and a message to be shown to the consumer.

{
    "status": {
        "success": false,
        "code": "400",
        "reasonCode": "BadRequest",
        "arabicMessage": "لم يتم العثور على سجلات تطابق محددات البحث",
        "englishMessage": "No records were found that matched the selection criteria",
        "backendError": "No records were found that matched the selection criteria",
        "backendCode": "T24003790"
    }
}

Api Security

Below polices are applied.

NameDescriptionExample
Client ID EnforcementIt restricts access to a protected resourceclient_id: 9d41a8940c5e4181aace6fc5e6cfffc3 client_secret: aB9D5Bd7450d49F584F23250D96872fD
Rate limitingLimits no.of request1000 requests per minute
OAuthIt protects user data by providing access to the data without revealing the user's identityBearer afdca88b-9ed0-344b-8af0-b2195e382574

OAuth on Mulesoft API (Future scope):

Redhat SSO will be used as Oauth Provider. OAuth 2.0 is implemented on Mulesoft APIs. Redhat is configured as Client provider on Anypoint Platform - Access Management with various scopes and roles configured for different levels of access on the APIs. Authorization Token URL will be provided by Redhat which must be used to generate Token for accessing the APIs. Token validity is . Mulesoft API will be provided for channels to get the token.

resources/image6-db361d50-9ede-4179-baa7-f564a310d593.jpg

Mulesoft will expose an API to provide the token for the user who wants to access the APIs.

It is optional for the channels.

Once a token is received from Mulesoft API, it must be sent as “Authorization Bearer ” to access the APIs exposed. Mulesoft API Gateway (API Manager) can validate the access token with Redhat and if valid, then the request is processed and the response would be sent back. If the token is not valid, then the error response of “Token has been revoked” will be sent back.

resources/image3-c4224000-ed80-40ea-bc1e-5319262e7e16.jpg


Reviews