工单系统
查询工单流转日志
按 ticketId 查询工单流转日志。ticketId 缺失、为 0 或工单不存在时均返回工单不存在错误;成功时 data 为工单流转日志列表。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳(秒) | |
| checksum | string | 是 | 请求签名校验和 | |
| checksumAlgorithm | int32 | 否 | 签名算法:0 - 默认(SHA1),1 - SHA256 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| ticketId | int64 | 是 | 工单 ID | 123456 |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 状态码,200 表示成功 | 200 |
| data | object[] | 工单流转日志列表;包含流转时间、操作人、展示文案、附件等信息 | [{"id":567890,"operator":"张三","time":1720087200000,"action":"转交工单"}] |
| └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 | time 缺失,或请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求体不是合法 JSON |
| 14106 | ticketId 缺失、为 0,或当前企业下工单不存在 |
| 14500 | 服务内部异常;请求字段类型不符合要求或服务处理失败 |
postEndpoint
/openapi/v2/ticket/logcurl -X POST "https://qiyukf.com/openapi/v2/ticket/log?appKey=9f1d7c2b8a6e4d3c&time=1739347200&checksum=a1b2c3d4e5f607182930abcdefabcdef&checksumAlgorithm=0" \ -H "Content-Type: application/json" \ -d '{ "ticketId": 123456 }'{
"code": 200,
"data": [
{
"id": 567890,
"operator": "张三",
"time": 1720087200000,
"action": "转交工单"
}
]
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "time 缺失,或请求时间戳与服务器时间误差超过 10 分钟"
}{
"code": 14004,
"message": "请求体不是合法 JSON"
}{
"code": 14106,
"message": "ticketId 缺失、为 0,或当前企业下工单不存在"
}{
"code": 14500,
"message": "服务内部异常;请求字段类型不符合要求或服务处理失败"
}这篇文档有帮助吗?