Documentation Index Fetch the complete documentation index at: https://mintlify.com/astrxnomo/tourify/llms.txt
Use this file to discover all available pages before exploring further.
Categories classify places within Tourify (e.g. Monuments, Restaurants, Museums). All category endpoints are publicly accessible — no authentication token is required.
List Categories
GET /api/categories
Returns an alphabetically sorted array of all categories.
Authentication: Not required.
Response — 200 OK
Returns a JSON array. Each element has the following shape:
Auto-incremented category ID.
The category name (e.g. "Museums", "Restaurants").
An optional description of the category.
ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
curl -X GET http://localhost:8000/api/categories \
-H "Accept: application/json"
[
{
"id" : 1 ,
"name" : "Museums" ,
"description" : "Art galleries, history museums, and science centres." ,
"created_at" : "2026-05-01T08:00:00.000000Z" ,
"updated_at" : "2026-05-01T08:00:00.000000Z"
},
{
"id" : 2 ,
"name" : "Monuments" ,
"description" : "Historic monuments and architectural landmarks." ,
"created_at" : "2026-05-01T08:00:00.000000Z" ,
"updated_at" : "2026-05-01T08:00:00.000000Z"
},
{
"id" : 3 ,
"name" : "Restaurants" ,
"description" : null ,
"created_at" : "2026-05-01T08:00:00.000000Z" ,
"updated_at" : "2026-05-01T08:00:00.000000Z"
}
]
Get Category
GET /api/categories/{category}
Returns a single category by ID with all related places eager-loaded. Each place includes its images, city, and reviews. A computed average_rating field is appended to every place.
Authentication: Not required.
Path parameters
The ID of the category to retrieve.
Response — 200 OK
An optional description of the category.
All places that belong to this category. Each place includes its images, city, reviews, and a computed average rating. Long-form description of the place.
Street address of the place.
Decimal latitude (precision: 10, scale: 7).
Decimal longitude (precision: 10, scale: 7).
Computed mean of all review ratings for this place, rounded to one decimal place. null if there are no reviews.
Polymorphic images attached to the place via the imageable morph relation.
The city this place belongs to (id, name, description, country).
All reviews submitted for this place.
ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
If no category with the given {category} ID exists, Laravel returns a 404 Not Found response automatically via model binding.
curl -X GET http://localhost:8000/api/categories/2 \
-H "Accept: application/json"
{
"id" : 2 ,
"name" : "Monuments" ,
"description" : "Historic monuments and architectural landmarks." ,
"places" : [
{
"id" : 3 ,
"city_id" : 1 ,
"category_id" : 2 ,
"name" : "Sagrada Família" ,
"description" : "Antoni Gaudí's iconic unfinished basilica, a UNESCO World Heritage Site." ,
"address" : "Carrer de Mallorca, 401, 08013 Barcelona" ,
"latitude" : 41.4036299 ,
"longitude" : 2.1743558 ,
"average_rating" : 4.8 ,
"images" : [
{
"id" : 21 ,
"url" : "https://example.com/images/sagrada.jpg" ,
"imageable_type" : "App \\ Models \\ Place" ,
"imageable_id" : 3 ,
"created_at" : "2026-05-01T08:00:00.000000Z" ,
"updated_at" : "2026-05-01T08:00:00.000000Z"
}
],
"city" : {
"id" : 1 ,
"name" : "Barcelona" ,
"description" : "A vibrant city on the northeastern coast of Spain." ,
"country" : "Spain" ,
"created_at" : "2026-05-01T08:00:00.000000Z" ,
"updated_at" : "2026-05-01T08:00:00.000000Z"
},
"reviews" : [
{
"id" : 5 ,
"reviewable_type" : "App \\ Models \\ Place" ,
"reviewable_id" : 3 ,
"user_id" : 42 ,
"rating" : 5 ,
"comment" : "Absolutely breathtaking." ,
"created_at" : "2026-05-10T14:22:00.000000Z" ,
"updated_at" : "2026-05-10T14:22:00.000000Z"
}
],
"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"
}