@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api PTV Timetable API - Version 3
@base https://timetableapi.ptv.vic.gov.au
@version v3
@auth ApiKey token in query
@common_fields {token: any, devid: any, signature: any}
@endpoints 26
@hint download_for_search
@toc departures(2), directions(3), disruptions(6), fare_estimate(1), outlets(2), pattern(1), routes(2), route_types(1), runs(4), search(1), stops(3)

@group departures
@endpoint GET /v3/departures/route_type/{route_type}/stop/{stop_id}
@required {route_type: any, stop_id: any}
@optional {platform_numbers: any, direction_id: any, gtfs: any, date_utc: any, max_results: any, include_cancelled: any, look_backwards: any, expand: any, include_geopath: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/departures/route_type/{route_type}/stop/{stop_id}/route/{route_id}
@required {route_type: any, stop_id: any, route_id: any}
@optional {direction_id: any, gtfs: any, date_utc: any, max_results: any, include_cancelled: any, look_backwards: any, expand: any, include_geopath: any}
@returns(200)
@errors {400, 403}

@endgroup

@group directions
@endpoint GET /v3/directions/route/{route_id}
@required {route_id: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/directions/{direction_id}
@required {direction_id: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/directions/{direction_id}/route_type/{route_type}
@required {direction_id: any, route_type: any}
@returns(200)
@errors {400, 403}

@endgroup

@group disruptions
@endpoint GET /v3/disruptions
@optional {route_types: any, disruption_modes: any, disruption_status: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/disruptions/route/{route_id}
@required {route_id: any}
@optional {disruption_status: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/disruptions/route/{route_id}/stop/{stop_id}
@required {route_id: any, stop_id: any}
@optional {disruption_status: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/disruptions/stop/{stop_id}
@required {stop_id: any}
@optional {disruption_status: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/disruptions/{disruption_id}
@required {disruption_id: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/disruptions/modes
@returns(200)
@errors {400, 403}

@endgroup

@group fare_estimate
@endpoint GET /v3/fare_estimate/min_zone/{minZone}/max_zone/{maxZone}
@required {minZone: any, maxZone: any}
@optional {journey_touch_on_utc: any, journey_touch_off_utc: any, is_journey_in_free_tram_zone: any, is_journey_in_overlap_zone: any, travelled_route_types: any}
@returns(200)
@errors {400, 403}

@endgroup

@group outlets
@endpoint GET /v3/outlets
@optional {max_results: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/outlets/location/{latitude},{longitude}
@required {latitude: any, longitude: any}
@optional {max_distance: any, max_results: any}
@returns(200)
@errors {400, 403}

@endgroup

@group pattern
@endpoint GET /v3/pattern/run/{run_ref}/route_type/{route_type}
@required {run_ref: any, route_type: any}
@optional {expand: any, stop_id: any, date_utc: any, include_skipped_stops: any, include_geopath: any, include_advertised_interchange: any}
@returns(200)
@errors {400, 403}

@endgroup

@group routes
@endpoint GET /v3/routes
@optional {route_types: any, route_name: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/routes/{route_id}
@required {route_id: any}
@optional {include_geopath: any, geopath_utc: any}
@returns(200)
@errors {400, 403}

@endgroup

@group route_types
@endpoint GET /v3/route_types
@returns(200)
@errors {400, 403}

@endgroup

@group runs
@endpoint GET /v3/runs/route/{route_id}
@required {route_id: any}
@optional {expand: any, date_utc: any, include_advertised_interchange: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/runs/route/{route_id}/route_type/{route_type}
@required {route_id: any, route_type: any}
@optional {expand: any, date_utc: any, include_advertised_interchange: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/runs/{run_ref}
@required {run_ref: any}
@optional {include_geopath: any, expand: any, date_utc: any, include_advertised_interchange: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/runs/{run_ref}/route_type/{route_type}
@required {run_ref: any, route_type: any}
@optional {expand: any, date_utc: any, include_geopath: any}
@returns(200)
@errors {400, 403}

@endgroup

@group search
@endpoint GET /v3/search/{search_term}
@required {search_term: any}
@optional {route_types: any, latitude: any, longitude: any, max_distance: any, include_addresses: any, include_outlets: any, match_stop_by_suburb: any, match_route_by_suburb: any, match_stop_by_gtfs_stop_id: any}
@returns(200)
@errors {400, 403}

@endgroup

@group stops
@endpoint GET /v3/stops/{stop_id}/route_type/{route_type}
@required {stop_id: any, route_type: any}
@optional {stop_location: any, stop_amenities: any, stop_accessibility: any, stop_contact: any, stop_ticket: any, gtfs: any, stop_staffing: any, stop_disruptions: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/stops/route/{route_id}/route_type/{route_type}
@required {route_id: any, route_type: any}
@optional {direction_id: any, stop_disruptions: any, include_geopath: any, geopath_utc: any, include_advertised_interchange: any}
@returns(200)
@errors {400, 403}

@endpoint GET /v3/stops/location/{latitude},{longitude}
@required {latitude: any, longitude: any}
@optional {route_types: any, max_results: any, max_distance: any, stop_disruptions: any}
@returns(200)
@errors {400, 403}

@endgroup

@end
