Decision Feedback API is used to push the feedback results (decline or accept) to your business system for further performance optimization (TrustID、TrustTxn、TrustPromo).
API Format
Base URL
Decision Feedback API address you configured on the TD portal.
API
URL | Request Methods | Content-Type | Output Format | Character Set |
---|---|---|---|---|
api-base-url?timestamp=xxx&partner_code=xxx&access_key=xxx&sign=xxx | POST | application/json | JSON | UTF-8 |
Authentication
Parameter | Type | Description | Required/Optional | Notes |
---|---|---|---|---|
timestamp | String | Current Timestamp | required | millisecond |
partner_code | String | Partner Code | required | assigned by TD |
access_key | String | Access Key | required | assigned by TD |
sign | String | Sign | required |
How the 'sign' is generated?
sign = HmacSHA1(partner_code+timestamp+access_key,access_secret)
In which, 'access_secret' is assigned by TD.
headers
Parameter Name | Value | Required/Optional | Notes |
---|---|---|---|
Content-Type | application/json | required | |
xxx | xxx | conditionally required | the customized field you configured on the TD portal |
Push Request Parameter
Parameter | Type | Description | Required/Optional | Notes |
---|---|---|---|---|
type | String | ID Type | required | enumeration: sequence_id |
id | String | ID Value | required | |
result | String | Result | required | enumeration: decline accept |
operator | String | Operator | required | name of the operator, and can be replaced by the operator's account or email. |
time | Long | Time | required | millisecond |
reason | String | Reasons or Notes | optional |
Push Request Example
{
"type": "sequence_id",
"id": "1648777165770866F82AC7F326307055",
"result": "accept",
"operator": "Pierre-zb",
"time": "1673402388579",
"reason": "lorem tags"
}
Response Parameter
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 | specific abnormal reasons will be provided when the API is abnormal |
API Status Code
code | Description |
---|---|
200 | Success |
Response Example
{
"code": 200,
"message": ""
}