跳到主要内容

查询子商户分数变动记录

1、查询子商户分数变动记录

接口路径

  • GET
  • /api/agent/score/record/list

说明

  • 查询指定子商户的分数变动历史记录,以分页模式返回,按变动时间倒序排列。
  • 可通过 currency 参数筛选特定币种,不传则返回所有币种的记录。
  • 调用方只能查询其直属子商户的变动记录。

请求参数

参数名称类型必填说明
agent_id商户 IDstring必填商户 ID
sub_agent_id子商户 IDstring必填要查询记录的子商户 ID
currency币种string选填按币种筛选,不传则返回所有币种
start分页开始下标string必填分页开始下标
count每页数量string必填每页返回的记录数
timestamp当前时间戳string必填传调用接口时的时间戳(单位毫秒,有效期十分钟)
sign签名string必填签名算法详见接口说明

响应参数

参数名称类型说明
code响应码int错误码
message响应信息string错误信息
data响应数据dict响应数据详情
--start开始下标int开始下标
--page_size每页数量int每页数量
--total总记录数int总记录数
--list记录列表List分数变动记录列表
----agent_id子商户 IDstring子商户 ID
----name子商户名称string子商户名称
----currency币种string币种
----delta分数变动float变动量,正数为增加,负数为减少
----change_type变动类型int1=后台手动修改,2=API 接口修改,3=系统自动结算
----operator_agent_id操作者 IDstring执行操作的商户 ID
----create_time变动时间int变动时间戳(单位毫秒)

请求范例

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'

响应范例

{
"code": 200,
"message": "success",
"data": {
"start": 0,
"page_size": 20,
"total": 56,
"list": [
{
"agent_id": "agent002",
"name": "子商户A",
"currency": "USD",
"delta": 100.00,
"change_type": 2,
"operator_agent_id": "agent001",
"create_time": 1732589849000
},
{
"agent_id": "agent002",
"name": "子商户A",
"currency": "USD",
"delta": -50.00,
"change_type": 2,
"operator_agent_id": "agent001",
"create_time": 1732589700000
}
]
}
}

错误码

200    成功
408003 白名单限制
600100 签名不合法
600101 参数不合法
600106 数据库操作失败
700101 商户不存在