Skip to main content

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

ParameterNameTypeRequiredDescription
agent_idMerchant IDstringRequiredMerchant ID
sub_agent_idSub-Merchant IDstringOptionalID of the sub-merchant to query; if omitted, queries the current merchant
currencyCurrencystringOptionalFilter by currency; returns all currencies if omitted
timestampCurrent Timestampint64RequiredTimestamp 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
--listScore ListListScore Records List
----agent_idSub-Merchant IDstringSub-Merchant ID
----nameSub-Merchant NamestringSub-Merchant Name
----currencyCurrencystringCurrency
----scoreCurrent Scorefloat64Current Score

Request Example​

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