Query Sub-Merchant Score
1. Query Sub-Merchant Score
Interface Path
- GET
- /api/agent/score/query
Description
- Returns the score list for a specified sub-merchant, with one record per currency.
- Use the optional
currencyparameter to filter by a specific currency; if omitted, all currencies are returned. - The caller can only query 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 query |
| currency | Currency | string | Optional | Filter by currency; returns all currencies if omitted |
| timestamp | Current Timestamp | string | 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 |
| --list | Score List | List | Score Records List |
| ----agent_id | Sub-Merchant ID | string | Sub-Merchant ID |
| ----name | Sub-Merchant Name | string | Sub-Merchant Name |
| ----currency | Currency | string | Currency |
| ----score | Current Score | float | Current Score |
Request Example
curl --location 'https://staging.aig1234.com/api/agent/score/query?agent_id=agent001&sub_agent_id=agent002¤cy=USD×tamp=1732589849000&sign=6d39491fb4195d392dc3d53bf6c88138' \
--header 'Content-Type: application/json'
Response Example
{
"code": 200,
"message": "success",
"data": {
"list": [
{
"agent_id": "agent002",
"name": "Sub-Merchant A",
"currency": "USD",
"score": 1500.00
}
]
}
}
Error Codes
200 Success
408003 Whitelist Restriction
600100 Invalid Signature
600101 Invalid Parameter
700101 Merchant Does Not Exist