GET /api/v1/tickets/zone-blocked/
Quickly verifies if a specific zone has exceeded the maximum limit of open tickets in WispHub. Returns a boolean indicator and the currently configured limit. This endpoint is useful for preventing ticket creation attempts that would be rejected due to zone saturation.Use this endpoint before attempting to create a ticket to provide better user experience by checking zone availability upfront.
Path Parameters
The unique identifier of the customer zone to check
Response
The endpoint returns aBackendResponse wrapper with the following structure:
Always true for successful requests
Response type:
successAction identifier:
ticket_found (indicates successful check)Zone blocking status information
Optional message providing additional context
Optional metadata
Zone Blocking Rules
A zone is considered blocked when:- The number of active tickets >=
MAX_ACTIVE_TICKETS_PER_ZONE(default: 3) - Active tickets are those in states defined by
ACTIVE_TICKET_STATES(default: state 1) - Only open/in-progress tickets count toward the limit
- Closed or resolved tickets do not affect the count
Configuration
The blocking behavior is controlled by these environment variables: MAX_ACTIVE_TICKETS_PER_ZONE- Default value:
3 - Controls how many active tickets a zone can have simultaneously
- Configurable via environment variable
- Default value:
(1,) - Defines which ticket states are considered “active”
- Typically includes “Abierto” (Open) and “En Progreso” (In Progress)
Example Responses
Usage Workflow
Recommended flow for creating tickets with zone validation:- Check zone availability using this endpoint
- If
is_blocked: false: Proceed with ticket creation via POST /api/v1/tickets - If
is_blocked: true: Display error message to user- Inform user that the zone has reached maximum capacity
- Show
max_ticketsvalue from response - Suggest waiting for existing tickets to be resolved
Why Zone Limits Exist
Zone-level ticket limits prevent:- Technician saturation: Too many simultaneous visits to the same area
- Resource overload: Ensures balanced workload distribution
- Service quality: Maintains manageable queue sizes
- Customer experience: Prevents unrealistic resolution expectations
- Wait for existing tickets to be resolved
- Check if their issue is related to an existing mass outage ticket
- Contact support via alternative channels for urgent issues
