Update Sub-Merchant Score
1. Update Sub-Merchant Score (Add / Subtract)
Interface Path
- POST
- /api/agent/score/update
Description
- Update the score for a specified sub-merchant. A positive
scorevalue adds points; a negative value deducts points. - The caller can only modify scores for their direct sub-merchants.
Request Parameters
| Parameter | Name | Type | Required | Description |
|---|---|---|---|---|
| agent_id | Merchant ID | string | Required | Merchant ID |
| sub_agent_id | Sub-Merchant ID | string | Required | ID of the sub-merchant to update |
| currency | Currency | string | Required | Currency |
| score | Score Delta | string | Required | Score change amount; positive to add, negative to subtract, e.g. "100" or "-50" |
| timestamp | Current Timestamp | int | Required | Timestamp when calling the interface (in milliseconds, valid for ten minutes) |
| sign | Signature | string | Required | Signature algorithm details in the interface description |
Response Parameters
| Parameter | Name | Type | Description |
|---|---|---|---|
| code | Response Code | int | Error Code |
| message | Response Message | string | Error Message |
| data | Response Data | dict | Response Data Details |
| --agent_id | Sub-Merchant ID | string | Sub-Merchant ID |
| --currency | Currency | string | Currency |
Request Example
curl --location 'https://staging.aig1234.com/api/agent/score/update' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"sub_agent_id": "agent002",
"currency": "USD",
"score": "100",
"timestamp": 1732589849000,
"sign": "6d39491fb4195d392dc3d53bf6c88138"
}'
Response Example
{
"code": 200,
"message": "success",
"data": {
"agent_id": "agent002",
"currency": "USD"
}
}
Error Codes
200 Success
408000 Request Parameter Error
408003 Whitelist Restriction
600100 Invalid Signature
600101 Invalid Parameter
600106 Database Operation Failed
700101 Merchant Does Not Exist