Overview
The Tickets API provides a comprehensive support ticket management system for urban management operations. It allows citizens to submit service requests and enables administrators to manage, assign, and track ticket progress through various stages.Ticket Schema
Core Fields
Ticket Status
Tickets progress through the following statuses:PENDING: Newly created ticket awaiting assignmentIN_PROGRESS: Ticket assigned and work in progressCOMPLETED: Work completed, ticket resolvedCANCELLED: Ticket cancelled (no longer needed)
Ticket Categories
Tickets are categorized by service type:MAINTENANCE: Building maintenance and repairsSECURITY: Security-related issues and concernsCLEANING: Cleaning and sanitation requestsWASTE: Waste management and disposalELECTRICITY: Electrical issues and repairsWATER: Water supply and plumbing issuesGAS: Gas supply and safety concernsINTERNET: Internet connectivity and IT issuesOTHER: Miscellaneous requests
Response Format
Grouped Response
Most ticket endpoints return tickets grouped by status:Single Ticket Response
Individual ticket operations return a single ticket object:Permissions
The ticket system uses role-based permissions:ticket:read: View tickets and ticket detailsticket:write: Create, update, assign, and change ticket statusticket:delete: Delete tickets
Workflow
- Creation: Citizens create tickets with description and category
- Assignment: Administrators assign tickets to technicians
- Progress: Technicians update ticket status and add notes
- Resolution: Tickets marked as completed or cancelled
Related Endpoints
Query Endpoints
- Get All Tickets - Retrieve all tickets with optional status filtering
- Get Tickets by User ID - Get tickets created by a specific user
- Get Tickets by Technician ID - Get tickets assigned to a specific technician
Management Endpoints
- Create Ticket - Create a new support ticket
- Update Ticket - Update ticket details
- Assign Ticket - Assign ticket to technician
- Unassign Ticket - Remove technician assignment
- Change Status - Update ticket status
- Delete Ticket - Permanently delete a ticket