List Zones
Query Parameters
Page number (minimum: 1)
Items per page (minimum: 1, maximum: 100)
Filter zones by city UUID
Free text search by name (case-insensitive)
Filter by exact name
Filter by zone kind/type
Filter zones with priority greater than or equal to this value
Filter by active status
Response
Returns a paginated list of zones with metadata.Get Zone by ID
Path Parameters
Zone UUID
Response
Returns the zone details including geometry.Create Zone
Body Parameters
UUID of the city this zone belongs to
Zone name (max 120 characters)
Zone type or category (max 60 characters)
Zone priority (0-100000). Higher priority zones take precedence
GeoJSON MultiPolygon representing the zone boundaries
Whether the zone is active
Response
Response status
The created zone object
Error Responses
- 409 Conflict: Zone already exists in this city (cityId + name combination)
- 400 Bad Request: Validation error
Update Zone
Path Parameters
Zone UUID
Body Parameters
All parameters are optional (partial update):UUID of the city this zone belongs to
Zone name (max 120 characters)
Zone type or category
Zone priority (0-100000)
GeoJSON MultiPolygon representing the zone boundaries
Whether the zone is active
Response
Returns the updated zone object.Error Responses
- 409 Conflict: Another zone with that name already exists in this city
- 400 Bad Request: Validation error
Set Active Status
Path Parameters
Zone UUID
Body Parameters
Set to true to activate, false to deactivate
Response
Returns the updated zone with new active status.Resolve Zone by Point
Query Parameters
UUID of the city to search within
Latitude coordinate
Longitude coordinate
Response
Returns the best matching zone containing the point (based on priority), or null if no zone is found.Example Request
Example Response
Priority-Based Resolution
When multiple zones overlap at the same point, the zone with the highest priority value is returned. This allows you to:- Define general zones with lower priority (e.g., “North District” with priority 50)
- Override with specific high-priority zones (e.g., “Airport Zone” with priority 200)
Use Cases
This endpoint is essential for:- Dynamic pricing - Apply zone-specific pricing policies
- Surge pricing - Identify high-demand zones
- Service restrictions - Enforce zone-specific service rules
- Trip routing - Determine pickup and dropoff zone information
This endpoint uses PostGIS spatial queries and returns the zone with the highest priority value among all zones that contain the point. Only active zones are considered.
