The risk retrieval model API is used to automatically push the risk data produced by the TD risk retrieval model to the API address you subscribe to, so that your business system can perform further operations after receiving the results. For example, canceling the user's loan application before the credit result is released, etc.
TD will produce risk retrieval data on T+1 and push the retrieved data to you through this API every morning.
API Format
Base URL
The subscription API address you provide to TD.
API
URL | HTTP Method | Request Content Type | Response Content Type | Charset |
---|---|---|---|---|
api-base-url?partner_code=xxx×tamp=xxx&access_key=xxx&sign=xxx | POST | application/json | JSON | UTF-8 |
Authentication
Name | Type | Description | Required/Optional | Notes |
---|---|---|---|---|
partner_code | String | Partner Code | Required | Assigned by TD |
timestamp | String | Current timestamp | Required | Millisecond level |
access_key | String | Access key | Required | Assigned by TD |
sign | String | Sign | Required |
Sign generation method
sign = HmacSHA1(partner_code+timestamp+access_key,access_secret)
access_secret is assigned by TD
headers
Parameter name | Value | Required/Optional |
---|---|---|
Content-Type | application/json | Required |
Request Parameters For Push Notifications
Parameter | Type | Description | Required/Optional | Notes |
---|---|---|---|---|
name | String | Name | Required | |
id_type | String | ID document type | Required | Enumeration value:1. identity_card2. passport3. driving_licence4. birth_certificate5. others |
id_number | String | ID number | Required | |
country_code | Integer | Country code | Recommend | Complies with the International Telecommunication Union E.164 standard, without the + sign and the prefix 0, such as 86 |
phone_number | String | Phone number | Required | |
sequence_id | String | Original request sequence id | Required | If it interfaces with TrustGuard, the value is TrustGuard id. |
result_type | String | Result type | Required | Such as: fraud |
reason | String | Risk reason | Required | Black sample correlation, gang anomalies, etc. |
Request Example For Push Notifications
{
"sequence_id": "164877716577086****6307055",
"phone_number": "861234***5",
"name": "Jack Simth",
"id_number": "xxxxx",
"result_type": "fraud",
"reason": "black association"
}
Response Parameters
Parameters that your business system needs to respond to after receiving a push request
Parameter | Type | Description | Required/Optional | Notes |
---|---|---|---|---|
code | Integer | API status code | Required | |
message | String | Status message | Required | In the API exception state, the specific exception reason will be output. |
API Status Code
code | **Description** |
---|---|
200 | Success |
Response Example
{
"code": 200,
"message": ""
}
Note: If the status code you return is not 200, we will retry 3 times. If we fail 3 times, we will not push the data any more.