Query Sub-Merchant Score Change Records
1. Query Sub-Merchant Score Change Records
Interface Path
- GET
- /api/agent/score/record/list
Description
- Returns the paginated score change history for a specified sub-merchant, sorted by change time in descending order.
- Use the optional
currencyparameter to filter by a specific currency; if omitted, records for all currencies are returned. - The caller can only query records 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 |
| start | Start Index | string | Required | Pagination start index |
| count | Page Size | string | Required | Number of records per page |
| 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 |
| --start | Start Index | int | Start Index |
| --page_size | Page Size | int | Page Size |
| --total | Total Records | int | Total Records |
| --list | Record List | List | Score Change Record List |
| ----agent_id | Sub-Merchant ID | string | Sub-Merchant ID |
| ----name | Sub-Merchant Name | string | Sub-Merchant Name |
| ----currency | Currency | string | Currency |
| ----delta | Score Delta | float | Change amount; positive = added, negative = deducted |
| ----change_type | Change Type | int | 1 = Manual (admin), 2 = API, 3 = System Auto Settlement |
| ----operator_agent_id | Operator ID | string | Merchant ID that made the change |
| ----create_time | Change Time | int | Change timestamp (in milliseconds) |
Request Example
curl --location 'https://staging.aig1234.com/api/agent/score/record/list?agent_id=agent001&sub_agent_id=agent002¤cy=USD&start=0&count=20×tamp=1732589849000&sign=6d39491fb4195d392dc3d53bf6c88138' \
--header 'Content-Type: application/json'
Response Example
{
"code": 200,
"message": "success",
"data": {
"start": 0,
"page_size": 20,
"total": 56,
"list": [
{
"agent_id": "agent002",
"name": "Sub-Merchant A",
"currency": "USD",
"delta": 100.00,
"change_type": 2,
"operator_agent_id": "agent001",
"create_time": 1732589849000
},
{
"agent_id": "agent002",
"name": "Sub-Merchant A",
"currency": "USD",
"delta": -50.00,
"change_type": 2,
"operator_agent_id": "agent001",
"create_time": 1732589700000
}
]
}
}
Error Codes
200 Success
408003 Whitelist Restriction
600100 Invalid Signature
600101 Invalid Parameter
600106 Database Operation Failed
700101 Merchant Does Not Exist