...
An access token is a key to the gateway to access any other API. The API will return the access token if the user is successfully authenticated and have the authorization to access these services. Every access token is tagged with validity and the expiry duration is echoed in the response for the calling application to manage the state accordingly. Token if used after its validity period restrict access to any services and a new token to be generated in this case.
API | https://{{baseUrl}}/auth/realms/cdp/protocol/openid-connect/token |
Method | POST |
Headers | Content-Type : application/x-www-form-urlencoded |
Access Token Payload | Code Block |
---|
| --data-urlencode 'grant_type=password' \
--data-urlencode 'scope=api://3a3f52a1-1b64-4c27-81f0-50a6ca01324d/customer' \
--data-urlencode 'client_id=<<client_id>>' \
--data-urlencode 'client_secret=<<secret>>' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=<<username>>' \
--data-urlencode 'password=<<password>>'
|
|
Refresh Token Payload | Code Block |
---|
--data-urlencode 'grant_type=password' \
--data-urlencode 'client_id=<<client_id>>' \
--data-urlencode 'client_secret=<<secret>>' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'refresh_token=<<refreshToken>>' \ |
|
Response | Code Block |
---|
| {
"token_type": "bearer",
"access_token": "<<access_token_value>>",
"expires_in": 7199,
"refresh_expires_in": 7199,
"refresh_token": "<<refresh_token_value>>",
"scope": "----",
"not-before-policy": 0,
"session_state": "<<session_state>>"
} |
|
...
API to be used to look up customer information by ID type and ID number.
API | https://{{baseUrl}}/caas/api/v2/customer/validate |
Authorization | Bearer Token |
Method | POST |
Headers | Content-Type:application/json |
Payload | Code Block |
---|
| {
"idNumber": "784199554586091",
"idType": "4"
} |
|
Success Response | Code Block |
---|
| {
"status": "success",
"statusCode": 200,
"message": "Successfully Processed",
"data": {
"ecrn": "1058021235161541",
"first_name": "IRFAN MANAKKAT THEKKE",
"middle_name": "PURAYIL ISMAIL",
"last_name": "NANGARATH MUNDACHI",
"agent_location_id": "784101",
"primary_mobile_number": "+971502106707",
"email_id": "irfanmtp1@gmail.com",
"customer_status": "ACTIVE",
"aml_scan_status": "Accepted",
"id_status": "Active",
"id_date_of_expiry": "2023-08-08T00:00:00.000+00:00"
}
} |
|
Customer Not Found | Code Block |
---|
| {
"status": "failure",
"statusCode": 404,
"errorCode": 45001,
"message": "Customer not found"
} |
|
Subscription Pending Response | Code Block |
---|
| {
"status": "failure",
"statusCode": 404,
"errorCode": 45003,
"message": "Customer not Subscribed"
} |
|
Bad Request | Code Block |
---|
| {
"status": "failure",
"statusCode": 400,
"errorCode": 45005,
"message": "Invalid Lookup request"
} |
|
Internal Server Error | Code Block |
---|
| {
"status": "failure",
"statusCode": 404,
"errorCode": 45006,
"message": "Error while searching customer!"
} |
|
...
Name | Data Type | Max Length | Description |
---|
status | String | 255 | status description |
statusCode | Integer | - | Status code |
errorCode | Integer | - | Error code if any error encountered. |
message | String | 255 | Message |
data | Object | - | Data object |
ecrn | String | 16 | Customer unique identification number |
first_name | String | 255 | Customer first name |
middle_name | String | 255 | Customer middle name |
last_name | String | 255 | Customer last name |
agent_location_id | String | 20 | Onboarded Agent |
primary_mobile_number | String | 20 | Customer mobile no |
email_id | String | 30 | Customer email |
customer_status | String | 20 | Customer Status / Status |
---|
colour | Yellow |
---|
title | KYC PENDING |
---|
| / Status |
---|
colour | Yellow |
---|
title | INACTIVE |
---|
| / / |
aml_scan_status | String | 20 | AML Scanned Status “Accepted” / “Rejected“ / “Under Investigation”/ “Failed” / “N/A” (not available when screening not done) |
id_status | String | 20 | Possible values : "Active", "Expired",”Inactive” |
id_date_of_expiry | String | 50 | YYYY-MM-DD format |
...