Skip to main content

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:
[].id
integer
Auto-incremented category ID.
[].name
string
The category name (e.g. "Museums", "Restaurants").
[].description
string | null
An optional description of the category.
[].created_at
string
ISO 8601 creation timestamp.
[].updated_at
string
ISO 8601 last-update timestamp.
Example request
curl -X GET http://localhost:8000/api/categories \
  -H "Accept: application/json"
Example response (200)
[
  {
    "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

category
integer
required
The ID of the category to retrieve.

Response — 200 OK

id
integer
The category’s ID.
name
string
The category name.
description
string | null
An optional description of the category.
places
array
All places that belong to this category. Each place includes its images, city, reviews, and a computed average rating.
created_at
string
ISO 8601 creation timestamp.
updated_at
string
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.
Example request
curl -X GET http://localhost:8000/api/categories/2 \
  -H "Accept: application/json"
Example response (200)
{
  "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"
}

Build docs developers (and LLMs) love