Skip to main content

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 currency parameter 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

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
sub_agent_idSub-Merchant IDstringRequiredID of the sub-merchant to query
currencyCurrencystringOptionalFilter by currency; returns all currencies if omitted
startStart IndexstringRequiredPagination start index
countPage SizestringRequiredNumber of records per page
timestampCurrent TimestampstringRequiredTimestamp when calling the interface (in milliseconds, valid for ten minutes)
signSignaturestringRequiredSignature algorithm details in the interface description

Response Parameters

ParameterNameTypeDescription
codeResponse CodeintError Code
messageResponse MessagestringError Message
dataResponse DatadictResponse Data Details
--startStart IndexintStart Index
--page_sizePage SizeintPage Size
--totalTotal RecordsintTotal Records
--listRecord ListListScore Change Record List
----agent_idSub-Merchant IDstringSub-Merchant ID
----nameSub-Merchant NamestringSub-Merchant Name
----currencyCurrencystringCurrency
----deltaScore DeltafloatChange amount; positive = added, negative = deducted
----change_typeChange Typeint1 = Manual (admin), 2 = API, 3 = System Auto Settlement
----operator_agent_idOperator IDstringMerchant ID that made the change
----create_timeChange TimeintChange timestamp (in milliseconds)

Request Example

curl --location 'https://staging.aig1234.com/api/agent/score/record/list?agent_id=agent001&sub_agent_id=agent002&currency=USD&start=0&count=20&timestamp=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