Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

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
languagejson
--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
languagejson
{
    "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
languagejson
{
    "idNumber": "784199554586091",
    "idType": "4"
}

Success Response

HttpStatusCode : 200

Code Block
languagejson
{
    "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

HttpStatusCode : 200

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 404,
    "errorCode": 45001,
    "message": "Customer not found"
}

Subscription Pending Response

HttpStatusCode : 200

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 404,
    "errorCode": 45003,
    "message": "Customer not Subscribed"
}

Bad Request

HttpStatusCode : 200

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 400,
    "errorCode": 45005,
    "message": "Invalid Lookup request"
}

Internal Server Error

HttpStatusCode : 200

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 404,
    "errorCode": 45006,
    "message": "Error while searching customer!"
}

Authentication Failure Response

HttpStatusCode : 401

Code Block
languagejson
{
    "timestamp": "2023-12-22T06:04:30.477+00:00",
    "status": 401,
    "error": "Unauthorized",
    "path": "/api/v2/customer/validate"
}

...

API

https://{{baseUrl}}/caas-lcm/api/v1/CAAS/onBoarding/customer

Authorization

Bearer Token

Method

POST

Headers

Content-Type:application/json

Payload

Code Block
languagejson
{
    "channel": "WEB",
    "first_name": "IRFAN MANAKKAT THEKKE",
    "salutation": "Mr",
    "middle_name": "PURAYIL ISMAIL",
    "last_name": "NANGARATH MUNDACHI",
    "preferred_name": "IRFAN MANAKKAT THEKKE",
    "nationality": "IN",
    "second_nationality": "GB",
    "native_region": 1,
    "date_of_birth": "1995-07-28",
    "country_of_birth": "IN",
    "place_of_birth": "INDIA",
    "resident_type_id": 101,
    "country_of_residence": "AE",
    "gender": "Male",
    "mothers_maiden_name": "SAFIYA",
    "primary_mobile_number": "+971502106707",
    "secondary_mobile_number": "+971502412378",
    "email_id": "irfanmtp1@gmail.com",
    "phone_number": "+971502106707",
    "occupation_id": 2856,
    "political_exposed_person": false,
    "updated_by": "784irfan",
    "additional_docs": [
        {
            "base64_data": "<<base64Data>>",
            "content_type": "image/jpeg",
            "document_id": "1"
        },
        {
            "base64_data": "<<base64Data>>",
            "content_type": "image/jpeg",
            "document_id": "2"
        }
    ],
    "address_list": [
        {
            "address_type_id": "1",
            "building_name": "MANKHOOL BUILDING",
            "street_name": "Electra Street",
            "landmark": "HOT Bread",
            "city": "Electra Street",
            "district": "Abu Dhabi",
            "state": "Abu Dhabi",
            "country": "AE",
            "zip": 0,
            "mobile_number": "+971502106707"
        },
        {
            "address_type_id": "2",
            "building_name": "ABC House",
            "street_name": "Kaikottukadavu",
            "landmark": "ABC School",
            "city": "Thrikkaripur",
            "district": "Kasaragod",
            "state": "kerala",
            "country": "IN",
            "zip": 13345,
            "mobile_number": "+971502106707"
        }
    ],
    "id_details": [
        {
            "id_type": 4,
            "id_number": "784199554586091",
            "name_as_per_id": "Irfan Manakkat Thekke Purayil",
            "issued_country": "AE",
            "issued_by": "EIDA",
            "issued_at": "AE Govt.",
            "issued_on": "2020-08-08",
            "date_of_expiry": "2023-08-08",
            "default_status": true,
            "active_status": true,
            "id_front": {
                "base64_data": "<<base64Data>>",
                "content_type": "image/jpeg"
            },
            "id_back": {
                "base64_data": "<<base64Data>>",
                "content_type": "image/jpeg"
            }
        },
        {
            "id_type": 2,
            "id_number": "P4006315",
            "visa_number": "VISA123",
            "visa_expiry_date": "2024-06-30",
            "name_as_per_id": "IRFAN M T P",
            "issued_country": "IN",
            "issued_by": "India Govt.",
            "issued_at": "Kozhikkode",
            "issued_on": "2016-04-28",
            "date_of_expiry": "2026-04-27",
            "default_status": true,
            "active_status": true,
            "id_front": {
                "base64_data": "<<base64Data>>",
                "content_type": "image/jpeg"
            },
            "id_back": {
                "base64_data": "<<base64Data>>",
                "content_type": "image/jpeg"
            }
        }
    ],
    "customer_classification": {
        "customer_type_id": 2,
        "annual_income_range_id": 15,
        "annual_income_currency_code": "AED",
        "social_security_number": "SSN123",
        "tax_registration_number": 123,
        "txn_issued_country": "AE",
        "employer_name": "EMKE",
        "employer_address": "UAE",
        "employer_phone": "+971502106101",
        "employer_ecrn": "",
        "employer_establishment_id": "LULUEXCHANGE123",
        "risk_rating_id": 3,
        "pep_category": 1,
        "personal_mohre_id": "IRFAN786",
        "income_type": 1,
        "profession_category": "PC1",
        "reason_for_acc": "Remittance",
        "txn_vol_month": 1,
        "txn_count_month": 1,
        "show_remarks_on_txn": false,
        "customer_remarks": "Test Remarks",
        "agent_ref_no": "786000786",
        "social_links": [
            {
                "social_links_id": 2,
                "text_field": "insta.com"
            },
            {
                "social_links_id": 1,
                "text_field": "fb.com"
            }
        ],
        "first_language": "en",
        "marital_status": 2,
        "dnfbp": false,
        "dpms": false,
        "profile_category": 1,
        "profile_photo": {
            "base64_data": "<<bas64data>>",
            "content_type": "image/jpeg"
        }
    }
}

