Skip to main content
PATCH
/
api
/
tickets
/
estado
Update Ticket Status
curl --request PATCH \
  --url https://api.example.com/api/tickets/estado \
  --header 'Content-Type: application/json' \
  --data '
{
  "Id": "<string>",
  "EstadoId": 123
}
'
{
  "respuesta": true,
  "mensaje": "<string>",
  "ticket": "<string>"
}

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

Id
string
required
The UUID of the ticket to update
EstadoId
integer
required
The new status ID to set for the ticket

Response

Returns a response object indicating success or failure of the operation.
respuesta
boolean
Indicates whether the operation was successful (true) or failed (false)
mensaje
string
A message describing the result of the operation
ticket
string
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

200 - Success
{
  "respuesta": true,
  "mensaje": "Ticket status updated successfully",
  "ticket": "TKT-2024-001234"
}
404 - Not Found
{
  "respuesta": false,
  "mensaje": "Ticket not found",
  "ticket": null
}
400 - Bad Request
{
  "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."
    ]
  }
}
401 - Unauthorized
{
  "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.

Build docs developers (and LLMs) love