1. Get Server-Side Reward Callback Rules
1.1 Request URL
https://api.toponad.net/v3/advanced/reward_rule
1.2 Request method
GET
1.3 Request params
params | type | required | notes |
---|---|---|---|
ids | Array[Int] | N |
Server-side reward callback rule ID list, with a maximum limit of 100. If not transmitted, it represents obtaining all. |
1.4 Return data
params | type | required | notes |
---|---|---|---|
items | Array[Object] | Y | Server-side reward callback rule list |
items.id | Int | Y | Rule ID |
items.rule_name | String | Y | Rule name, maximum length 30 |
items.reward_name | String | Y | Reward name, maximum length 30 |
items.reward_number | Int | Y | Reward amount, valid range [1,100000000] |
items.reward_url | String | Y |
Callback url |
items.reward_sec_key | String | Y | Public key |
items.remark | String | Y | Remark |
items.status | Int | Y |
Rule status: 1: Off 3: On |
1.5 Sample
Request sample:
curl --location --request GET 'https://api.toponad.net/v3/advanced/reward_rule?ids=417018,374133' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0===b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626056011000' \
--header 'Content-Type: application/json' \
--data-raw ''
Return sample:
{
"items": [
{
"id": 1,
"rule_name": "Test rule 001",
"remark": "remark",
"reward_number": 10000,
"reward_name": "Test rule 001",
"reward_url": "https://topon-billing-sys.oss-accelerate.aliyuncs.com/1613/20231226/1703578680_r0u5ZR1c.pdf?OSSAccessKeyId=LTAI5tKdnC9J6sdUn1SB1ju3&_!@#$%^&*4353*(233223)_+-={]}[]\\|:;\"'23424<,>.?/Expires=1703592649&32`~4355&Signature=05yq2Zb9%2FdCeDnehO277KuV17mk%3D",
"reward_sec_key": "llyh0dzbrudgakp06baipujcotrhwo1k",
"status": 3
}
]
}
2. Create Server-Side Reward Callback Rules
2.1 Request URL
https://api.toponad.net/v3/advanced/reward_rule
2.2 Request method
POST
2.3 Request params
params | type | required | notes |
---|---|---|---|
items | Array[Object] | Y |
Server-Side Reward Callback Rule list |
items.rule_name | String | Y | Rule name, maximum length 30 |
items.reward_name | String | Y | Reward name, maximum length 30 |
items.reward_number | Int | Y | Reward amount, valid range [1,100000000] |
items.reward_url | String | Y |
Callback URL Note: Please enter a valid address. Taku will call back to this url during the operation (add the parameter is_test=1) to test whether it is working properly. |
items.remark | String | Y | Remark |
2.4 Return data
params | type | required | notes |
---|---|---|---|
items | Array[Object] | N |
The list of successfully created rules, index positions, and request parameters items index positions correspond one-to-one. |
items.id | Int | Y |
Rule ID |
items.reward_sec_key | String | Y |
Public key |
errs | Array[Object] | N | Error rule information list, note: 1. If the list is empty, the operation is successful. 2. If the list is not empty, the list indicates which apps failed verification, and all rules (including those that passed verification) failed. |
errs.index | Int | Y | The index position of the error item in the request parameter items, starting from 0. |
errs.code | Int | Y | Error code |
errs.msg | String | Y | Error message |
2.5 Sample
Request sample:
curl --location --request POST 'https://api.toponad.net/v3/advanced/reward_rule' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0==5b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626161553000' \
--header 'Content-Type: application/json' \
--data-raw '{
"items": [
{
"reward_number": 4778,
"rule_name": "xcj2",
"reward_name":"reward1",
"remark":"===",
"reward_url": "https://www.baidu.com/"
}
]
}'
Return sample:
{
"items": [
{
"id": 318,
"reward_sec_key": "0b9df85fb9d552ef7====b805e6b004"
}
]
}
3. Update Server-Side Reward Callback Rules
3.1 Request URL
https://api.toponad.net/v3/advanced/reward_rule
3.2 Request method
PUT
3.3 Request params
params | type | required | notes |
---|---|---|---|
items | Array[Object] | Y |
Server-Side Reward Callback Rules list |
items.id | Int | Y | Rule ID |
items.rule_name | String | Y | Rule name, maximum length 30 |
items.reward_name | String | Y | Reward name, maximum length 30 |
items.reward_number | String | Y | Reward amount, valid range [1,100000000] |
items.reward_url | String | Y |
Callback URL Note: Please enter a valid address. Taku will call back to this url during the operation (add the parameter is_test=1) to test whether it is working properly.
|
items.remark | Int | Y | Remark |
items.status | Int | Y |
Rule status: 1: Off 3: On
|
3.4 Return data
params | type | required | notes |
---|---|---|---|
errs | Array[Object] | N | Error rule information list, note: 1. If the list is empty, the operation is successful. 2. If the list is not empty, the list indicates which apps failed verification, and all rules (including those that passed verification) failed. |
errs.index | Int | Y | The index position of the error item in the request parameter items, starting from 0. |
errs.code | Int | Y | Error code |
errs.msg | String | Y | Error message |
3.5 Sample
Request sample:
curl --location --request PUT 'https://api.toponad.net/v3/advanced/reward_rule' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0==5b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626161553000' \
--header 'Content-Type: application/json' \
--data-raw '{
"items": [
{
"id":313,
"reward_number": 4778999,
"rule_name": "xcj1",
"reward_name":"reward1_1",
"reward_url": "https://www.testurl.com/",
"remark": "222",
"status": 3
}
]
}'
Return sample:
{}
4. Delete Server-Side Reward Callback Rules
4.1 Request URL
https://api.toponad.net/v3/advanced/reward_rule
4.2 Request method
DELETE
4.3 Request params
params | type | required | notes |
---|---|---|---|
ids | Array[Int] | Y |
Server-Side Reward Callback Rule ID list, with a maximum limit of 100 and a minimum of 1. |
4.4 Return data
None
4.5 Sample
Request sample:
curl --location --request DELETE 'https://api.toponad.net/v3/advanced/reward_rule' \
--header 'X-Up-Key: 877f8ae9c6e9ca82c0===b5fff594c373axxx' \
--header 'X-Up-Signature: CE12B506DBCD868C2C6F09E08C139CBC' \
--header 'X-Up-Timestamp: 1626056011000' \
--header 'Content-Type: application/json' \
--data-raw '
{
"ids":[313]
}'
Return sample:
None