七鱼开发文档中心
总览服务端 APIWebiOSAndroid鸿蒙Uniapp微信小程序插件三方接入
工单系统

查询访客工单状态

查询指定访客的某张工单当前状态及流转历史。工单 userId 必须与访客匹配,否则视为无效工单返回错误。history=2 时返回最新一条有 comment 的流转记录,history=3 返回全部;默认不含历史。details=true 时追加标题、内容、优先级、分类、关注人、附加属性及附件列表。

请求参数

名称类型必填描述示例值
appKeystring是应用 AppKey
timeint64是请求时间戳(秒)
checksumstring是请求签名校验和
checksumAlgorithmint32否签名算法:0 - 默认(SHA1),1 - SHA256

请求体

名称类型必填描述示例值
uidstring是访客外部 ID(uid)user_3f9a2c8d
sheetIdint64是工单 ID(JSON 字段名:sheetId)123456
historyint32否历史记录范围:1-不含历史(默认),2-最新一条,3-全部1
detailsboolean否是否返回工单详情,默认 falsetrue

返回参数

名称类型描述示例值
codeint32状态码,200 表示成功200
messageobject工单状态数据{"status":10,"history":[{"datetime":"2024-07-04 11:30:00","comment":"客服已受理,正在核实退款进度。"}],"worksheet":{"title":"售后咨询:订单取消后未退款","content":"用户反馈订单取消后 3 个工作日仍未收到退款,请协助核实。","priority":8,"typeId":40001,"typeName":"退款问题","followerIds":"[10003,10004]","properties":"{\"orderId\":\"SO202407010001\",\"channel\":\"wechat\"}","attachments":[{"name":"退款凭证.pdf","size":245760,"url":"https://nos.example.com/ticket/refund-proof.pdf"}]}}
└statusint32工单状态:0-未知,1-已提交,5-未受理,10-受理中,20-完结,25-已驳回,50-已挂起,999-已删除10
└historyobject[]历史流转记录列表(history 参数控制范围)[{"datetime":"2024-07-04 11:30:00","comment":"客服已受理,正在核实退款进度。"}]
└datetimestring操作时间(可读格式)2024-07-04 11:30:00
└commentstring流转备注内容客服已受理,正在核实退款进度。
└worksheetobject工单状态详情(details=true 时返回){"title":"售后咨询:订单取消后未退款","content":"用户反馈订单取消后 3 个工作日仍未收到退款,请协助核实。","priority":8,"typeId":40001,"typeName":"退款问题","followerIds":"[10003,10004]","properties":"{\"orderId\":\"SO202407010001\",\"channel\":\"wechat\"}","attachments":[{"name":"退款凭证.pdf","size":245760,"url":"https://nos.example.com/ticket/refund-proof.pdf"}]}
└titlestring工单标题售后咨询:订单取消后未退款
└contentstring工单内容用户反馈订单取消后 3 个工作日仍未收到退款,请协助核实。
└priorityint32优先级:2-低,5-一般,8-紧急,10-非常紧急8
└typeIdint64分类ID40001
└typeNamestring分类名称退款问题
└followerIdsstring关注人ID列表(JSON 字符串)[10003,10004]
└propertiesstring附加属性(JSON 字符串){"orderId":"SO202407010001","channel":"wechat"}
└attachmentsobject[]附件列表[{"name":"退款凭证.pdf","size":245760,"url":"https://nos.example.com/ticket/refund-proof.pdf"}]
└namestring附件文件名退款凭证.pdf
└sizeint64附件大小(字节)245760
└urlstring附件下载地址https://nos.example.com/ticket/refund-proof.pdf

错误码

状态码描述
14004uid 或 sheetId 为空;请求体 JSON 格式错误
14105uid 对应访客不存在
14106工单不存在或不属于该访客
14500服务内部异常
16001企业工单服务不可用
postEndpoint
/openapi/v2/ticket/status
POST
/openapi/v2/ticket/status
curl -X POST "https://qiyukf.com/openapi/v2/ticket/status?appKey=string&time=0&checksum=string" \  -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": 8,
      "typeId": 40001,
      "typeName": "退款问题",
      "followerIds": "[10003,10004]",
      "properties": "{\"orderId\":\"SO202407010001\",\"channel\":\"wechat\"}",
      "attachments": [
        {
          "name": "退款凭证.pdf",
          "size": 245760,
          "url": "https://nos.example.com/ticket/refund-proof.pdf"
        }
      ]
    }
  }
}
{
  "code": 14004,
  "message": "uid 或 sheetId 为空;请求体 JSON 格式错误"
}
{
  "code": 14105,
  "message": "uid 对应访客不存在"
}
{
  "code": 14106,
  "message": "工单不存在或不属于该访客"
}
{
  "code": 14500,
  "message": "服务内部异常"
}
{
  "code": 16001,
  "message": "企业工单服务不可用"
}

这篇文档有帮助吗?