third-party-exp-api
home
Third Party Experience API
Base URLS:
Description:
Third Party Mule Experience API communicates with Third Party process API. Mulesoft exposes the REST endpoints for the following operations :
- Get Customer Cash Flows
- Get Customer Rating
- Get Financial Statement
- Loyalty Gain Points
- Loyalty Redeem Points
- Loyalty Submit Cash Back
- Get Court Cases
- Print Customer Court Cases
- Loyalty Get Profile
- Loyalty Get Steps Info
- Loyalty Get Transaction History
- Loyalty Calculate Amount
- CI Confirm Capital Invest Accounts Link Request
- CI Get Capital Invest Accounts
- CI Get Capital Invest Accounts Transactions
- CI Remove Capital Invest Accounts Link
- CI Request Capital Invest Accounts Link
- Submit Customer Data IBAN to SSC
- Western Union - Get State List
- Western Union- Get Delivery Services
- Western Union - Transaction Inquiry
- Western Union - Refund Search
- Western Union - Refund Store
- Western Union - Get DeliveryOptionTemplate
- GMT Print Card
- Capital Invest - Submit Payment
- Capital Invest - Submit Withdrawal
- Capital Invest - Confirm Withdrawal
- GateToPay - Cash Deposit
- GateToPay - Cash Withdrawal
- GateToPay - Reversal
- Aramex- Create Shipment
- CI Portfolio Market Value and Balance
Flow Diagram:
API Led Diagram:
Technical Specifications
Headers
Below are the mandatory/optional headers that are set with every HTTP Request from Mule Exp API.
HeaderName | Sample Value | Optional? |
---|---|---|
client_id | 9712801dbaaffg90d43a0b09c59fdaf21e65524235436 | Mandatory |
client_secret | 234d8AeC33e34bE1b3eiud31b2887cD4 | Optional |
Authorization | Bearer afdca88b-9ed0-344b-8af0-b2195e382574 | Mandatory |
x-user-id | IIBUser | Optional |
x-channel-id | DEVCHL | Mandatory |
x-sub-channel-id | devChannel | Optional |
x-correlation-id | 13243564564 | Mandatory, Unique - use for idempotent filter. |
x-bank-id | CBOJ | Mandatory |
x-debug-flag | 0 | Optional (enum - 0 or 1) |
x-customer-id | 2100122 | Optional (mandatory for customer facing channels) |
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",
"errorCode": "",
"backendErrorMessage": ""
}
}
Below fields should be given back to Channel if x-debug flag = 1
"errorCode": "",
"backendErrorMessage": "",
Api Security
Below polices are applied.
Name | Description | Example |
---|---|---|
Client ID Enforcement | It restricts access to a protected resource | client_id: 9d41a8940c5e4181aace6fc5e6cfffc3 client_secret: aB9D5Bd7450d49F584F23250D96872fD |
Rate limiting | Limits no.of request | 1000 requests per minute |
OAuth | It protects user data by providing access to the data without revealing the user's identity | Bearer afdca88b-9ed0-344b-8af0-b2195e382574 |
OAuth on Mulesoft API:
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.
Mulesoft will expose an API to provide the token for the user who wants to access the APIs.
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.