Logo Site EngageLab Mark Colored Transparent
เอกสาร

อัปเดตทิกเก็ต

การอัปเดตทิกเก็ตช่วยให้คุณสามารถแก้ไขข้อมูลของทิกเก็ตได้

เมธอดคำขอ

PUT

เอ็นด์พอยต์

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

การยืนยันตัวตน

สำหรับรายละเอียด โปรดดูคำอธิบายวิธีการยืนยันตัวตนในภาพรวม API

คำขอ

ตัวอย่างคำขอ

curl -X PUT 'https://livedesk-api.engagelab.com/api/v2/accounts/tickets/:ticket_id' \ -H 'Content-Type: application/json' \ -H 'Authorization: Basic base64(api_key:api_secret)' \ -d '{ "title": "Printer jammed and unable to print (updated)", "description": "The customer reported that A4 paper is jammed in the output tray and needs urgent handling.\nA technician has been dispatched.", "attachments": [ { "file_url": "https://example.com/files/error-photo.jpg" } ], "priority": "normal", "ticket_type": "incident", "custom_fields": { "department": "IT Support", "device_sn": "PRN-2024-001", "location": "สำนักงานใหญ่ปักกิ่ง - ห้องพิมพ์ ชั้น 3", "resolution_note": "Replaced the paper feeder" }, "tags": ["printer", "hardware", "resolved"] }'
              
              curl -X PUT 'https://livedesk-api.engagelab.com/api/v2/accounts/tickets/:ticket_id' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
-d '{
  "title": "Printer jammed and unable to print (updated)",
  "description": "The customer reported that A4 paper is jammed in the output tray and needs urgent handling.\nA technician has been dispatched.",
  "attachments": [
    {
      "file_url": "https://example.com/files/error-photo.jpg"
    }
  ],
  "priority": "normal",
  "ticket_type": "incident",
  "custom_fields": {
    "department": "IT Support",
    "device_sn": "PRN-2024-001",
    "location": "สำนักงานใหญ่ปักกิ่ง - ห้องพิมพ์ ชั้น 3",
    "resolution_note": "Replaced the paper feeder"
  },
  "tags": ["printer", "hardware", "resolved"]
}'

            
โค้ดนี้โชว์เป็นหน้าต่างลอย

เฮดเดอร์คำขอ

Field Type Description
Authorization string ใช้ Authorization: Basic base64(API Key:API Secret) สำหรับการยืนยันตัวตน ไปที่หน้าคีย์ API เพื่อรับ API Key และ API Secret จากนั้นเชื่อมทั้งสองค่าด้วยเครื่องหมายโคลอน (:) และเข้ารหัสผลลัพธ์เป็น Base64
Content-Type application/json ประเภทข้อมูล โดยค่าคือ application/json

พารามิเตอร์พาธ

Field Type Required Description
ticket_id String Yes ID ของทิกเก็ต

พารามิเตอร์ใน Request Body

Field Type Required Description
title String Yes ชื่อทิกเก็ต
description String Yes คำอธิบายรายละเอียดของทิกเก็ต (รองรับ Markdown)
attachments Array No รายการไฟล์แนบของทิกเก็ต
file_url: URL ของไฟล์
priority String No ระดับความสำคัญ: low / medium / high / urgent โดยค่าเริ่มต้นคือ medium หากไม่ได้ระบุ
ticket_type String No ประเภททิกเก็ต: incident / question / problem / task
custom_fields Object No ฟิลด์ที่กำหนดเอง เช่น หมายเลขซีเรียลของอุปกรณ์หรือหมายเลขคำสั่งซื้อ
tags Array No แท็กของทิกเก็ต

การตอบกลับ

การตอบกลับเมื่อสำเร็จ

{ "code": 0, "message": "Success", "data": { "ticket_id": "tk_20251104_789abc", "updated_at": "2025-11-04T10:30:00+08:00" } }
              
              {
  "code": 0,
  "message": "Success",
  "data": {
    "ticket_id": "tk_20251104_789abc",
    "updated_at": "2025-11-04T10:30:00+08:00"
  }
}

            
โค้ดนี้โชว์เป็นหน้าต่างลอย

พารามิเตอร์การตอบกลับ

Field Type Required Description
ticket_id String No ID ของทิกเก็ต
updated_at String No เวลาที่อัปเดต
Icon Solid Transparent White Qiyu
ติดต่อฝ่ายขาย