Perbarui Tiket

Perbarui Tiket memungkinkan Anda mengubah informasi tiket.

Metode Permintaan

PUT

Endpoint

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

Autentikasi

Untuk detailnya, lihat deskripsi metode autentikasi di Ikhtisar API.

Permintaan

Contoh Permintaan

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": "Beijing Headquarters - 3rd Floor Print Room", "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": "Beijing Headquarters - 3rd Floor Print Room",
    "resolution_note": "Replaced the paper feeder"
  },
  "tags": ["printer", "hardware", "resolved"]
}'

            
Tampilkan blok kode ini di jendela mengambang

Header Permintaan

Field Type Description
Authorization string Gunakan Authorization: Basic base64(API Key:API Secret) untuk autentikasi. Buka halaman API key untuk mendapatkan API Key dan API Secret, gabungkan keduanya dengan titik dua, lalu enkode hasilnya dalam Base64.
Content-Type application/json Tipe data. Nilainya adalah application/json.

Parameter Path

Field Type Required Description
ticket_id String Yes ID tiket.

Parameter Body Permintaan

Field Type Required Description
title String Yes Judul tiket.
description String Yes Deskripsi tiket secara terperinci (mendukung Markdown).
attachments Array No Daftar lampiran tingkat tiket.
file_url: URL file.
priority String No Prioritas: low / medium / high / urgent. Nilai defaultnya adalah medium jika tidak diberikan.
ticket_type String No Jenis tiket: incident / question / problem / task.
custom_fields Object No Bidang kustom, seperti nomor seri perangkat atau nomor pesanan.
tags Array No Tag tiket.

Respons

Respons Berhasil

{ "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"
  }
}

            
Tampilkan blok kode ini di jendela mengambang

Parameter Respons

Field Type Required Description
ticket_id String No ID tiket.
updated_at String No Waktu pembaruan.
Icon Solid Transparent White Qiyu
Hubungi Sales