get_seat_availability
ChatGPTRe-check live seat availability for one trip from search_trips. Use this when the user asks whether a specific trip still has seats, because the counts in search results are only a snapshot and can be stale for operators on external systems. Returns { ok, trip_ref, seats_available, decks:[...] (only when includeSeatMap is true), availability_disclaimer }. Returning seats does NOT reserve anything -- Phase 1 cannot hold or book seats; the user completes booking on the Easybook website.
get_trip_details
ChatGPTGet fuller information for one trip returned by search_trips: boarding and drop-off points, operator policies, notices and passenger requirements. Takes the trip_ref from search_trips (never a raw booking key). Returns the operator's detail payload, or { ok:false, error } if the trip_ref has expired -- in that case run search_trips again.
search_locations
ChatGPTLook up Easybook places (cities, terminals, jetties, stations) matching a name, for one transport type. You normally do NOT need this -- search_trips resolves plain place names itself. Use it only to help the user choose when search_trips reports needs_disambiguation, or when they ask what terminals exist somewhere. Returns { ok, matches:[ { name, country_code, is_terminal } ] }.
search_trips
ChatGPTSearch Easybook intercity trips (bus, ferry or train) between two places on a date. Origin and destination are plain text as the user says them (e.g. 'KL', 'Penang', 'Mersing Jetty') and are resolved server-side -- no separate lookup call is needed. Returns { ok, product, origin, destination, departure_date, trips:[ { trip_ref, operator, service_type, departure_datetime, arrival_datetime, duration, price:{amount,currency}, seats_available, rating, is_auto_seat } ], total, next_page, notices, booking_url, availability_disclaimer }. If a place name is ambiguous, returns { ok:false, needs_disambiguation:true, field, candidates:[...] } -- ask the user which one, then call again with the exact name. Pass each trip_ref to get_trip_details or get_seat_availability. Seat counts are approximate; always relay the disclaimer. Booking and payment happen on the Easybook website via booking_url.