更新工单

提供修改工单信息的功能.

请求方式

PUT

调用地址

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

调用验证

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

请求

请求示例

curl -X PUT 'https://livedesk-api.engagelab.com/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/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"]
}'

            
Este bloque de código se muestra en una ventana flotante

请求头

字段 类型 描述
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"
      }
    }
    
                
    Este bloque de código se muestra en una ventana flotante

    响应参数

    字段 类型 必填 描述
    ticket_id String 工单ID。
    updated_at String 更新时间。
    icon
    Contacto