獲取工單詳情
提供根據工單 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)' \
此代碼塊在浮窗中顯示
路徑參數
| 欄位 | 類型 | 必填 | 描述 |
|---|---|---|---|
| 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
}
}
此代碼塊在浮窗中顯示
響應參數
| 欄位 | 類型 | 必填 | 描述 |
|---|---|---|---|
| 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 | 否 | 聯絡人姓名。 |
| 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 欄位。 |
| 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)。 |










