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.
Overview
Events are time-bound activities that belong to a city and optionally to a specific place within that city. Examples include festivals, guided tours, and cultural exhibitions. Authenticated users can register for events and track their registrations.Browse & filter
List events by city or filter to only upcoming ones using query parameters.
Registration
Register for and cancel attendance at events. Duplicate registrations are safe —
firstOrCreate is used.My registrations
Retrieve all events a user has registered for, sorted by event date ascending.
Reviews & ratings
Events support the same review system as places — see the Reviews page.
Endpoints
GET /api/events
Returns a list of events ordered bydate ascending. Both query parameters are optional and can be combined.
Query parameters
Filter events to a specific city. Pass the numeric city ID (e.g.
city_id=1).When
true, only events whose date is in the future (after now()) are returned. Accepts true, 1, "true", "1", "on", or "yes".images, city, and place (nullable).
Response (200)
GET /api/events/
Returns a single event with full detail. This endpoint works for both authenticated and unauthenticated users, but theis_registered field is resolved differently depending on authentication state.
Response fields
All images associated with the event via the polymorphic
imageable relationship.The city the event is held in.
The specific place the event is held at.
null if the event is not tied to a specific place.All reviews for this event, each including the
user who wrote it.Total number of users who have registered for this event.
Whether the currently authenticated user has registered for this event. Always
false for unauthenticated requests.is_registered uses the auth:sanctum guard in optional mode — the endpoint is publicly accessible, but if a valid Authorization: Bearer token is present the field reflects the user’s actual registration status. Unauthenticated requests always receive is_registered: false.POST /api/events//register
Register the authenticated user for an event. UsesfirstOrCreate — calling this endpoint on an already-registered event is idempotent and will not create a duplicate record.
Requires authentication.
DELETE /api/events//register
Cancel the authenticated user’s registration for an event. If the user was not registered, the response is still200 with the cancellation message.
Requires authentication.
GET /api/my/registrations
Returns all event registrations belonging to the authenticated user, sorted by eventdate ascending. Each registration includes the full event object with its city, place, and images.
Requires authentication.
Event registration flow
Browse events
Call
GET /api/events?upcoming=true (or filter by city_id) to display a list of upcoming events.View event detail
Call
GET /api/events/{event} with the user’s token. The is_registered field indicates whether the user is already attending.Register
If
is_registered is false, call POST /api/events/{event}/register. The response includes the registration record with the event nested.