在线系统数据接口
客服工作量统计
查询客服工作量统计数据,支持按客服组或客服筛选。时间范围不超过 31 天(可配置),默认查询近 30 天。model 参数:1-全部、2-按客服组、3-按客服。pageSize 上限 1000(可配置)。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳(秒) | |
| checksum | string | 是 | 请求签名校验和 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| model | int64 | 否 | 查询模式:1-全部、2-按客服组、3-按客服 | 1 |
| startTime | int64 | 否 | 开始时间(毫秒时间戳),不传默认 30 天前 | 1685548800000 |
| endTime | int64 | 否 | 结束时间(毫秒时间戳),不传默认昨天 23:59:59 | 1688140799000 |
| staffGroupList | int64[] | 否 | 客服组 ID 列表(model=2 时有效) | |
| staffIdList | int64[] | 否 | 客服 ID 列表(model=3 时有效) | |
| page | int32 | 否 | 页码,从 1 开始 | 1 |
| pageSize | int32 | 否 | 每页条数,上限 1000(可配置) | 100 |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 状态码,200 表示成功 | 200 |
| message | object | 客服工作量统计分页数据 | |
| └total | int32 | 符合条件的记录总数 | 150 |
| └result | object[] | 客服工作量统计记录列表 | |
| └id | int64 | 客服 ID | 10001 |
| └name | string | 客服姓名 | 张三 |
| └account | string | 客服账户 | agent01@example.com |
| └date | int64 | 统计日期,毫秒时间戳 | 1685548800000 |
| └totalSessionCount | int64 | 会话总量 | 10 |
| └sessionsCount | int64 | 接入会话量 | 10 |
| └initiativeSessionsCount | int64 | 客服主动发起会话量 | 10 |
| └redirectSessionsCount | int64 | 转接会话量 | 10 |
| └validSessionCount | int64 | 有效会话量 | 10 |
| └uselessSessionsCount | int64 | 无效会话量 | 10 |
| └noReplySessionsCount | int64 | 未回复会话量 | 10 |
| └noReplyRatio | double | 未回复会话占比 | 0.85 |
| └messageDealCount | int64 | 处理消息量 | 10 |
| └preQueueCount | int64 | 进入排队的会话量 | 10 |
| └robotHostingSessionCount | int64 | 机器人托管会话量 | 10 |
| └avgRobotHostingDuration | int64 | 平均机器人托管时长 |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | 请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求体 JSON 格式错误或参数缺失 |
| 14500 | 服务内部异常 |
| 14501 | 时间范围超过限制(>31 天);结束时间不合法 |
postEndpoint
/openapi/statistic/staffworklodcurl -X POST "https://qiyukf.com/openapi/statistic/staffworklod?appKey=string&time=1739347200&checksum=a1b2c3d4e5f607182930abcdefabcdef" \ -H "Content-Type: application/json" \ -d '{}'{
"code": 200,
"message": {
"total": 150,
"result": [
{
"id": 10001,
"name": "张三",
"account": "agent01@example.com",
"date": 1685548800000,
"totalSessionCount": 10,
"sessionsCount": 10,
"initiativeSessionsCount": 10,
"redirectSessionsCount": 10,
"validSessionCount": 10,
"uselessSessionsCount": 10,
"noReplySessionsCount": 10,
"noReplyRatio": 0.85,
"messageDealCount": 10,
"preQueueCount": 10,
"robotHostingSessionCount": 10,
"avgRobotHostingDuration": 0
}
]
}
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "请求时间戳与服务器时间误差超过 10 分钟"
}{
"code": 14004,
"message": "请求体 JSON 格式错误或参数缺失"
}{
"code": 14500,
"message": "服务内部异常"
}{
"code": 14501,
"message": "时间范围超过限制(>31 天);结束时间不合法"
}这篇文档有帮助吗?
客服质量统计
查询客服质量统计数据,支持按客服组或客服筛选。时间范围不超过 31 天(可配置),默认查询近 30 天。model 参数:1-全部、2-按客服组、3-按客服。pageSize 上限 1000(可配置)。
查询会话导出文件
使用 `/openapi/export/session` 或 `/openapi/export/session/v1` 返回的 key 查询会话导出文件地址。 - 请求体格式为 `{"key":"创建任务接口返回的值"}`;key 可为 8 位 token 或数字下载任务 ID。 - 本接口不受凌晨导出时间窗口限制,但仍校验签名、IP 白名单和企业白名单。 - 文件未生成时返回 14520,message 为 `Wait...`,请稍后重试;生成完成后返回 200,message 为文件下载 URL。 - 8 位 token 对应的旧下载链路返回加密 ZIP,下载链接有效期为 6 小时,解压密码为当前企业 appKey 的前 12 个字符,压缩包内包含 session.txt 和 message.txt。若 key 为数字下载任务 ID,文件格式及密码规则以企业当前下载任务配置和实际返回文件为准。