logo文件
搜尋

更新工單

提供修改工單資訊的功能.

請求方式

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": "打印機卡紙,無法打印(已更新)", "description": "客戶反映 A4 紙卡在出紙口,急需處理。\n已派技術員前往。", "attachments": [ { "file_url": "https://example.com/files/error-photo.jpg" } ], "priority": "normal", "ticket_type": "incident", "custom_fields": { "department": "IT 支持", "device_sn": "PRN-2024-001", "location": "北京總部-3 樓打印室", "resolution_note": "更換了進紙器" }, "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": "打印機卡紙,無法打印(已更新)",
  "description": "客戶反映 A4 紙卡在出紙口,急需處理。\n已派技術員前往。",
  "attachments": [
    {
      "file_url": "https://example.com/files/error-photo.jpg"
    }
  ],
  "priority": "normal",
  "ticket_type": "incident",
  "custom_fields": {
    "department": "IT 支持",
    "device_sn": "PRN-2024-001",
    "location": "北京總部-3 樓打印室",
    "resolution_note": "更換了進紙器"
  },
  "tags": ["printer", "hardware", "resolved"]
}'

            
此代碼塊在浮窗中顯示

請求頭

欄位 類型 描述
Authorization string 使用 Authorization: Basic base64(API Key:API Secret) 進行身份驗證。請前往 API 密鑰頁面 獲取 API Key 和 API Secret,並將兩者以冒號連接後進行 Base64 編碼。
Content-Type application/json 數據類型,取值為 application/json。

路徑參數

欄位 類型 必填 描述
ticket_id String 工單 ID。

請求體參數

欄位 類型 必填 描述
title String 工單標題。
description String 工單詳細描述(支持 Markdown)。
attachments Array 工單級附件列表。
  • file_url: 文件地址。
  • priority String 優先級:low/medium/high/urgent。不傳默認為 medium。
    ticket_type String 工單類型:incident/question/problem/task。
    custom_fields Object 自定義欄位(如設備序列號、訂單號等)。
    tags Array 工單標籤。

    響應示例

    成功響應

    { "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"
      }
    }
    
                
    此代碼塊在浮窗中顯示

    響應參數

    欄位 類型 必填 描述
    ticket_id String 工單 ID。
    updated_at String 更新時間。
    icon
    聯繫銷售