รับรายละเอียดใบงาน
ให้บริการดึงรายละเอียดทิคเก็ตตาม ID ของทิคเก็ต
วิธีคำขอ
GET
ที่อยู่เรียกใช้
https://livedesk-api.engagelab.com/api/v2/accounts/tickets/:ticket_id
การยืนยันตัวตน
ดูรายละเอียดที่ ภาพรวม API เกี่ยวกับวิธีการยืนยันตัวตน
คำขอ
ตัวอย่างคำขอ
curl -X GET 'https://livedesk-api.engagelab.com/api/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/api/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": "Zhang San",
"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": "เจ้าหน้าที่ Xiao Li"
},
"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": "Zhang San",
"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": "เจ้าหน้าที่ Xiao Li"
},
"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 | ไม่ | การแมปผู้ติดต่อในช่องทาง |
| channel_id | String | ใช่ | ID ช่องทาง |
| contact_id | String | ใช่ | ID ผู้ติดต่อในช่องทาง |
| sub_contact_id | String | ไม่ | ID ผู้ติดต่อย่อย |
| followers | Array | ไม่ | ข้อมูลผู้ติดตาม (id, name) |
| submitter | Object | ไม่ | สมาชิกภายในที่ส่งทิคเก็ต |
| id | String | ใช่ | ID ผู้ส่ง |
| assignment_team | Object | ไม่ | ข้อมูลทีม |
| id | Integer | ใช่ | ID ทีม |
| name | String | ใช่ | ชื่อทีม |
| custom_fields | Object | ไม่ | ฟิลด์กำหนดเอง (เช่น SN อุปกรณ์ เลขคำสั่งซื้อ ฯลฯ) |
| 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 | ไม่ | ละเมิด SLA หรือไม่ |
| 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) |

