-
Notifications
You must be signed in to change notification settings - Fork 4
TSO API
All examples shown below are parsed into JSON objects after processing responses as documented in Handling Responses
- https://publictransportation.tsomobile.com/rest/Routes/help
- https://publictransportation.tsomobile.com/rest/PubTrans/help
- https://publictransportation.tsomobile.com/rest/MappingController/help
- https://publictransportation.tsomobile.com/rest/Drivers/help
Returns a JSON object containing route stops, names, and points along the route path. This API can return either a single route or all routes for a given Service Area.
https://rest.tsoapi.com/routes/getRouteFromToken
| Name | Required | Description | Example |
|---|---|---|---|
| tkn | required | Service Area Token Value | 81E39EC9-D773-447E-BE29-D7F30AB177BC |
| routeId | required | An internal numerical ID representing a route number. If set to -1 all data available is returned for the Service Area. |
95029 |
GET https://rest.tsoapi.com/Routes/GetRouteFromToken?tkn=582EB861-9C13-4C89-B491-15F0AFBF9F47&routeId=-1
{
"stops": [{
"ID": "1095209",
"ContactID": "9154481",
"StopNumber": "4000",
"Street": "11104 U.S. 41 Sou...",
"City": "University Park",
"State": "FL",
"PostalCode": "33174",
"CountryCode": "US",
"Sequence": "1",
"Latitude": "25.760499",
"Longitude": "-80.374588",
"Description": "FIU Modesto...",
"RouteId": "95817"
}],
"routes": [{
"Name": "Doral Transportation",
"MapType": "MAP",
"MapImageURL": "MapImag.png",
"RouteId": "95817",
"ShowAutomatically": "True",
"Name1": "FIU Trolley Route",
"LineColor": "#7A1699",
"RoutePath": "cjf|CvdqiN?Q...",
"StopIconURL": "Stop_Smal.png",
"UnitIconURL": "Unit_Purple.png"
}],
"points": [{
"Id": "924917",
"RouteId": "95817",
"Lat": "25.7604000000",
"Lng": "-80.3746000000",
"Direction": "E ",
"Angle": "88.603660",
"StopA": "",
"StopB": "",
"Seq": "0",
"DesignerStopID": "",
"OriginalLat": "25.7604962054",
"OriginalLng": "-80.3746827543",
"AudioID": ""
}]
}
Parameters: lan (Current Language), geofencesid (Selected Routes), tkn
(Token)
GetUnitFromRoute
https://rest.tsoapi.com/MappingController/GetUnitFromRoute?tkn=582EB861-9C13-4C89-B491-15F0AFBF9F47&geofencesid=95836&lan=en
GetUnitFromRouteAntibunchinghttps://rest.tsoapi.com/MappingController/GetUnitFromRouteAntibunching?tkn=582EB861-9C13-4C89-B491-15F0AFBF9F47&geofencesid=95836&lan=en
GetGeofences
???
Some systems like the Aventura Express Shuttle Bus donโt support the Routes API,
since itโs hard to find the Service Area Token. In those cases, this endpoint
must be used. The id parameter here identifies Service Area IDs instead of
tkn.
GetModuleInfoPublic
https://rest.tsoapi.com/PubTrans/GetModuleInfoPublic?Key=ROUTES&id=26082&lan=en
https://rest.tsoapi.com/PubTrans/GetModuleInfoPublic?Key=UNITS_LOCATION_ROUTE&id=85862&lan=en