Skip to content

TSO API

ciolt edited this page Feb 8, 2019 · 13 revisions

TSO Mobile REST API Reference

All examples shown below are parsed into JSON objects after processing responses as documented in Handling Responses

Additional Reference

Routes API

GET Routes/GetRouteFromToken

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.

Resource URL

https://rest.tsoapi.com/routes/getRouteFromToken

Parameters

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

Example Request

GET https://rest.tsoapi.com/Routes/GetRouteFromToken?tkn=582EB861-9C13-4C89-B491-15F0AFBF9F47&routeId=-1

Example Response

{
  "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": ""
  }]
}

Mapping API

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

GetUnitFromRouteAntibunching https://rest.tsoapi.com/MappingController/GetUnitFromRouteAntibunching?tkn=582EB861-9C13-4C89-B491-15F0AFBF9F47&geofencesid=95836&lan=en

GetGeofences
???

Public Transportation API

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

"Where Am I"/Nearby Stops
id: Company ID
f1: latitude
f2: longitude
https://rest.tsoapi.com/PubTrans/GetModuleInfoPublic?Key=WAI_NEAREST_STOPS&id=26082&f1=25.732710400000002&f2=-80.2594816&lan=en
id: internal ROUTE ID
https://rest.tsoapi.com/PubTrans/GetModuleInfoPublic?Key=ROUTE_STOPS_AND_UNITS&id=92089&lan=en
id: internal ROUTE ID
https://rest.tsoapi.com/PubTrans/GetModuleInfoPublic?Key=UNITS_LOCATION_ROUTE&id=92089&lan=en
https://rest.tsoapi.com/PubTrans/GetModuleInfoPublic?Key=UNITS_LOCATION_ROUTE&id=85862&lan=en
id: internal Stop ID
f1: Company ID
https://rest.tsoapi.com/PubTrans/GetModuleInfoPublic?Key=STOPINFO_WITHOVERLAPS&id=1067128&f1=30109&lan=en