List Cities
Query Parameters
Page number (minimum: 1)
Items per page (minimum: 1, maximum: 100)
Free text search by name (case-insensitive)
Filter by exact name
Filter by ISO-3166-1 alpha-2 country code (e.g., MX, CO)
Filter by IANA timezone (e.g., America/Mexico_City)
Filter by active status
Response
Returns a paginated list of cities with metadata.Get City by ID
Path Parameters
City UUID
Response
Returns the city details including geometry if available.Create City
Body Parameters
City name (max 120 characters)
ISO-3166-1 alpha-2 country code (e.g., MX, CO)
Valid IANA timezone (e.g., America/Mexico_City)
GeoJSON MultiPolygon representing the city boundaries
Whether the city is active
Response
Response status
The created city object
Error Responses
- 409 Conflict: City already exists (name + countryCode combination)
- 400 Bad Request: Validation error
Update City
Path Parameters
City UUID
Body Parameters
All parameters are optional (partial update):City name (max 120 characters)
ISO-3166-1 alpha-2 country code
Valid IANA timezone
GeoJSON MultiPolygon representing the city boundaries
Whether the city is active
Response
Returns the updated city object.Error Responses
- 409 Conflict: Another city already exists with this name + countryCode
- 400 Bad Request: Validation error
Set Active Status
Path Parameters
City UUID
Body Parameters
Set to true to activate, false to deactivate
Response
Returns the updated city with new active status.Resolve City by Point
Query Parameters
Latitude coordinate
Longitude coordinate
Response
Returns the city containing the point, or null if no city is found.Example Request
Example Response
Use Cases
This endpoint is essential for:- Trip pricing - Determine which city’s pricing policies apply to a trip
- Service availability - Check if Rodando operates in the requested location
- Zone resolution - First step before resolving specific zones within a city
This endpoint uses PostGIS spatial queries to find the city whose geometry contains the provided point. Only active cities with defined geometries are considered.
