Skip navigation

Detours web service


Request parameters:

Name Value Description
routes comma delimited list of route numbers (optional) If present results will contain only detours applicable for the route numbers provided. If ommitted every detour in effect will be returned.
route alias for routes (optional) Same as routes.
appID string (required) Your appID received during registration.
json boolean (optional) "true" or "false" (default) If true results will be returned in json format rather than the default xml format.
includeFuture boolean (optional) "true" or "false" (default) If present returns detours with begin dates set in the future.
infolink boolean (optional) "true" or "false" (default) If present results will include detour[@info_link_url] attribute.
callback string (optional) If present returns the json result in a jsonp callback function. Only used if json is set to true.

Response fields:
The schema for the detours service is shared with the routeConfig service. It is defined at
note: all times values are in milliseconds since epoch. JSON times are formatted as a string 'yyyy-MM-ddTHH:mm:ss.SSSZ'.

Name Description
resultSet Root document all results
errorMessage This element will occur if there was an error processing your request and contains a description of the problem.
detour Contains information about a detour that may apply to one or more routes at the time the query was made.
detour[@begin] Time the detour begins. This will always be a time prior to the time the query was made. This field is used internally and may be of little use outside of TriMet.
detour[@desc] A plain text description of the detour.
detour[@end] The time the detour will become invalid. Note that this will always be a time after the time the query was made. Some end times will be very far in the future and will be removed once the detour is no longer in effect. This field is used internally and may be of little use outside of TriMet.
detour[@id] A unique identifier of the detour.
detour[@phonetic] A phonetic spelling of the route detour. This field is used by TriMet's 238-Ride text-to-speech system.
detour[@info_link_url] Included if infolink request parameter is set to true. Contains a url where more information can be found about the detour. Will be null if not available.
route This child element of detour occurs for every route the detour is applicable.
route[@desc] The description of the route number.
route[@route] The route's number (an integer).
route[@type] The type of the route, either 'B' for bus, or 'R' for fixed guidway (either rail or aerial tram).