WayFy’s Trips API is the core itinerary engine. A trip contains one or more days, each of which holds an ordered list of places — points of interest with visit times, notes, and optional links to saved favorites. Trips can be kept private or published publicly for the WayFy community to discover and fork into their own itineraries.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jhonyes04/new-wayfy/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints that accept optional JWT (
optional jwt) will return public trip data when called without a token. Passing a valid token additionally exposes the caller’s own private trips where relevant.Trips
POST /api/trips/
Creates a new trip for the authenticated user. The trip starts private by default — setis_public: true to publish it immediately.
Authentication: Required
Request
Name of the trip (e.g.
"Accessible Weekend in Lisbon").A longer description of the trip, its highlights, or accessibility notes.
Whether the trip is visible to the WayFy community. Defaults to
false.Response
Returns201 Created with a wrapper containing the new trip object.
Confirmation message.
Example
GET /api/trips/
Returns all trips belonging to the authenticated user. Authentication: RequiredResponse
Number of trips returned.
Array of trip objects for the authenticated user, ordered by creation date descending.
Example
GET /api/trips/public
Returns all trips markedis_public: true across the entire WayFy platform. Useful for the community discovery feed.
Authentication: Optional
Response
Number of public trips returned.
Array of all public trip objects.
Example
GET /api/trips/:trip_id
Returns a single trip including its days and places. Returns the trip if it is public, or if the authenticated user is the owner. Authentication: OptionalPrivate trips return
403 Forbidden when accessed without a valid token or by a non-owner.Response
Trip ID.
Owning user ID.
Object with
firstname and lastname of the trip owner.Trip title.
Trip description.
Visibility flag.
Full cover image path or
null.Source trip ID if forked, else
null.Number of forks.
Number of days in the trip.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Ordered array of trip day objects.
Example
PUT /api/trips/:trip_id
Updates metadata for an existing trip. Only the trip owner can perform updates. Authentication: RequiredRequest
New trip title.
Updated description.
Change the trip’s visibility. Setting to
true publishes it to the community feed.Response
Returns a wrapper with the full updated trip object.Confirmation message.
The full updated trip object.
Example
DELETE /api/trips/:trip_id
Permanently deletes a trip and all its days and places. Only the trip owner can delete. Authentication: RequiredExample
Cover Images
PUT /api/trips/:trip_id/cover
Uploads a cover image for a trip. Send asmultipart/form-data with field file. Accepted formats: png, jpg, jpeg, webp.
Authentication: Required
Request
Image file for the trip cover. Accepted formats:
png, jpg, jpeg, webp. Sent as multipart/form-data.Response
Returns a wrapper with the full updated trip object.Confirmation message.
The full updated trip object with the new
cover_image path.Example
DELETE /api/trips/:trip_id/cover
Removes the cover image from a trip, resettingcover_image to null.
Authentication: Required
Example
GET /api/trips/cover/:filename
Serves a trip cover image file by its stored filename. No authentication required — suitable for use in public<img> tags in the WayFy frontend.
Authentication: None
Example
Forking
POST /api/trips/:trip_id/fork
Creates a full copy of a public trip into the authenticated user’s account, settingoriginal_trip_id to the source trip’s ID. Days and places are duplicated; the fork starts as a private trip. Cover images are also copied if present.
Authentication: Required
Response
Returns201 Created with a wrapper containing the new forked trip object including all days and places.
Confirmation message.
The full new forked trip object including
days and their places.Example
Trip Days
POST /api/trips/:trip_id/days
Adds a new day to an existing trip.day_number is optional — if omitted, it is automatically set to len(existing_days) + 1.
Authentication: Required
Request
The day’s position in the itinerary sequence (e.g.
1 for Day 1). Auto-assigned if omitted.ISO 8601 date for this day (e.g.
"2024-06-01"). Optional if the trip has no fixed dates.A descriptive title for the day (e.g.
"Belém & Waterfront").Free-form notes visible on the day’s itinerary card.
Response
Returns201 Created with a wrapper containing the new TripDay object.
Confirmation message.
Example
PUT /api/trips/:trip_id/days/:day_id
Updates fields on an existing trip day. Returns the updated day including its places. Authentication: RequiredRequest
Updated sequence number.
Updated date string (ISO 8601), or
null to clear the date.Updated day title.
Updated day notes.
Response
Confirmation message.
The updated day object including its
places array.Example
DELETE /api/trips/:trip_id/days/:day_id
Removes a day and all of its places from the trip. Authentication: RequiredExample
Day Places
POST /api/trips/:trip_id/days/:day_id/places
Adds a place to a specific day in the itinerary.place_name is required; all other fields are optional.
Authentication: Required
Request
Name of the place to add.
Latitude coordinate of the place.
Longitude coordinate of the place.
OpenStreetMap identifier (e.g.
node/123456789).WayFy place category (e.g.
gastronomia, cultura_turismo).Position of this place within the day’s itinerary. Auto-assigned to end of list if omitted.
Accessibility or visit notes specific to this place.
Planned visit start time in
"HH:MM" format (e.g. "10:00"). Stored as SQL Time.Planned visit end time in
"HH:MM" format (e.g. "12:30"). Stored as SQL Time.ID of a saved favorite to link this place to. Enables quick add from the favorites panel.
Response
Returns201 Created with a wrapper containing the new place entry.
Confirmation message.
Example
PUT /api/trips/:trip_id/days/:day_id/places/:place_id
Updates an existing place entry within a trip day. Authentication: RequiredRequest
Updated place name.
New position within the day’s itinerary.
Updated notes.
Updated visit start time in
"HH:MM" format.Updated visit end time in
"HH:MM" format.Move the place to a different day by supplying the target day’s ID.
Response
Confirmation message.
The updated place object.