Success Response

HttpStatusCode : 200

Code Block
languagejson
{
    "status": "success",
    "data": {
        "aml_scan_status": "Accepted",
        "ecrn": "7841003233112590",
        "customer_status": "ACTIVE",
        "pep": false,
        "aml_category": 2
    },
    "requestId": "9ec8ed6c9f52a83b12a2373665b899de",
    "status_code": "200 OK"
}

Validation Failure Response - Customer Under Compliance Investigation

HttpStatusCode : 406

Code Block
languagejson
{
    "requestId": "8d0e88958b3572ed17f4e859f1fce107",
    "status": "failed",
    "status_code": "406 NOT_ACCEPTABLE",
    "error_code": null,
    "message": "Customer 7841003230689645 Under Compliance Investigation"
}

Validation Failure Response - Blocked Customer

HttpStatusCode : 406

Code Block
languagejson
{
    "requestId": "dee033942cdce475bfbd55c0a6c26ffa",
    "status": "failed",
    "status_code": "406 NOT_ACCEPTABLE",
    "error_code": null,
    "message": "Customer 7841003230689645 Can not be Accepted"
}

Validation Failure Response - Invalid Master Data

HttpStatusCode : 400

Code Block
languagejson
{
    "requestId": "7ec2c7830fa6446ecebe1e9a7b80f8fa",
    "status": "failed",
    "status_code": "406 NOT_ACCEPTABLE",7841003230626451
    "error_code": null,
    "message": " Invalid Nationality ae!"
}

Validation Failure Response - Mandatory Field Missing

HttpStatusCode : 400

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 400,
    "errorCode": 40002,
    "message": "Invalid format or missing mandatory request",
    "details": {
        "firstName": "Invalid first name"
    },
    "requestId": "117b2b47732057ce9f495ca215ad6366"
}

Authentication Failure Response

HttpStatusCode : 401

Code Block
languagejson
{
    "timestamp": "2023-03-15T14:26:24.292+00:00",
    "status": 401,
    "error": "Unauthorized",
    "message": "",
    "path": "/api/v1/CAAS/onBoarding/customer"
}

Bad Request

Http Staus Code:400

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 400,
    "errorCode": 40002,
    "message": "Invalid format or missing mandatory request",
    "details": {
        "firstName": "Invalid first name"
    },
    "requestId": "9cee167abbdde1612fcb67ec452b881b"
}

Internal Server Error

HttpStatusCode : 502

Code Block
languagejson
{
    "status": "failed",
    "errorCode": "50203",
    "message": "Backend Technical Problem",
    "requestId": "f91a4fb9d062eb26181da69bf61ca644",
    "status_code": "502"
}

...

API

https://{{baseUrl}}/caas/api/v2/customer/{{ecrn}}

Authorization

 Bearer Token

Method

GET

Headers

Content-Type: application/json

Payload

Code Block
None

Success Response

HttpStatusCode: 200

