工单系统旧版
查询访客工单状态
按 uid 和 sheetId 查询访客自己的工单状态。history=1 不返回历史(默认),history=2 返回最新一条,history=3 返回全部带备注的流转记录;details=true 时返回标题、内容、优先级、分类、关注人、属性和创建附件。
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | |
| time | int64 | 是 | 请求时间戳(秒) | |
| checksum | string | 是 | 请求签名校验和 | |
| checksumAlgorithm | int32 | 否 | 签名算法:0 - 默认(SHA1),1 - SHA256 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| uid | string | 是 | 访客外部 ID(uid) | user_3f9a2c8d |
| sheetId | int64 | 是 | 工单 ID(JSON 字段名 sheetId) | 123456 |
| history | int32 | 否 | 历史记录范围:1-不含历史(默认),2-最新一条,3-全部;其他值按 1 处理 | 2 |
| details | boolean | 否 | 是否返回工单详情,默认 false | true |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 状态码,200 表示成功 | 200 |
| message | object | 工单状态数据 | {"status":10,"history":[{"datetime":"2024-07-04 11:30:00","comment":"客服已受理,正在核实退款进度。"}],"worksheet":{"title":"售后咨询:订单取消后未退款","content":"用户反馈订单取消后 3 个工作日仍未收到退款,请协助核实。","priority":5,"typeId":40001,"typeName":"退款问题","followerIds":"[10003,10004]","properties":"{\"orderId\":\"SO202407010001\"}","attachments":[{"name":"退款凭证.pdf","url":"https://example.com/refund-proof.pdf","size":245760}]}} |
| └status | int32 | 工单状态:0-未知,1-已提交,5-未受理,10-受理中,20-完结,25-已驳回,50-已挂起,999-已删除 | 10 |
| └history | object[] | 历史流转记录列表,由 history 参数控制范围 | [{"datetime":"2026-08-09 14:30:00","comment":"客服已受理"}] |
| └datetime | string | 操作时间(可读格式) | 2024-07-04 11:30:00 |
| └comment | string | 流转备注内容 | 客服已受理,正在核实退款进度。 |
| └worksheet | object | 工单状态详情(details=true 时返回) | {"title":"退款咨询","content":"退款尚未到账","priority":5} |
| └title | string | 工单标题 | 售后咨询:订单取消后未退款 |
| └content | string | 工单内容 | 用户反馈订单取消后 3 个工作日仍未收到退款,请协助核实。 |
| └priority | int32 | 优先级:2-低,5-一般,8-紧急,10-非常紧急 | 5 |
| └typeId | int64 | 分类 ID | 40001 |
| └typeName | string | 分类名称;仅 typeId 存在且分类仍可查询到时返回 | 退款问题 |
| └followerIds | string | 关注人 ID 列表 | [10003,10004] |
| └properties | string | 附加属性 JSON 字符串 | {"orderId":"SO202407010001","channel":"wechat"} |
| └attachments | object[] | 创建时附件列表 | [{"name":"退款凭证.pdf","url":"https://example.com/refund-proof.pdf","size":245760}] |
| └name | string | 附件文件名 | 退款凭证.pdf |
| └url | string | 附件 URL | https://example.com/refund-proof.pdf |
| └size | int64 | 附件大小,单位字节 | 245760 |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 不存在 |
| 14002 | checksum 校验失败 |
| 14003 | time 缺失,或请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求体不是合法 JSON;或 uid/sheetId 缺失 |
| 14105 | uid 对应访客不存在 |
| 14106 | sheetId 缺失、非正数、工单不存在或工单不属于该访客 |
| 14500 | 服务内部异常;请求字段类型不符合要求或服务处理失败 |
| 16001 | 企业工单服务不可用 |
postEndpoint
/openapi/worksheet/statuscurl -X POST "https://qiyukf.com/openapi/worksheet/status?appKey=9f1d7c2b8a6e4d3c&time=1739347200&checksum=a1b2c3d4e5f607182930abcdefabcdef&checksumAlgorithm=0" \ -H "Content-Type: application/json" \ -d '{ "uid": "user_3f9a2c8d", "sheetId": 123456 }'{
"code": 200,
"message": {
"status": 10,
"history": [
{
"datetime": "2024-07-04 11:30:00",
"comment": "客服已受理,正在核实退款进度。"
}
],
"worksheet": {
"title": "售后咨询:订单取消后未退款",
"content": "用户反馈订单取消后 3 个工作日仍未收到退款,请协助核实。",
"priority": 5,
"typeId": 40001,
"typeName": "退款问题",
"followerIds": "[10003,10004]",
"properties": "{\"orderId\":\"SO202407010001\"}",
"attachments": [
{
"name": "退款凭证.pdf",
"url": "https://example.com/refund-proof.pdf",
"size": 245760
}
]
}
}
}{
"code": 14001,
"message": "AppKey 不存在"
}{
"code": 14002,
"message": "checksum 校验失败"
}{
"code": 14003,
"message": "time 缺失,或请求时间戳与服务器时间误差超过 10 分钟"
}{
"code": 14004,
"message": "请求体不是合法 JSON;或 uid/sheetId 缺失"
}{
"code": 14105,
"message": "uid 对应访客不存在"
}{
"code": 14106,
"message": "sheetId 缺失、非正数、工单不存在或工单不属于该访客"
}{
"code": 14500,
"message": "服务内部异常;请求字段类型不符合要求或服务处理失败"
}{
"code": 16001,
"message": "企业工单服务不可用"
}这篇文档有帮助吗?