API Reference
中文

Identity Verification API

The Verification API is used for real-time access to our risk verification results.

API Format

Base URL

API

URLRequest MethodsContent-TypeOutput FormatCharacter Set
api-base-url?partner_code=xxx&partner_key=xxxPOSTapplication/jsonJSONUTF-8

example: https://sg-efficient.apitd.net/fraud/identity/v3?partner_code=test_code&partner_key=test_key

Authentication
ParameterTypeDescriptionRequired/OptionalNotes
partner_codeStringPartner Coderequiredassigned by TD
partner_keyStringPartner Keyrequiredassigned by TD

Request

ParameterTypeDescriptionRequired/OptionalNotes
channelStringChannelrequiredassigned by TD
session_idStringSession IDrequiredThe session ID is a unique identifier assigned by the website server to a specific user during the visit, which is usually stored in the form of a cookie, form parameter, or URL
decision_eventStringVerification Eventrequiredenumeration:
register
login
modify
event_timeStringThe Actual Time of the EventrequiredISO 8601, format YYYY-MM-DDTHH:mm:ss.sssZ, example: 2021-10-12T14:20:50.521+07:00
account_idStringAccount IDrequired
terminalTerminalDevice Informationrequired
extExtExtended Fieldconditionally required: required when the extended field is used for policy.extended field registered in the TD system
event_detailObjectEvent Informationrequiredevent data object corresponding to the decision_event

The mapping relationship between the event_detail event data and the decision_event is as follows:

Our API design restricts each request to only include data related to a single business event. This means that you cannot simultaneously pass multiple requests with different types of business event data, such as register and login. Adhering to this rule will help improve system performance and reliability, ensuring that each business event is processed correctly.

EventEvent Type
Registerregister
Loginlogin
Modifymodify

Request Example

Let's take the example of a register event.

{
    "channel": "test",
    "session_id": "abc0123456789",
    "decision_event": "register",
    "event_time": "2021-10-12T14:20:50.521+07:00",
    "account_id": "123456789",
    "terminal": {
        "black_box": "aGPH1658920283672ropYaFxT7",
        "ip": "210.20.10.33"
    },
    "ext": {
        "ext_book_id": "LFOUHOFHOHFNOUH",
        "ext_book_num": 10
    },
    "event_detail": {
        "account": {
            "account_id": "123456789",
            "register_time": "2021-10-12T14:20:50.521+07:00",
            "login_time": "2021-10-12T14:25:50.521+07:00",
            "phone": {
                "country_code": 1,
                "phone_number": "6165793816"
            },
            "email": "[email protected]"
        },
        "profile": {
            "person": {
                "name": {
                    "first_name": "Pierre",
                    "middle_name": "",
                    "last_name": "Laurent",
                    "nickname": "Snochy"
                },
                "sex": "male",
                "birthdate": "1998-01-01"
            },
            "address": {
                "country": "FR",
                "region": "Grand Est",
                "city": "Strasbourg City",
                "district": "Ketali Lorem",
                "detail": "3213 Building,lorem Street",
                "zip_code": "310000"
            },
            "education": "master",
            "profession": "XXX",
            "annual_income": {
                "currency": "USD",
                "amount_local": 100000,
                "amount_usd": 100000,
                "amount_cny": 680000
            }
        },
        "invite": {
            "inviter_id": "567890",
            "inviter_phone": {
                "country_code": 1,
                "phone_number": "18700001112"
            },
            "invite_code": "NOHHD",
            "invite_medium": "WeChat"
        }
    }
}

Response Parameter

ParameterTypeDescriptionRequired/OptionalNotes
codeIntegerAPI Status Coderequired
messageStringStatus Messagerequiredspecific abnormal reasons will be provided if the API is abnormal
sequence_idStringUnique ID of ResponserequiredA unique ID used to mark each request
scoreIntegerRisk Scorerequiredrange: 0 - 100
resultStringDecision Resultrequiredenumeration:
decline
review
accept
reasonsArrayDecision Reasonsrequired
idStringDecision Reason IDrequiredeach decision reason has a unique id
reasonStringDecision Reasonrequired

API Status Code

codeDescription
200Success
301Service not purchased
302Traffic blocked
303Traffic insufficient
304Service expired
305Daily maximum volume reached
9001{Parameter} empty
9002{Parameter} check error
9003{Parameter} length or size exceeds 1024
9004Either black_box or ip exists
9200System error
9201Unknown error
9202Illegal Content-Type

Response Example

{
    "code": 200,
    "message": "",
    "sequence_id": "1648777165770866F82AC7F326307055",
    "score": 60,
    "result": "review",
    "reasons": [
        {
            "id": "IDMQ0QB2",
            "reason": "Gang Risk"
        }
    ]
}