URL Request method Content-Type Output format Character set api-base-url?partner_code=xxx&partner_key=xxx POST application/json JSON UTF-8
Field Type Meaning Required fields Remarks partner_code String Partner identify Yes Provided by TD partner_key String Partner secret key Yes Provided by TD
Field Meaning Required fields Remarks path Interface path Yes goods/getValuequery sign The signature returned by the SDK Yes query Query parameters No Formatting reference: {"key1":"asas", "key2":"2"} body Request message No Formatting reference: asdfga
Taking the China region site as an example:
Shell
curl --location 'https://sg.apitd.net/signature/v2?partner_code=demo&partner_key=xxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"path": "goods/getValuequery",
"sign": "g91b0e2ce42957a4b9d2d6b78b63f6fbf31df1117ecee4a96872757c51595d53674ed72ea7df1e1cead879e407021b29e4204cf7e755174e4ab1f4e35d9abb4400000000000022016906d21a40a80cb9a194950000"
}'
Field Type Meaning Remarks code Integer nterface response status codes Refer to the status code description message String Status Info data Json Verification results Please refer to the following explanation of the verification result
Status Code Reason 200 Request successful 431 Partner missing 500 Internal server error 512 This service has not been purchased 513 Traffic has been disabled
Field Type Meaning Remarks status Integer Verification result code Refer to the signature verification result code below env Array Device risk root: privilege escalation behavior hack: environment attack behavior virtualEnv: virtual executioncrawler: web crawlerresult String Verification result miss: missingblock: blockedpass: passedversion String Version number
code Resul Remarks 1101 miss Sign missing 1102 miss Path missing 1200 pass Verification passed 1301 block Invalid data format 1302 block Invalid data format 1303 block Invalid data format 1304 block Invalid data format 1401 block Verification failed 1402 block Verification failed 1501 block Verification failed 1502 block Verification failed 1503 block Verification failed 1601 pass Verification passed, but a device risk was detected 1602 pass Verification passed, but requests kept coming in 1603 pass Verification passed, requesting replay 1604 pass Verification passed, created time has risk
JSON
{
"code": 200,
"message":"success",
"data": {
"status":1200,
"env": [],
"result": "pass",
"version": "v2"
}
}
JSON
{
"code": 512,
"message": "This service is not purchased"
}