Actualizar ticket
Se proporciona un endpoint para modificar la información del ticket.
Método de solicitud
PUT
URL de la solicitud
https://livedesk-api.engagelab.com/api/v2/accounts/tickets/:ticket_id
Autenticación
Para más información, consulte la descripción de la autenticación en Visión general de la API.
Solicitud
Ejemplo de solicitud
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 paper jam, unable to print (Updated)",
"description": "Customer reported A4 paper jammed at the output tray, needs urgent handling.\nTechnician 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 HQ - 3rd Floor Print Room",
"resolution_note": "Replaced the paper feed mechanism"
},
"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 paper jam, unable to print (Updated)",
"description": "Customer reported A4 paper jammed at the output tray, needs urgent handling.\nTechnician 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 HQ - 3rd Floor Print Room",
"resolution_note": "Replaced the paper feed mechanism"
},
"tags": ["printer", "hardware", "resolved"]
}'
Este bloque de código se muestra en una ventana flotante
Encabezados de la solicitud
| Campo | Tipo | Descripción |
|---|---|---|
| Authorization | String | Se utiliza Authorization: Basic base64(API Key:API Secret) para la autenticación. Se puede acceder a la página de claves de API para obtener la API Key y el API Secret, y se unen mediante dos puntos antes de codificarlas en Base64. |
| Content-Type | application/json | Tipo de datos; el valor es application/json. |
Parámetros de la ruta
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| ticket_id | String | Sí | ID del ticket (ticket_id). |
Parámetros del cuerpo
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| title | String | Sí | Título del ticket. |
| description | String | Sí | Descripción detallada del ticket (admite Markdown). |
| attachments | Array | No | Lista de archivos adjuntos a nivel de ticket. file_url: URL del archivo. |
| priority | String | No | Prioridad: low/medium/high/urgent. El valor predeterminado es medium si no se proporciona. |
| ticket_type | String | No | Tipo de ticket: incident/question/problem/task. |
| custom_fields | Object | No | Campos personalizados (p. ej., número de serie del dispositivo, número de pedido, etc.). |
| tags | Array | No | Etiquetas del ticket. |
Ejemplo de respuesta
Respuesta correcta
{
"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
Parámetros de la respuesta
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| ticket_id | String | No | ID del ticket. |
| updated_at | String | No | Fecha y hora de actualización. |

