{"note":"OpenAPI conversion -- returning structured metadata","name":"ptv-vic-gov-au","description":"PTV Timetable API - Version 3","version":"v3","base_url":"https://timetableapi.ptv.vic.gov.au","endpoints":26,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api PTV Timetable API - Version 3\n@base https://timetableapi.ptv.vic.gov.au\n@version v3\n@auth ApiKey token in query\n@common_fields {token: any # Please ignore, devid: any # Your developer id, signature: any # Authentication signature for request}\n@endpoints 26\n@hint download_for_search\n@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)\n\n@group departures\n@endpoint GET /v3/departures/route_type/{route_type}/stop/{stop_id}\n@desc View departures for all routes from a stop\n@required {route_type: any # Number identifying transport mode; values returned via RouteTypes API, stop_id: any # Identifier of stop; values returned by Stops API}\n@optional {platform_numbers: any # Filter by platform number at stop, direction_id: any # Filter by identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id}, gtfs: any # Indicates that stop_id parameter will accept \"GTFS stop_id\" data, date_utc: any # Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time), max_results: any # Maximum number of results returned, include_cancelled: any # Indicates if cancelled services (if they exist) are returned (default = false) - metropolitan train only, look_backwards: any # Indicates if filtering runs (and their departures) to those that arrive at destination before date_utc (default = false). Requires max_results > 0., expand: any # List of objects to be returned in full (i.e. expanded) - options include: All, Stop, Route, Run, Direction, Disruption, VehiclePosition, VehicleDescriptor or None.\r Run must be expanded to receive VehiclePosition and VehicleDescriptor information., include_geopath: any # Indicates if the route geopath should be returned}\n@returns(200) Service departures from the specified stop for all routes of the specified route type; departures are timetabled and real-time (if applicable).\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/departures/route_type/{route_type}/stop/{stop_id}/route/{route_id}\n@desc View departures for a specific route from a stop\n@required {route_type: any # Number identifying transport mode; values returned via RouteTypes API, stop_id: any # Identifier of stop; values returned by Stops API, route_id: any # Identifier of route; values returned by Routes API - v3/routes}\n@optional {direction_id: any # Filter by identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id}, gtfs: any # Indicates that stop_id parameter will accept \"GTFS stop_id\" data, date_utc: any # Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time), max_results: any # Maximum number of results returned, include_cancelled: any # Indicates if cancelled services (if they exist) are returned (default = false) - metropolitan train only, look_backwards: any # Indicates if filtering runs (and their departures) to those that arrive at destination before date_utc (default = false). Requires max_results > 0., expand: any # List of objects to be returned in full (i.e. expanded) - options include: All, Stop, Route, Run, Direction, Disruption, VehiclePosition, VehicleDescriptor or None.\r Run must be expanded to receive VehiclePosition and VehicleDescriptor information., include_geopath: any # Indicates if the route geopath should be returned}\n@returns(200) Service departures from the specified stop for the specified route (and route type); departures are timetabled and real-time (if applicable).\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group directions\n@endpoint GET /v3/directions/route/{route_id}\n@desc View directions that a route travels in\n@required {route_id: any # Identifier of route; values returned by Routes API - v3/routes}\n@returns(200) The directions that a specified route travels in.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/directions/{direction_id}\n@desc View all routes for a direction of travel\n@required {direction_id: any # Identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id}}\n@returns(200) All routes that travel in the specified direction.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/directions/{direction_id}/route_type/{route_type}\n@desc View all routes of a particular type for a direction of travel\n@required {direction_id: any # Identifier of direction of travel; values returned by Directions API - /v3/directions/route/{route_id}, route_type: any # Number identifying transport mode; values returned via RouteTypes API}\n@returns(200) All routes of the specified route type that travel in the specified direction.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group disruptions\n@endpoint GET /v3/disruptions\n@desc View all disruptions for all route types\n@optional {route_types: any # Filter by route_type; values returned via RouteTypes API, disruption_modes: any # Filter by disruption_mode; values returned via v3/disruptions/modes API, disruption_status: any # Filter by status of disruption}\n@returns(200) All disruption information for all route types.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/disruptions/route/{route_id}\n@desc View all disruptions for a particular route\n@required {route_id: any # Identifier of route; values returned by Routes API - v3/routes}\n@optional {disruption_status: any # Filter by status of disruption}\n@returns(200) All disruption information (if any exists) for the specified route.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/disruptions/route/{route_id}/stop/{stop_id}\n@desc View all disruptions for a particular route and stop\n@required {route_id: any # Identifier of route; values returned by Routes API - v3/routes, stop_id: any # Identifier of stop; values returned by Stops API - v3/stops}\n@optional {disruption_status: any # Filter by status of disruption}\n@returns(200) All disruption information (if any exists) for the specified route and stop.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/disruptions/stop/{stop_id}\n@desc View all disruptions for a particular stop\n@required {stop_id: any # Identifier of stop; values returned by Stops API - v3/stops}\n@optional {disruption_status: any # Filter by status of disruption}\n@returns(200) All disruption information (if any exists) for the specified stop.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/disruptions/{disruption_id}\n@desc View a specific disruption\n@required {disruption_id: any # Identifier of disruption; values returned by Disruptions API - /v3/disruptions OR /v3/disruptions/route/{route_id}}\n@returns(200) Disruption information for the specified disruption ID.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/disruptions/modes\n@desc Get all disruption modes\n@returns(200) Disruption specific modes\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group fare_estimate\n@endpoint GET /v3/fare_estimate/min_zone/{minZone}/max_zone/{maxZone}\n@desc Estimate a fare by zone\n@required {minZone: any # Minimum Zone travelled through ie. 1, maxZone: any # Maximum Zone travelled through id. 6}\n@optional {journey_touch_on_utc: any # JourneyTouchOnUtc in format yyyy-M-d h:m (e.g 2016-5-31 16:53)., journey_touch_off_utc: any # JourneyTouchOffUtc in format yyyy-M-d h:m (e.g 2016-5-31 16:53)., is_journey_in_free_tram_zone: any, is_journey_in_overlap_zone: any, travelled_route_types: any}\n@returns(200) Resultant set fare estimates\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group outlets\n@endpoint GET /v3/outlets\n@desc List all ticket outlets\n@optional {max_results: any # Maximum number of results returned (default = 30)}\n@returns(200) Ticket outlets.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/outlets/location/{latitude},{longitude}\n@desc List ticket outlets near a specific location\n@required {latitude: any # Geographic coordinate of latitude, longitude: any # Geographic coordinate of longitude}\n@optional {max_distance: any # Filter by maximum distance (in metres) from location specified via latitude and longitude parameters (default = 300), max_results: any # Maximum number of results returned (default = 30)}\n@returns(200) Ticket outlets near the specified location.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group pattern\n@endpoint GET /v3/pattern/run/{run_ref}/route_type/{route_type}\n@desc View the stopping pattern for a specific trip/service run\n@required {run_ref: any # The run_ref is the identifier of a run as returned by the departures/* and runs/* endpoints. WARNING, run_id is deprecated. Use run_ref instead., route_type: any # Number identifying transport mode; values returned via RouteTypes API}\n@optional {expand: any # List of objects to be returned in full (i.e. expanded) - options include: All, Stop, Route, Run, Direction, Disruption, VehiclePosition, VehicleDescriptor and None. Default is Disruption. Run must be expanded to receive VehiclePosition and VehicleDescriptor information., stop_id: any # Filter by stop_id; values returned by Stops API, date_utc: any # Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time), include_skipped_stops: any # Include any skipped stops in a stopping pattern. Defaults to false., include_geopath: any # Indicates if geopath data will be returned (default = false), include_advertised_interchange: any # Indicates whether data related to interchanges should be included in the response (default = false)\r When set to true, this parameter enables API clients to retrieve additional exchange information (stops, routes, runs, directions and disruptions) in a single call instead of making multiple requests}\n@returns(200) The stopping pattern of the specified run_ref and route type. (NOTE: the departure sequence field should be used to sort departures in chronological order, however it is not always N+1 or N-1 of the previous or following departure. e.g 100, 200, 250, 300 instead of 1, 2, 3, 4)\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group routes\n@endpoint GET /v3/routes\n@desc View route names and numbers for all routes\n@optional {route_types: any # Filter by route_type; values returned via RouteTypes API, route_name: any # Filter by name  of route (accepts partial route name matches)}\n@returns(200) Route names and numbers for all routes of all route types.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/routes/{route_id}\n@desc View route name and number for specific route ID\n@required {route_id: any # Identifier of route; values returned by Departures, Directions and Disruptions APIs}\n@optional {include_geopath: any # Indicates kif geopath data will be returned (default = false), geopath_utc: any # Filter geopaths by date (ISO 8601 UTC format) (default = current date)}\n@returns(200) The route name and number for the specified route ID.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group route_types\n@endpoint GET /v3/route_types\n@desc View all route types and their names\n@returns(200) All route types (i.e. identifiers of transport modes) and their names.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group runs\n@endpoint GET /v3/runs/route/{route_id}\n@desc View all trip/service runs for a specific route ID\n@required {route_id: any # Identifier of route; values returned by Routes API - v3/routes.}\n@optional {expand: any # List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None., date_utc: any # Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time), include_advertised_interchange: any # Indicates whether data related to interchanges should be included in the response (default = false).\r When set to true, this parameter enables API clients to retrieve additional exchange information (stops, routes, runs, directions and disruptions) in a single call instead of making multiple requests}\n@returns(200) All trip/service run details for the specified route ID.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/runs/route/{route_id}/route_type/{route_type}\n@desc View all trip/service runs for a specific route ID and route type\n@required {route_id: any # Identifier of route; values returned by Routes API - v3/routes., route_type: any # Number identifying transport mode; values returned via RouteTypes API}\n@optional {expand: any # List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None., date_utc: any # Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time), include_advertised_interchange: any # Indicates whether data related to interchanges should be included in the response (default = false).\r When set to true, this parameter enables API clients to retrieve additional exchange information (stops, routes, runs, directions and disruptions) in a single call instead of making multiple requests}\n@returns(200) All trip/service run details for the specified route ID and route type.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/runs/{run_ref}\n@desc View all trip/service runs for a specific run_ref\n@required {run_ref: any # The run_ref is the identifier of a run as returned by the departures/* and runs/* endpoints. WARNING, run_id is deprecated. Use run_ref instead.}\n@optional {include_geopath: any # Indicates if geopath data will be returned (default = false), expand: any # List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None., date_utc: any # Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time), include_advertised_interchange: any # Indicates whether data related to interchanges should be included in the response (default = false).\r When set to true, this parameter enables API clients to retrieve additional exchange information (stops, routes, runs, directions and disruptions) in a single call instead of making multiple requests}\n@returns(200) All trip/service run details for the specified run_ref.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/runs/{run_ref}/route_type/{route_type}\n@desc View the trip/service run for a specific run_ref and route type\n@required {run_ref: any # The run_ref is the identifier of a run as returned by the departures/* and runs/* endpoints. WARNING, run_id is deprecated. Use run_ref instead., route_type: any # Number identifying transport mode; values returned via RouteTypes API}\n@optional {expand: any # List of objects to be returned in full (i.e. expanded) - options include: All, VehiclePosition, VehicleDescriptor, or None. Default is None., date_utc: any # Filter by the date and time of the request (ISO 8601 UTC format) (default = current date and time), include_geopath: any # Indicates if geopath data will be returned (default = false)}\n@returns(200) The trip/service run details for the run_ref and route type specified.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group search\n@endpoint GET /v3/search/{search_term}\n@desc View stops, routes and myki ticket outlets that match the search term\n@required {search_term: any # Search text (note: if search text is numeric and/or less than 3 characters, the API will only return routes)}\n@optional {route_types: any # Filter by route_type; values returned via RouteTypes API (note: stops and routes are ordered by route_types specified), latitude: any # Filter by geographic coordinate of latitude, longitude: any # Filter by geographic coordinate of longitude, max_distance: any # Filter by maximum distance (in metres) from location specified via latitude and longitude parameters, include_addresses: any # Placeholder for future development; currently unavailable, include_outlets: any # Indicates if outlets will be returned in response (default = true), match_stop_by_suburb: any # Indicates whether to find stops by suburbs in the search term (default = true), match_route_by_suburb: any # Indicates whether to find routes by suburbs in the search term (default = true), match_stop_by_gtfs_stop_id: any # Indicates whether to search for stops according to a metlink stop ID (default = false)}\n@returns(200) Stops, routes and myki ticket outlets that contain the search term (note: stops and routes are ordered by route_type by default).\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@group stops\n@endpoint GET /v3/stops/{stop_id}/route_type/{route_type}\n@desc View facilities at a specific stop (Metro and V/Line stations only)\n@required {stop_id: any # Identifier of stop; values returned by Stops API, route_type: any # Number identifying transport mode; values returned via RouteTypes API}\n@optional {stop_location: any # Indicates if stop location information will be returned (default = false), stop_amenities: any # Indicates if stop amenity information will be returned (default = false), stop_accessibility: any # Indicates if stop accessibility information will be returned (default = false), stop_contact: any # Indicates if stop contact information will be returned (default = false), stop_ticket: any # Indicates if stop ticket information will be returned (default = false), gtfs: any # Incdicates whether the stop_id is a GTFS ID or not, stop_staffing: any # Indicates if stop staffing information will be returned (default = false), stop_disruptions: any # Indicates if stop disruption information will be returned (default = false)}\n@returns(200) Stop location, amenity and accessibility facility information for the specified stop (metropolitan and V/Line stations only).\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/stops/route/{route_id}/route_type/{route_type}\n@desc View all stops on a specific route\n@required {route_id: any # Identifier of route; values returned by Routes API - v3/routes, route_type: any # Number identifying transport mode; values returned via RouteTypes API}\n@optional {direction_id: any # Direction for which the stops need to be returned, stop_disruptions: any # Flag to specify whether disruptions should be included in the response, include_geopath: any # Flag to specify whether geo_path should be included in the response, geopath_utc: any # Filter geopaths by date (ISO 8601 UTC format) (default = current date), include_advertised_interchange: any # Flag to specify whether additional stops for interchanges should be included in the response. Note-: To make use of this flag please pass in direction_id.}\n@returns(200) All stops on the specified route.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endpoint GET /v3/stops/location/{latitude},{longitude}\n@desc View all stops near a specific location\n@required {latitude: any # Geographic coordinate of latitude, longitude: any # Geographic coordinate of longitude}\n@optional {route_types: any # Filter by route_type; values returned via RouteTypes API, max_results: any # Maximum number of results returned (default = 30), max_distance: any # Filter by maximum distance (in metres) from location specified via latitude and longitude parameters (default = 300), stop_disruptions: any # Indicates if stop disruption information will be returned (default = false)}\n@returns(200) All stops near the specified location.\n@errors {400: Invalid Request, 403: Access Denied}\n\n@endgroup\n\n@end\n"}