Code Block
languagejson
{
    "ecrn": "1058021235161541",
    "first_name": "IRFAN MANAKKAT THEKKE",
    "salutation": null,
    "middle_name": "PURAYIL ISMAIL",
    "last_name": "NANGARATH MUNDACHI",
    "preferred_name": "IRFAN MANAKKAT THEKKE",
    "nationality": "IN",
    "second_nationality": "GB",
    "native_region": 1,
    "date_of_birth": "1995-07-28",
    "country_of_birth": "IN",
    "place_of_birth": "INDIA",
    "resident_type_id": 101,
    "country_of_residence": "AE",
    "gender": "Male",
    "mothers_maiden_name": "maiden Name",
    "primary_mobile_number": "+971502106707",
    "secondary_mobile_number": "+971502106706",
    "email_id": "irfanmtp1@gmail.com",
    "phone_number": "+971502106705",
    "occupation_id": 2856,
    "political_exposed_person": false,
    "aml_scan_status": "Accepted",
    "customer_iban": "AE083141058021235161541",
    "customer_status": "ACTIVE",
    "aml_category": 5,
    "additional_docs": [
        {
            "contentType": "image/jpeg",
            "file_name": "customer/additionalDoc/1058021235161541_1.jpeg"
        }
    ],
    "address_list": [
        {
            "dateUpdated": "2023-03-15T14:34:07.849554Z",
            "address_type_id": "1",
            "building_name": "MANKHOOL  BUILDING",
            "street_name": "",
            "landmark": "AL NAHDA",
            "city": "EMIRATE OF DUBAI",
            "district": "",
            "state": " ",
            "country": "AE",
            "zip": 0,
            "mobile_number": null
        }
    ],
    "id_details": [
        {
            "dateUpdated": "2023-03-15T14:34:07.849554Z",
            "id_type": 2,
            "id_number": "P4006315",
            "visa_number": "0",
            "visa_expiry_date": null,
            "name_as_per_id": " ",
            "issued_country": "IN",
            "issued_by": "INDIA Govt.",
            "issued_at": null,
            "issued_on": "2016-08-08",
            "date_of_expiry": "2026-08-08",
            "default_status": true,
            "active_status": true,
            "id_front": null,
            "id_back": null
        },
        {
            "dateUpdated": "2023-03-15T14:34:07.849554Z",
            "id_type": 4,
            "id_number": "784199554586091",
            "visa_number": "0",
            "visa_expiry_date": null,
            "name_as_per_id": " ",
            "issued_country": "AE",
            "issued_by": "EIDA",
            "issued_at": null,
            "issued_on": "2020-08-08",
            "date_of_expiry": "2023-08-08",
            "default_status": true,
            "active_status": true,
            "id_front": {
                "base64_data": "",
                "file_name": "customer/id/1058021235161541_ID_FR_4_784199554586091.jpeg",
                "content_type": "image/jpeg"
            },
            "id_back": null
        }
    ],
    "customer_classification": {
        "dateUpdated": "2023-02-14T10:28:03.762012Z",
        "customer_type_id": 2,
        "annual_income_range_id": 15,
        "annual_income_currency_code": null,
        "social_security_number": null,
        "tax_registration_number": null,
        "txn_issued_country": null,
        "employer_name": "EMKE",
        "employer_address": "UAE",
        "employer_phone": " ",
        "employer_ecrn": "",
        "employer_establishment_id": "",
        "risk_rating_id": 3,
        "last_review_date": null,
        "next_review_date": null,
        "pep_category": null,
        "group_companies": null,
        "group_employer_code": " ",
        "personal_mohre_id": "",
        "income_type": 1,
        "profession_category": "",
        "reason_for_acc": " ",
        "referred_by": "1058021235161541",
        "referred_by_type": 1,
        "txn_vol_month": 1,
        "txn_count_month": 1,
        "show_remarks_on_txn": false,
        "customer_remarks": "",
        "agent_ref_no": null,
        "ekyc_provider": null,
        "ekyc_ref_no": null,
        "customer_cards": null,
        "card_number": null,
        "social_links": [],
        "subscriptions": [
            {
                "subsciption_type": "PREMIUM",
                "subscription_id": "GOLD CARD",
                "status": "active"
            }
        ],
        "first_language": "",
        "marital_status": null,
        "dnfbp": false,
        "dpms": false,
        "profile_category": 1,
        "profile_photo_file_name": null
    },
    "customer_relations": [],
    "communication_consents": [
        {
            "allow": true,
            "communication_type": 1
        },
        {
            "allow": true,
            "communication_type": 2
        }
    ]
}

Authentication Failure Response

HttpStatusCode: 401

Code Block
{
    "timestamp": "2023-03-15T14:26:24.292+00:00",
    "status": 401,
    "error": "Unauthorized",
    "message": "",
    "path": "/api/v1/customer/7841001228796988"
}

Customer Not Subscribed Failure Response

HttpStatusCode: 200

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 404,
    "errorCode": 45003,
    "message": "Customer not Subscribed"
}

Customer not found Failure Response

HttpStatusCode: 200

Code Block
languagejson
{
    "status": "failure",
    "statusCode": 404,
    "errorCode": 45001,
    "message": "Customer not found"
}

...

Code Block
languagejson
{
   "aml_scan_status": "Accepted",
   "ecrn": "1058021235161541",
   "customer_status": "ACTIVE"
 }

CDP Master Values

View file
nameCDP-Master Values.xlsx