跳至主要內容

客服号查询相关接口

大约 5 分钟

客服号查询相关接口

查询在线的坐席(客服号)

  • 类型

    API

  • URI

    /group-dispatch-api/user/queryUserStatus

  • 请求方式

    POST、Content-Type: application/json

  • 接口说明

    查询在线的坐席以及客服号

  • 请求参数说明

字段类型是否必填备注
userIdint坐席 id(不填默认查询所有的坐席)
userNameString坐席登录账号(不填默认查询所有的坐席)
sourceint来源 1、pc 2、移动端

请求示例:

{
  "userId": 12,
  "source": 2,
  "userName": ""
}
  • 响应参数说明

    参数名类型是否必填备注
    codeint状态码
    messageString描述
    dataList数据

    data 响应参数说明

    参数名类型是否必填备注
    userIdint坐席 id
    agentAccountString坐席账号
    whatsAppListList客服号列表

    whatsAppList 响应参数说明

    参数名类型是否必填备注
    whatsAppStringwhatsApp
    nameString昵称
  • 响应示例

{
  "data": [
    {
      "userId": 12,
      "agentAccount": "u1",
      "whatsAppList": [
        {
          "whatsApp": "861821371272",
          "name": "jack"
        }
      ]
    }
  ],
  "code": 200,
  "message": "success"
}

查询所有在线的坐席+客服号

  • 类型

    API

  • URI

    /group-dispatch-api/user/queryAllOlWhatsAppInfo

  • 请求方式

    POST、Content-Type: application/json

  • 接口说明

    查询在线的坐席以及客服号

  • 响应参数说明

    参数名类型备注
    codeint状态码
    messageString描述
    datalist数据

    data 响应参数说明

    参数名类型备注
    sourceString来源 1、pc 2、mobile
    listString坐席客服号数据

    list 响应参数说明

    参数名类型备注
    agentAccountString坐席账号
    userNameString坐席名称
    whatsAppListlist客服号列表

    whatsAppList 响应参数说明

    参数名类型备注
    whatsAppStringwhatsapp 账号
    nameString客服号昵称
  • 响应示例

{
  "code": 200,
  "message": "Success ",
  "data": [
    {
      "source": 1,
      "list": [
        {
          "agentAccount": "202503101",
          "userName": "202503101",
          "whatsAppList": [
            {
              "whatsApp": "8618217331413",
              "name": "chen"
            }
          ],
          "userId": 868024
        }
      ]
    },
    {
      "source": 2,
      "list": []
    }
  ]
}

查询指定的客服号在线信息

  • 类型

    API

  • URI

    /group-dispatch-api/user/queryWhatsAppInfo

  • 请求方式

    POST、Content-Type: application/json

  • 接口说明

    查询指定的客服号在线信息

  • 请求参数说明

字段类型是否必填备注
whatsappintwhatsapp 账号

请求示例:

{
  "whatsapp": 8618217331412
}
  • 响应参数说明

    参数名类型备注
    codeint状态码
    messageString描述
    dataList数据

    data 响应参数说明

    参数名类型备注
    userIdint坐席 id
    agentAccountString坐席账号
    whatsAppStringwhatsapp 号
    statusint状态 10 在线 20 掉线 30 离线 40 封号
    sourceint1、pc 2、mobile
  • 响应示例

{
  "code": 200,
  "message": "Success ",
  "data": {
    "agentAccount": "202503101",
    "whatsApp": "8618217331411",
    "source": 1,
    "userId": "868024",
    "status": "10"
  }
}

查询坐席(客服号)在线状态日志

  • 类型

    API

  • URI

    /group-dispatch-api/user/queryUserStatusLog

  • 请求方式

    POST、Content-Type: application/json

  • 接口说明

    查询坐席(客服号)在线状态日志(最近 50 条)

  • 请求参数说明

字段类型是否必填备注
agentAccountString坐席账号(不填默认查询所有的坐席)
whatsAppString客服号
sourceint来源(1pc 2 移动端)

请求示例:

{
  "agentAccount": "",
  "whatsApp": "573125704139",
  "source": 2
}
  • 响应参数说明

    参数名类型是否必填备注
    codeint状态码
    messageString描述
    dataList数据

    data 响应参数说明

    参数名类型是否必填备注
    userIdint坐席 id
    agentAccountString坐席账号
    whatsAppListList客服号列表 (最多 50 条)

    whatsAppList 响应参数说明

    参数名类型是否必填备注
    whatsAppStringwhatsApp
    nameString昵称
    statusint状态 10 在线 20 掉线 30 离线 40 封号
    sourceint来源(1pc 2 移动端)
    countryCodeString国家
    detailStatusint行为类型
    createTimeint创建时间

行为类型 code 对照

code描述
11PC 扫码登录
12PC 上线
13手机上线
21PC 掉线
22手机掉线
31PC 关闭客服号下线
32PC 关闭客户端下线
33PC 触发监控下线
34手机删除下线
35手机主动退出下线
36手机触发监控下线
37手机异常下线
41PC 封号
42手机封号
43系统标记永久封号
  • 响应示例
{
  "code": 200,
  "message": "Success",
  "data": [
    {
      "userId": 621443,
      "agentAccount": "lsl001",
      "whatsAppList": [
        {
          "whatsApp": "573125704139",
          "name": "",
          "status": 20,
          "source": 2,
          "countryCode": "哥伦比亚",
          "detailStatus": 42,
          "createTime": "2024-07-08 19:25:31"
        }
      ]
    }
  ]
}

查询坐席最近上线的客服号状态(最近十条)

  • 类型

    API

  • URI

    /group-dispatch-api/user/getLatestOnlineWhatsAccount

  • 请求方式

    POST、Content-Type: application/json

  • 接口说明

    查询坐席最近上线的客服号状态(最近十条)

  • 请求参数说明

字段类型是否必填备注
userIdint坐席 id(不填默认查询所有的坐席)
sourceint来源(1pc 2 移动端)

请求示例:

{
  "userId": 621443,
  "source": 1
}
  • 响应参数说明

    参数名类型是否必填备注
    codeint状态码
    messageString描述
    dataList数据

    data 响应参数说明

    参数名类型是否必填备注
    userIdint坐席 id
    agentAccountString坐席账号
    whatsAppListList客服号列表

    whatsAppList 响应参数说明

    参数名类型是否必填备注
    whatsAppStringwhatsApp
    nameString昵称
    statusint状态 10 在线 20 掉线 30 离线 40 封号
  • 响应示例

{
  "code": 200,
  "message": "Success ",
  "data": [
    {
      "agentAccount": "lsl001",
      "whatsAppList": [
        {
          "whatsApp": "234567892",
          "name": "zhang",
          "status": 10
        }
      ],
      "userId": 621443
    }
  ]
}

查询客服号最新状态

  • 类型

    API

  • URI

    /wscrm-bus-api/whatsapp/queryWhatsappStatus

  • 请求方式

    POST、Content-Type: application/json

  • 接口说明

    查询客服号最新状态

  • 请求参数说明

字段类型是否必填备注
whatsAppString客服号
  • 请求示例:
{
  "whatsApp": "8218132718231"
}
  • 响应参数说明

    参数名类型是否必填备注
    codeint状态码
    messageString描述
    dataObject数据
  • data 参数说明

    参数名类型是否必填备注
    statusint状态 0、离线 1、在线 2、封号
  • 响应示例
{
  "data": {
    "status": 1
  },
  "code": 200,
  "message": "success"
}
上次编辑于:
贡献者: kubrick,zhuang