获取工单详情

提供根据工单ID查询获取工单详情的功能.

请求方式

GET

调用地址

https://livedesk-api.engagelab.com/v2/accounts/tickets/:ticket_id

调用验证

详情参见 API 概述的鉴权方式说明。

请求

请求示例

curl -X GET 'https://livedesk-api.engagelab.com/v2/accounts/tickets/:ticket_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Basic base64(api_key:api_secret)' \
              
              curl -X GET 'https://livedesk-api.engagelab.com/v2/accounts/tickets/:ticket_id' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \

            
This code block in the floating window

路径参数

字段 类型 必填 描述
ticket_id String 工单ID。

响应示例

{ "code": 0, "message": "Success", "data": { "ticket_id": "tk_20251104_789abc", "title": "打印机卡纸,无法打印", "description": "客户反映A4纸卡在出纸口,急需处理。", "attachments": [ { "file_url": "https://example.com/files/error.jpg" } ], "status": "open", "priority": "high", "ticket_type": "incident", "requester": { "euid": "contact_12345", "name": "张三", "email": "zhangsan@example.com", "phone": "+8613900000000", "channel_contacts": { "channel_id": "inbox_100", "contact_id": "-1001234567890", "sub_contact_id": "23232323", "followers": ["u_12345", "u_67890"] } }, "submitter": { "id": "u_99999" }, "assignment_team": { "id": 5, "name": "IT支持" }, "custom_fields": { "device_sn": "PRN-2024-001" }, "conversation_list": [ { "message_id": "msg_20251104_001", "sender": { "id": "u_12345", "type": "internal_member", "name": "客服小李" }, "content": "我们已收到你的反馈,正在处理。", "content_type": "text", "attachments": [ { "file_type": "image/jpeg", "file_url": "https://example.com/files/progress.jpg" }, { "file_type": "application/pdf", "file_url": "https://example.com/files/report.pdf" } ], "sent_at": "2025-11-19T05:55:25Z", "is_internal": false } ], "status_changes": [ { "to_status": "in_progress", "changed_at": "2025-11-04T09:25:00+08:00", "changed_by_type": "user", "changed_by_id": "u_12345" }, { "to_status": "resolved", "changed_at": "2025-11-04T10:30:00+08:00", "changed_by_type": "system" } ], "tags": ["printer", "hardware"], "sla": { "first_response_due": "2025-11-04T10:00:00+08:00", "resolution_due": "2025-11-05T18:00:00+08:00", "first_response_at": "2025-11-04T09:20:00+08:00", "breached": false }, "followers": [ {"id": "u_12345"}, {"id": "u_67890"} ], "satisfactions": { "rating": 5, "feedback": "处理很快", "submitted_at": "2025-11-05T09:20:00+08:00" }, "created_at": "2025-11-04T09:15:22+08:00", "updated_at": "2025-11-04T09:18:45+08:00", "resolved_at": null, "closed_at": null } }
              
              {
  "code": 0,
  "message": "Success",
  "data": {
    "ticket_id": "tk_20251104_789abc",
    "title": "打印机卡纸,无法打印",
    "description": "客户反映A4纸卡在出纸口,急需处理。",
    "attachments": [
      {
        "file_url": "https://example.com/files/error.jpg"
      }
    ],
    "status": "open",
    "priority": "high",
    "ticket_type": "incident",
    "requester": {
      "euid": "contact_12345",
      "name": "张三",
      "email": "zhangsan@example.com",
      "phone": "+8613900000000",
      "channel_contacts": {
        "channel_id": "inbox_100",
        "contact_id": "-1001234567890",
        "sub_contact_id": "23232323",
        "followers": ["u_12345", "u_67890"]
      }
    },
    "submitter": {
      "id": "u_99999"
    },
    "assignment_team": {
      "id": 5,
      "name": "IT支持"
    },
    "custom_fields": {
      "device_sn": "PRN-2024-001"
    },
    "conversation_list": [
      {
        "message_id": "msg_20251104_001",
        "sender": {
          "id": "u_12345",
          "type": "internal_member",
          "name": "客服小李"
        },
        "content": "我们已收到你的反馈,正在处理。",
        "content_type": "text",
        "attachments": [
          {
            "file_type": "image/jpeg",
            "file_url": "https://example.com/files/progress.jpg"
          },
          {
            "file_type": "application/pdf",
            "file_url": "https://example.com/files/report.pdf"
          }
        ],
        "sent_at": "2025-11-19T05:55:25Z",
        "is_internal": false
      }
    ],
    "status_changes": [
      {
        "to_status": "in_progress",
        "changed_at": "2025-11-04T09:25:00+08:00",
        "changed_by_type": "user",
        "changed_by_id": "u_12345"
      },
      {
        "to_status": "resolved",
        "changed_at": "2025-11-04T10:30:00+08:00",
        "changed_by_type": "system"
      }
    ],
    "tags": ["printer", "hardware"],
    "sla": {
      "first_response_due": "2025-11-04T10:00:00+08:00",
      "resolution_due": "2025-11-05T18:00:00+08:00",
      "first_response_at": "2025-11-04T09:20:00+08:00",
      "breached": false
    },
    "followers": [
      {"id": "u_12345"},
      {"id": "u_67890"}
    ],
    "satisfactions": {
      "rating": 5,
      "feedback": "处理很快",
      "submitted_at": "2025-11-05T09:20:00+08:00"
    },
    "created_at": "2025-11-04T09:15:22+08:00",
    "updated_at": "2025-11-04T09:18:45+08:00",
    "resolved_at": null,
    "closed_at": null
  }
}

            
This code block in the floating window

