All API endpoints require authentication using Laravel Sanctum:
Authorization: Bearer {token}/api/v1/laratickets
GET /ticketsQuery Parameters:
status(string): Filter by statuslevel(integer): Filter by level (1-4)department_id(integer): Filter by departmentopen_only(boolean): Show only open ticketsoverdue_only(boolean): Show only overdue ticketsper_page(integer): Items per page (default: 15)
Response: 200 OK
POST /ticketsBody:
{
"subject": "string (required)",
"description": "string (required)",
"priority": "low|medium|high|critical (required)",
"department_id": "integer (required)"
}Response: 201 Created
GET /tickets/{id}Response: 200 OK
PUT /tickets/{id}Body:
{
"subject": "string (optional)",
"description": "string (optional)",
"status": "string (optional)",
"priority": "string (optional)",
"department_id": "integer (optional)"
}Response: 200 OK
DELETE /tickets/{id}Response: 200 OK
POST /tickets/{id}/closeResponse: 200 OK
POST /tickets/{id}/resolveResponse: 200 OK
POST /tickets/{id}/cancelBody:
{
"reason": "string (optional)"
}Response: 200 OK
GET /tickets/{id}/messagesResponse: 200 OK
POST /tickets/{id}/messagesBody:
{
"body": "string (required)",
"author_role": "client|staff (required)"
}Response: 201 Created
POST /tickets/{id}/messages/{message_id}/redactBody:
{
"reason": "string (required)"
}Response: 200 OK
POST /tickets/{id}/escalationsBody:
{
"target_level_id": "integer (required)",
"justification": "string (required, min: 10)"
}Response: 201 Created
POST /escalations/{id}/approveResponse: 200 OK
POST /escalations/{id}/rejectBody:
{
"reason": "string (required, min: 10)"
}Response: 200 OK
POST /tickets/{id}/evaluationsBody:
{
"score": "number (required, 1.0-5.0)",
"comment": "string (optional)"
}Response: 201 Created
GET /evaluations/statisticsResponse: 200 OK
POST /tickets/{id}/risk-assessmentsBody:
{
"risk_level": "low|medium|high|critical (required)",
"justification": "string (required, min: 10)"
}Response: 201 Created
GET /risk-assessments/high-riskResponse: 200 OK
GET /risk-assessments/statisticsResponse: 200 OK
{
"message": "Operation successful",
"data": {
// Resource data
}
}{
"message": "Error message",
"errors": {
"field": ["Validation error"]
}
}200 OK: Successful request201 Created: Resource created successfully400 Bad Request: Invalid input401 Unauthorized: Authentication required403 Forbidden: Insufficient permissions404 Not Found: Resource not found422 Unprocessable Entity: Validation failed500 Internal Server Error: Server error