Use this file to discover all available pages before exploring further.
Cities are the top-level geographical grouping in Tourify. Each city can contain many places and events, and can have one or more images attached via a polymorphic images relation. All city endpoints are publicly accessible — no authentication token is required.
curl -X GET http://localhost:8000/api/cities \ -H "Accept: application/json"
Example response (200)
[ { "id": 1, "name": "Barcelona", "description": "A vibrant city on the northeastern coast of Spain, known for its architecture and culture.", "country": "Spain", "images": [ { "id": 10, "url": "https://example.com/images/barcelona.jpg", "imageable_type": "App\\Models\\City", "imageable_id": 1, "created_at": "2026-05-01T08:00:00.000000Z", "updated_at": "2026-05-01T08:00:00.000000Z" } ], "created_at": "2026-05-01T08:00:00.000000Z", "updated_at": "2026-05-01T08:00:00.000000Z" }, { "id": 2, "name": "Madrid", "description": "The capital and largest city of Spain, home to world-class museums and a lively nightlife.", "country": "Spain", "images": [], "created_at": "2026-05-01T08:00:00.000000Z", "updated_at": "2026-05-01T08:00:00.000000Z" }]
GET/api/cities/{city}Returns a single city by ID with all related data eager-loaded: images, places (with their images, category, and reviews), and events (with their images and associated place). Each place in the response also includes a computed average_rating field.Authentication: Not required.