Service Messages


The service messages call returns the current service messages at stops. Service message responses include the message description and the IDs of the affected routes. Where agencies provide ids of affected routes and stops, the returned messages are filtered for the routes and stops provided in the request. The routes and stops provided in the request are combined. As an example, if route "Red Line" and stop "70053" are provided in the request, and the agency feed provides routes and stops in its service message feed, then the messages returned are the messages that affect the route "Red Line" and the messages that affect the stop "70053".

Call format


PartDescriptionOptionalExample
URLTransiCast web server instance URLhttp://transicast.appspot.com/ws/V3
Servlet descriptordetoursdetours
Parameter:
agency=<agency id>
Agency ID, as provided by the agencies callagency=WMATA
Parameter:
locIDs=<stop id, ... >
Comma separated list of stop IDs, as provided by the stops call
locIDs=5017
Parameter:
routes=<route id, ... >
Comma separated list of Route IDs, as provided by the route list call
route=28

http://transicast.appspot.com/ws/V3/detours?agency=WMATA&locIDs=5017&routes=Yellow&appid=<api_key>

Response format


Individual messages are returned through the <detour> tag. It contains the following attributes:

AttributeDescriptionKeyUsed inExample
idAgency provided message IDid="23184"
descMessage descriptiondesc="Street closure, Stop ID 7751 on SW 6th at Burnside will not be served."
fulldescLong descriptionfulldesc="Due to a street closure, Stop ID 7751 on SW 6th at Burnside will not be served. A temporary stop is located on NW Broadway between Couch and Davis."
phoneticText-to-speech friendly message descriptionphonetic="Due to a street closure, Stop ID 7751 on SW 6th at Burnside will not be served. A temporary stop is located on NW Broadway between Kooch and Davis."
periodTag: Validity period, see below
routeTag: Affected route, see below

Where provided by the agency, each message contains <period> tags which identify the valid times of the message. It contains the following attributes:

AttributeDescriptionKeyUsed inExample
beginBegin timebegin="1366062420000"
endEnd timeend="2123226000000"

In addition, where provided by the agency, each message contains <route> tags which identify the affected routes by route ID. It contains the following attributes:

AttributeDescriptionKeyUsed inExample
routeRoute IDRoute list, as key valueroute="35"

<?xml version="1.0" encoding="UTF-8"?>
<resultSet queryTime="1319389595177" ct="4">
<detour desc="Blue Line: Trains are single tracking btwn Stadium-Armory & Addison Rd due to scheduled track maintenance. Expect delays in both directions.">
    <route route="Blue"/></detour>
<detour desc="Red Line: Thru closing Sun. Oct. 23rd, buses replace trains btwn Ft. Totten and N.Y. Ave. stations. Shuttle svc is provided.">
    <route route="Red"/></detour>
<detour desc="Red Line: Thru closing Sun. Oct. 23rd, Rhode Island Ave & Brookland stations are closed for track maintenance. Shuttle svc is provided.">
    <route route="Red"/></detour>
<detour desc="Green Line: Trains are single tracking btwn Fort Totten & PG Plaza due to scheduled track maintenance. Expect delays in both directions.">
    <route route="Green"/></detour>
</resultSet>

In addition to the structured service messages, links to the service messages of the agency's customer facing web site might be provided. The links are provided through the <ersatzLink> tag.

<?xml version="1.0" encoding="UTF-8"?>
<resultSet queryTime="1341460335052" ct="0">
<ersatzLink>http://www.psta.net/RiderAlert.htm</ersatzLink>
</resultSet>

Notes

Contact

By email  

© 2011 - 2023 TransiCast