跳到主要内容

修改子商户分数

1、修改子商户分数(增/减)

接口路径

  • POST
  • /api/agent/score/update

说明

  • 修改指定子商户的分数,score 为正数时增加分数,为负数时减少分数。
  • 调用方只能修改其直属子商户的分数。

请求参数

参数名称类型必填说明
agent_id商户 IDstring必填商户 ID
sub_agent_id子商户 IDstring必填要修改分数的子商户 ID
currency币种string必填币种
score分数变动string必填分数变动量,正数为增加,负数为减少,例如 "100" 或 "-50"
timestamp当前时间戳int必填传调用接口时的时间戳(单位毫秒,有效期十分钟)
sign签名string必填签名算法详见接口说明

响应参数

参数名称类型说明
code响应码int错误码
message响应信息string错误信息
data响应数据dict响应数据详情
--agent_id子商户 IDstring子商户 ID
--currency币种string币种

请求范例

curl --location 'https://staging.aig1234.com/api/agent/score/update' \
--header 'Content-Type: application/json' \
--data '{
"agent_id": "agent001",
"sub_agent_id": "agent002",
"currency": "USD",
"score": "100",
"timestamp": 1732589849000,
"sign": "6d39491fb4195d392dc3d53bf6c88138"
}'

响应范例

{
"code": 200,
"message": "success",
"data": {
"agent_id": "agent002",
"currency": "USD"
}
}

错误码

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