POST /api/v1/tickets
Creates and initializes a new technical support ticket in WispHub. This endpoint performs preventive verification to ensure the zone does not exceed the allowed threshold of open tickets to avoid visit saturation. It also automatically calculates the approximate resolution date based on business days configured in the system.The system enforces a zone-level ticket limit. If a zone already has the maximum number of active tickets (default: 3), the request will be rejected with a
zone_ticket_limit_reached action.Request Body
The unique identifier of the service associated with this ticket
Brief summary of the ticket issue. Must match exactly one of the valid subjects returned by
GET /api/v1/tickets/subjects.Detailed description of the technical issue or support request
ID of the assigned technician.
The zone ID where the customer is located. Used to enforce ticket limits per zone
Response
The endpoint returns aBackendResponse wrapper with the following structure:
Indicates if the request was successful
Response type:
success, error, or infoAction identifier for the response. Possible values:
ticket_created- Ticket successfully createdticket_creation_failed- Failed to create ticketzone_ticket_limit_reached- Zone has reached maximum active tickets
Response data object
Optional message providing additional context
Optional metadata
Zone Blocking Logic
The endpoint implements ticket throttling at the zone level:- MAX_ACTIVE_TICKETS_PER_ZONE: Default value is
3 - ACTIVE_TICKET_STATES: Tickets in state
1are considered active - If a zone already has 3 or more active tickets, new ticket creation is blocked
- The system returns an info response with action
zone_ticket_limit_reached
Resolution Date Calculation
- MAX_TICKET_RESOLUTION_DAYS: Default value is
3business days - The
end_datefield represents the estimated resolution date - Calculated by adding business days to the creation timestamp
- Weekends and holidays are excluded from the calculation
Example Responses
Error Handling
When the zone limit is reached, you should:- Inform the user that the zone has reached maximum capacity
- Display the
max_ticketsvalue from the response - Wait for existing tickets to be resolved before creating new ones
