Authentication
This endpoint requires JWT authentication. Include the bearer token in the Authorization header.
Authentication is currently commented out in the controller but should be enabled in production.
Request Body
The UUID of the ticket to update
The new status ID to set for the ticket
Response
Returns a response object indicating success or failure of the operation.
Indicates whether the operation was successful (true) or failed (false)
A message describing the result of the operation
The tracking code of the updated ticket
Example Request
curl -X PATCH https://api.example.com/api/tickets/estado \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"Id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"EstadoId": 3
}'
Example Response
{
"respuesta": true,
"mensaje": "Ticket status updated successfully",
"ticket": "TKT-2024-001234"
}
{
"respuesta": false,
"mensaje": "Ticket not found",
"ticket": null
}
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"Id": [
"The Id field is required."
]
}
}
{
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Unauthorized",
"status": 401
}
The endpoint returns a 404 status code when the ticket with the specified ID is not found, as indicated by the respuesta: false field in the response.