Skip to content

1. 获取信誉分详情

接口地址: /merchantapi/user/score/detail

响应示例:

json
{
  "code": 1,
  "msg": "获取成功",
  "data": {
    "score": 85, // 当前信誉分(展示的为总分)
    "invite_score": 4, // 邀请码加分 (不展示内容)
    "order_score": 81, // 订单加分 (不展示内容)
    "last_deduct_time": 1716537600 // 最后一次扣分时间
  }
}

2. 获取信誉分日志列表

接口地址: /merchantapi/user/score/logList

请求参数:

参数名类型必填说明
typestring记录类型,详见 类型文本
date_rangearray日期范围
pageint页码
limitint每页数量

响应示例:

json
{
  "code": 1,
  "msg": "获取成功",
  "data": {
    "list": [
      {
        "id": 10,
        "user_id": 1004,
        "type": "complaint_timeout", // 类型
        "score": -3, // 负数为扣分
        "before_score": 99, // 变动前的分数
        "after_score": 96, // 变动后的分数
        "remark": "投诉超时未处理,订单号:Q251123c3fe8f", // 变动原因
        "create_at": "2025-11-24 21:30:01", // 创建时间
        "type_text": "投诉超时未处理扣分" // 类型文本
      }
    ],
    "total": 50 // 总条数
  }
}

3. 获取信誉分统计信息

接口地址: /merchantapi/user/score/statistics

响应示例:

json
{
  "code": 1,
  "msg": "获取成功",
  "data": {
    "detail": {
      "score": 96,
      "invite_score": 86,
      "order_score": 10,
      "last_deduct_time": 1763991001
    },
    "add_count": 3, // 时效期内加分次数
    "deduct_count": 3, // 时效期内扣分次数
    "last_add": {
      // 最后一次加分
      "score": 1, // 加分分数
      "remark": "684", // 加分原因
      "create_at": "2025-11-23 21:44:16" // 创建时间
    },
    "last_deduct": {
      // 最后一次扣分
      "score": -3, // 扣分分数
      "remark": "投诉超时未处理,订单号:Q251123c3fe8f", // 扣分原因
      "create_at": "2025-11-24 21:30:01" // 创建时间
    }
  }
}

字段说明:

  • detail: 信誉分详情
  • add_count: 累计加分次数
  • deduct_count: 累计扣分次数
  • last_add: 最近一次加分记录,无则为 null
  • last_deduct: 最近一次扣分记录,无则为 null

4. 获取类型列表

接口地址: /merchantapi/user/score/getTypeList

响应示例:

json
{
  "code": 1,
  "msg": "获取成功",
  "data": [
    {
      "value": "admin_add",
      "label": "管理员加分"
    }
  ]
}

信誉分管理

  • 初始信誉分为 90 分
  • 投诉被退款及没有及时处理退款扣分 ,详情规则见演示站页面