Introduction
The Multi Platform Complex Detection API is designed to facilitate complex detection for multiple platforms by verifying customer ID numbers and phone numbers. This guide will walk you through the steps to use the API, from obtaining the access token to interpreting the response.
Step 1: Obtain the Access Token
Before you can interact with the API, you must authenticate your requests using an Access Token. Follow these steps to generate the token:
API Endpoint for Access Token Generation:
https://api.advance.ai/openapi/auth/ticket/v1/generate-token
Required Request Parameters:
- accessKey: Your unique API key.
- signature: A string generated by combining
accessKey,secretKey, andtimestamp, then encrypting the result using the SHA256 algorithm. - timestamp: A 13-digit timestamp representing the time of the request, suggested to be within 5 minutes (300 seconds) of the current time.
- periodSecond (optional): Defines the token's validity duration (default is 3600 seconds; minimum is 60 seconds; maximum is 86400 seconds).
Example Request:
curl -X POST -H "Content-Type: application/json" \
-d '{"accessKey":"your_access_key","signature":"your_signature","timestamp":1648785145789,"periodSecond":3600}' \
"https://api.advance.ai/openapi/auth/ticket/v1/generate-token"
Example Success Response:
{
"code": "SUCCESS",
"message": "OK",
"data": {
"token": "eyJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJoNV9saXZlbmVzcyIsInN1YiI6IntcImN1c3RvbWVySWRcIjo1NTAwMDI4MixcImFjY291bnRJZFwiOjU1MDAwMjg0LFwicmVhbElwXCI6XCI0NS4yNTEuMTA3LjExMVwifSIsImF1ZCI6IldFQiIsImlhdCI6MTY0MjU4MDA3MiwiZXhwIjoxNjQyNTgwMTkyfQ.HmIDcuSW67A59x7bnumjGp0Wdcz-FmoDrnHF1YGui6wVPfulLn4Izonay5LQnySgph1dbyC1E0LtifS-BJo8VA",
"expiredTime": 1642580192430
}
}
Note: Keep the token secure and re-generate it once it expires.
Step 2: Perform Multi Platform Complex Detection
Once you have a valid access token, you can proceed to make a detection request.
API Endpoint for Detection:
https://api.advance.ai/openapi/verification/v2/multi-platform-complex
Required Request Headers:
- X-ACCESS-TOKEN: Your access token obtained in Step 1.
- Content-Type: Set to
application/json.
Request Parameters:
- idNumber: Customer’s 16-digit National ID Number (NIK).
- phoneNumber: Customer’s cellphone number, which must follow the format
+628(Indonesia only).
Example Request:
curl -X POST -H "X-ACCESS-TOKEN: {Your Access Token}" \
-H "Content-Type: application/json" \
-d '{"idNumber": "3271032503570001", "phoneNumber": "+628123456789"}' \
"https://api.advance.ai/openapi/verification/v2/multi-platform-complex"
Step 3: Understand the Response
After submitting the request, the API returns various data points in JSON format. Here’s how to interpret the response:
- Success Response:
- The
codewill beSUCCESS. - The
datasection will include statistics on ID and phone number verification from different platforms like banks, fintech, and other financial institutions.
- The
Example Success Response:
{
"code": "SUCCESS",
"message": "OK",
"data": {
"idStatistics": {
"BANK_1h": 2,
"MULTI_FINANCE_1h": 1,
// Additional statistics here...
},
"phoneStatistics": {
"BANK_1h": 0,
"MULTI_FINANCE_1h": 0,
// Additional statistics here...
}
}
}
In this example, statistics are available for various time intervals (1h, 3h, 7d, etc.), indicating the number of queries made about the customer across different financial sectors.
Step 4: Handling Specific Status Codes
The API can return various status codes based on the outcome of the request. Some common ones include:
NO_RECORD: No query records for the provided ID and phone number.PARAMETER_ERROR: Indicates an issue with the provided ID or phone number (e.g., incorrect format).
Example of a NO_RECORD Response:
{
"code": "NO_RECORD",
"message": "No query record",
"data": null
}
Further Assistance
If you continue to experience issues despite following the guidelines provided, please contact our support team for further assistance:
- Email: help@advance.ai
- Submit a Ticket: Via ADVANCE.AI Support
Comments
0 comments