客户管理
查询用户服务记录
根据用户 uid 查询该用户的服务记录。uid 为必填字段,不能为空。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳(秒) | |
| checksum | string | 是 | 请求签名校验和 | |
| checksumAlgorithm | int32 | 否 | 签名算法:0 - 默认(SHA1),1 - SHA256 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| uid | string | 是 | 用户唯一标识 | user_12345 |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| result | object[] | 服务记录列表 | |
| └sessionType | int32 | 会话类型:0-在线,1-呼叫,6-工单 | 0 |
| └id | int64 | 记录 ID | 10001 |
| └status | int32 | 会话状态 | 2 |
| └startTime | int64 | 开始时间(毫秒时间戳) | 1700000000000 |
| └closeTime | int64 | 结束时间(毫秒时间戳) | 1700003600000 |
| └categoryPath | string | 分类路径 | 售前咨询/产品问题 |
| └mobile | string | 用户手机号 | 13800138000 |
| └userName | string | 用户姓名 | 张三 |
| └uid | string | 用户唯一标识(foreignId) | user_12345 |
| └staffName | string | 坐席姓名 | 李四 |
| └satisfactionName | string | 满意度名称 | 满意 |
| └platform | string | 会话平台(在线会话) | web |
| └callNum | string | 呼叫号码(呼叫中心) | 0571-88888888 |
| └recordSrc | string | 录音地址(呼叫中心) | https://record.example.com/123.wav |
| └worksheetCreateTime | int64 | 工单创建时间(毫秒时间戳) | 1700000100000 |
| └workSheetTitle | string | 工单标题 | 售后咨询 |
| └workSheetDealer | string | 工单处理人 | 王五 |
| └workSheetDealGroup | string | 工单处理组 | 售后组 |
| total | int32 | 总记录数 | 10 |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | 请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求体 JSON 格式错误或 uid 缺失 |
| 14500 | 服务内部异常 |
postEndpoint
/openapi/user/service/recordcurl -X POST "https://qiyukf.com/openapi/user/service/record?appKey=string&time=0&checksum=string" \ -H "Content-Type: application/json" \ -d '{ "uid": "user_12345" }'{
"result": [
{
"sessionType": 0,
"id": 10001,
"status": 2,
"startTime": 1700000000000,
"closeTime": 1700003600000,
"categoryPath": "售前咨询/产品问题",
"mobile": "13800138000",
"userName": "张三",
"uid": "user_12345",
"staffName": "李四",
"satisfactionName": "满意",
"platform": "web",
"callNum": "0571-88888888",
"recordSrc": "https://record.example.com/123.wav",
"worksheetCreateTime": 1700000100000,
"workSheetTitle": "售后咨询",
"workSheetDealer": "王五",
"workSheetDealGroup": "售后组"
}
],
"total": 10
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "请求时间戳与服务器时间误差超过 10 分钟"
}{
"code": 14004,
"message": "请求体 JSON 格式错误或 uid 缺失"
}{
"code": 14500,
"message": "服务内部异常"
}这篇文档有帮助吗?