系统设置操作日志
查询操作日志
按时间范围和类型查询企业或工单操作日志。logType 支持 company 或 ticket,startTime 和 endTime 为秒级时间戳,时间范围默认不超过 7 天,offset 和 pageSize 必须大于等于 0。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳(秒) | |
| checksum | string | 是 | 请求签名校验和 | |
| checksumAlgorithm | int32 | 否 | 签名算法:0 - 默认(SHA1),1 - SHA256 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| logType | string | 是 | 日志类型:company-企业日志、ticket-工单日志 | ticket |
| startTime | int64 | 是 | 开始时间(秒级时间戳) | 1699776000 |
| endTime | int64 | 是 | 结束时间(秒级时间戳) | 1700380800 |
| offset | int64 | 否 | 偏移量 | 0 |
| pageSize | int64 | 否 | 每页数量 | 10 |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 状态码,200 表示成功 | 200 |
| message | string | 提示信息 | success |
| data | object | 操作日志数据 | {"total":1,"ticketLogs":[{"ticketId":123456,"history":[{"operator":"张三","action":"转交工单"}]}]} |
| └total | int64 | 总条数 | 150 |
| └companyLogs | object[] | 企业操作日志列表(logType=company 时有值) | [{"id":88001,"operator":"张三","action":"修改工单状态","time":1699776000000}] |
| └id | int64 | 日志 ID | 88001 |
| └operator | string | 操作人姓名 | 张三 |
| └operatorId | int64 | 操作人 ID | 10001 |
| └action | string | 操作动作描述 | 修改工单状态 |
| └time | int64 | 操作时间(毫秒时间戳) | 1699776000000 |
| └opObject | string | 操作对象描述 | 工单#123456 |
| └ip | string | 操作人 IP 地址 | 192.168.1.100 |
| └ticketLogs | object[] | 工单操作日志列表(logType=ticket 时有值) | [{"ticketId":123456,"history":[{"id":567890,"operator":"张三","action":"转交工单"}]}] |
| └ticketId | int64 | 工单 ID | 123456 |
| └history | object[] | 工单流转历史记录列表 | [{"id":567890,"operator":"张三","action":"转交工单","time":1720087200000}] |
| └operator | string | 操作人名称 | 张三 |
| └operatorId | int64 | 操作人坐席 ID | 10001 |
| └time | int64 | 操作时间,毫秒时间戳 | 1720087200000 |
| └action | string | 操作名称 | 转交工单 |
| └actionType | int32 | 操作类型编码 | 10 |
| └actionLang | string | 操作名称的多语言文案 | Transfer ticket |
| └replyMail | string | 邮件回复内容 | 退款已处理,请注意查收。 |
| └id | int64 | 流转记录 ID | 567890 |
| └info | object[] | 字段变更及流转内容列表 | [{"title":"工单状态","content":"待处理 → 处理中"}] |
| └title | string | 流转内容标题 | 工单状态 |
| └titleLang | string | 多语言标题 | Ticket status |
| └content | string | 流转内容 | 待处理 → 处理中 |
| └fieldType | int32 | 字段类型 | 1 |
| └customFieldFrom | int32 | 自定义字段来源 | 0 |
| └formTitle | string | 表单标题 | 售后处理表单 |
| └changeLog | string | 字段变更日志 | 处理人由张三变更为李四 |
| └attachments | object[] | 流转附件列表 | [{"id":70001,"name":"退款凭证.pdf","size":245760}] |
| └id | int64 | 附件 ID | 70001 |
| └name | string | 附件文件名 | 退款凭证.pdf |
| └size | int64 | 附件大小,单位字节 | 245760 |
| └url | string | 附件下载地址 | https://nos.example.com/ticket/refund-proof.pdf |
| └type | int32 | 附件类型 | 1 |
| └corpName | string | 操作人所属企业名称 | 某科技有限公司 |
| └operatorCorpId | int64 | 操作人所属企业 ID | 1000 |
| └worksheetMailBoo | boolean | 是否为工单邮件操作 | true |
| └customerSee | boolean | 该流转记录是否对客户可见 | true |
| └appendFields | object[] | 本次追加的工单字段 | [{"name":"订单号","value":"SO202608090001"}] |
| └typename | string | 字段类型名称 | text |
| └name | string | 字段名称 | 订单号 |
| └langName | string | 字段多语言名称 | Order number |
| └value | string | 字段值 | SO202608090001 |
| └required | int32 | 是否必填:0-否、1-是 | 1 |
| └sort | int32 | 字段排序序号 | 1 |
| └id | int32 | 字段 ID | 10 |
| └customFieldId | int64 | 自定义字段定义 ID | 81001 |
| └candel | int32 | 是否允许删除 | 1 |
| └type | int32 | 字段类型编码 | 0 |
| └status | int32 | 字段状态 | 1 |
| └description | string | 字段说明 | 客户订单编号 |
| └autoGuide | string | 自动引导文案 | 请输入订单号 |
| └pinyin | string | 字段名称拼音 | dingdanhao |
| └isDefault | int32 | 是否为默认字段:0-否、1-是 | 0 |
| └prefill | string | 预填值 | 默认值 |
| └hint | string | 输入提示 | 请输入订单号 |
| └customer | int32 | 是否允许客户填写:0-否、1-是 | 1 |
| └staffVisible | int32 | 坐席是否可见 | 1 |
| └staffEditable | int32 | 坐席是否可编辑,旧版字段 | 1 |
| └staffVisibleType | int32 | 坐席可见范围类型 | 1 |
| └visibleStaffs | object[] | 可见坐席或客服组列表 | [{"label":"售后组","key":"20001","type":1}] |
| └label | string | 对象显示名称 | 售后组 |
| └key | string | 对象唯一标识 | 20001 |
| └type | int32 | 对象类型 | 1 |
| └editableStaffs | object[] | 可编辑坐席或客服组列表,旧版字段 | [{"label":"售后组","key":"20001","type":1}] |
| └label | string | 对象显示名称 | 售后组 |
| └key | string | 对象唯一标识 | 20001 |
| └type | int32 | 对象类型 | 1 |
| └staffEditableV2 | int32 | 坐席是否可编辑,V2 字段 | 1 |
| └staffEditableTypeV2 | int32 | 坐席可编辑范围类型,V2 字段 | 1 |
| └editableStaffsV2 | object[] | 可编辑坐席或客服组列表,V2 字段 | [{"label":"售后组","key":"20001","type":1}] |
| └label | string | 对象显示名称 | 售后组 |
| └key | string | 对象唯一标识 | 20001 |
| └type | int32 | 对象类型 | 1 |
| └extId | int64 | 外部字段 ID | 90001 |
| └fieldTip | string | 字段填写提示 | 订单号可在订单详情页查看 |
| └special | int32 | 特殊字段标识 | 0 |
| └preValue | string | 变更前字段值 | SO202608080001 |
| └fileExtConfig | int32 | 文件扩展名配置开关 | 1 |
| └fileExtType | string[] | 允许的文件扩展名列表 | ["pdf","jpg"] |
| └hasViewPermission | int32 | 当前调用方是否拥有查看权限 | 1 |
| └aigcExtractSwitch | int32 | AIGC 字段提取开关 | 1 |
| └aigcExtractRemark | string | AIGC 字段提取说明 | 从会话中提取订单号 |
| └isEditor | int32 | 是否为编辑操作 | 1 |
| └sender | string | 邮件发件人 | support@example.com |
| └toMailList | object[] | 邮件收件人列表 | [{"nickName":"张三","address":"zhangsan@example.com"}] |
| └nickName | string | 联系人昵称 | 七鱼售后 |
| └address | string | 联系人邮箱地址 | support@example.com |
| └ccList | object[] | 邮件抄送人列表 | [{"nickName":"财务","address":"finance@example.com"}] |
| └nickName | string | 联系人昵称 | 七鱼售后 |
| └address | string | 联系人邮箱地址 | support@example.com |
| └bccList | object[] | 邮件密送人列表 | [{"nickName":"主管","address":"manager@example.com"}] |
| └nickName | string | 联系人昵称 | 七鱼售后 |
| └address | string | 联系人邮箱地址 | support@example.com |
| └subject | string | 邮件主题 | Re: 订单退款咨询 |
| └socialFrom | string | 社交媒体来源账号 | weibo_user_001 |
| └socialTo | string | 社交媒体目标账号 | qiyu_service |
| └holderPlatform | string | 当前处理方平台 | qiyu |
| └imLink | string | 关联即时通信链接 | https://example.com/im/session/123 |
| └targetStaff | string | 目标处理人 | 李四 |
| └targetPersons | string[] | 目标处理人列表 | ["李四","王五"] |
| └targetGroup | string | 目标客服组 | 售后组 |
| └nodeName | string | 当前流程节点名称 | 售后处理 |
| └remark | string | 操作备注 | 转交售后组继续处理 |
| └planText | string | 计划任务内容 | 明日回访客户 |
| └planTime | string | 计划执行时间 | 2026-08-10 10:00:00 |
| └planAttachName | string | 计划任务附件名称 | 回访清单.xlsx |
| └creator | string | 工单创建人 | 张三 |
| └preHolder | string | 变更前处理人 | 王五 |
| └signType | string | 会签类型 | AND |
| └andSignType | int32 | 加签类型 | 1 |
| └targetNodeName | string | 目标流程节点名称 | 财务审核 |
| └isIntelligentEvaluation | int32 | 是否为智能评价操作:0-否、1-是 | 1 |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | 请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求体 JSON 格式错误;参数缺失;无效的 logType;无效的时间范围;无效的 offset 或 limit |
| 14500 | 服务内部异常 |
postEndpoint
/openapi/system/queryOperationLogcurl -X POST "https://qiyukf.com/openapi/system/queryOperationLog?appKey=string&time=0&checksum=string" \ -H "Content-Type: application/json" \ -d '{ "logType": "ticket", "startTime": 1699776000, "endTime": 1700380800 }'{
"code": 200,
"message": "success",
"data": {
"total": 1,
"ticketLogs": [
{
"ticketId": 123456,
"history": [
{
"operator": "张三",
"action": "转交工单"
}
]
}
]
}
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "请求时间戳与服务器时间误差超过 10 分钟"
}{
"code": 14004,
"message": "请求体 JSON 格式错误;参数缺失;无效的 logType;无效的时间范围;无效的 offset 或 limit"
}{
"code": 14500,
"message": "服务内部异常"
}这篇文档有帮助吗?