响应参数

字段 类型 必填 描述
ticket_id String 工单唯一ID。
title String 工单标题。
description String 工单详细描述(支持 Markdown)。
attachments Array 工单级附件列表。
file_name String 文件名。
file_type String MIME。
file_url String 文件地址。
file_size String 大小。
status String 工单状态:open/in_progress/resolved/closed 等。
priority String 优先级:low/medium/high/urgent。
ticket_type String 工单类型:incident/question/problem/task。
requester Object 请求者信息。
euid String 联系人唯一ID。
name String 联系人姓名。
email String 联系人邮件。
phone String 联系人手机号。
channel_contacts Object 渠道联系人映射(与 euid 至少存在一个)。
channel_id String 渠道ID。
contact_id String 渠道联系人ID(如TG 的 chat_id)。
sub_contact_id String 渠道子联系人ID(如 TG 的 topic_id / Email thread_id)。
followers Array 关注者ID信息(用于渠道内推送/通知),包含id和name字段。
  • id: 关注者ID。
  • name: 关注者名称。
  • submitter Object 提交人工单的内部成员。
    id String 提交者用户 ID 。
    assignment_team Object 分配团队信息。
    id Integer 团队 ID 。
    name String 团队名称。
    custom_fields Object 自定义字段(如设备序列号、订单号等)。
    device_sn String 设备列号。
    conversation_list Array 工单内所有消息历史。
    message_id String 消息唯一 ID。
    sender Object 发送者信息。
    id String 发送者 ID 。
    type String 发送者类型:internal_member/system/bot。
    name String 发送者名称。
    content String 消息文本内容。
    content_type String 内容类型:text/image/file/audio/video。
    attachments Array 消息附件列表。
    file_type String MIME类型。
    file_url String 文件地址。
    sent_at String 发送时间(ISO8601。
    is_internal boolean 是否为内部消息(客户不可见)。
    status_changes Array 工单状态变更记录。
    to_status String 变更后的状态(open/resolved 或自定义代码)。
    changed_at String 变更时间(ISO8601)。
    changed_by_type String 变更来源:user/system/bot。
    changed_by_id String 当 changed_by_type 为 user 时返回。
    tags Array 工单标签。
    sla Object SLA 服务水平协议信息。
    first_response_due String 首响截止时间。
    resolution_due String 解决截止时间。
    first_response_at String 实际首响时间。
    breached boolean 是否违约。
    followers Array 关注者列表。
    satisfactions Object 满意度调查结果。
    rating Integer 评分 1-5 。
    feedback String 文字反馈。
    submitted_at String 提交时间 。
    created_at String 工单创建时间(ISO8601)。
    updated_at String 工单最后更新时间。
    resolved_at String 解决时间(未解决为 null)。
    closed_at String 关闭时间(未关闭为 null)。
    icon
    Contact Sales