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
Detailed description of the ticket
UUID of the user creating the ticket
ID of the area/department this ticket belongs to
Priority level ID for the ticket
Initial status ID for the ticket
Response
Unique identifier (GUID) for the created ticket
Tracking code for the ticket
Description of the ticket
UUID of the user who created the ticket
Timestamp when the ticket was created (ISO 8601 format)
Timestamp when the ticket was last updated (ISO 8601 format)
Example Request
curl -X POST https://api.example.com/api/tickets \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"Titulo": "Cannot access dashboard",
"Descripcion": "I am unable to log into the dashboard. The page returns a 500 error.",
"UsuarioId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AreaId": 1,
"PrioridadId": 2,
"EstadoId": 1
}'
Example Response
{
"IdTicket": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"Codigo": "TKT-2024-001234",
"Titulo": "Cannot access dashboard",
"Descripcion": "I am unable to log into the dashboard. The page returns a 500 error.",
"UsuarioId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"AreaId": 1,
"PrioridadId": 2,
"EstadoId": 1,
"FechaCreacion": "2024-03-15T10:30:00Z",
"FechaActualizacion": "2024-03-15T10:30:00Z"
}
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"Titulo": [
"The Titulo field is required."
]
}
}