All bus Routes belong to a Route Group. The Route Group dictates universal properties like color, foreground text color and sort order for the routes it contains.
Think of a Route Group like a section of the Maps and Schedules book, and each page as a route.
API Definitions
Get a route
Path Parameters
routeId
string
required
The id of a route.
Query Parameters
No query parameters.
Response Object
id
string
Stable identifier for this route.
number
string | null
Route name number. Example: "50".
firstTrip
string
The time of the first trip of the day for this route.
lastTrip
string
The time of the last trip of the day for this route.
lastTripAfterMidnight
boolean
True if the last trip of the day is after midnight.
dayType
object
The days and times of day this route is active.
dayPart
string
The part of day. Examples: "Weekday", "Saturday", "Gameday".
timePart
string
The time of day. Examples: "Day", "Night", "Late Night".
daysOfWeek
string
A zero-indexed comma-separated list of ints representing the days of the week this dayType is active. Examples: "1,2,3,4,5" for weekdays only, "0,6" for weekends only.
Value
Definition
0
Sunday
1
Monday
2
Tuesday
3
Wednesday
4
Thursday
5
Friday
6
Saturday
sortOrder
integer
Number used to sort day types in logical order. Lower numbers should appear first in a list.
gtfsRoutes
string[]
GTFS route IDs associated with this route.
routeGroupId
string
The ID of the route group this route belongs to.
GEThttps://api.mtd.dev/routes/{routeId}
curl -X GET "https://api.mtd.dev/routes/{routeId}" \ -H "X-ApiKey: YOUR_API_KEY"
Number used to sort route groups in logical order. Lower numbers should appear first in a list.
routeGroupName
string
The route name. Examples: "Silver Limited", "Gold", "Blue".
color
string
Hex color code used to represent this route group. # sign is omitted.
textColor
string
Hex text color code for use on top of the route color. # sign is omitted.
routes
Array of routes
The routes within this route group.
id
string
Stable identifier for this route.
number
string | null
Route name number. Example: "50".
firstTrip
string
The time of the first trip of the day for this route.
lastTrip
string
The time of the last trip of the day for this route.
lastTripAfterMidnight
boolean
True if the last trip of the day is after midnight.
dayType
object
The days and times of day this route is active.
dayPart
string
The part of day. Examples: "Weekday", "Saturday", "Gameday".
timePart
string
The time of day. Examples: "Day", "Night", "Late Night".
daysOfWeek
string
A zero-indexed comma-separated list of ints representing the days of the week this dayType is active. Examples: "1,2,3,4,5" for weekdays only, "0,6" for weekends only.
Value
Definition
0
Sunday
1
Monday
2
Tuesday
3
Wednesday
4
Thursday
5
Friday
6
Saturday
sortOrder
integer
Number used to sort day types in logical order. Lower numbers should appear first in a list.
Number used to sort route groups in logical order. Lower numbers should appear first in a list.
routeGroupName
string
The route name. Examples: "Silver Limited", "Gold", "Blue".
color
string
Hex color code used to represent this route group. # sign is omitted.
textColor
string
Hex text color code for use on top of the route color. # sign is omitted.
routes
Array of routes
The routes within this route group.
id
string
Stable identifier for this route.
number
string | null
Route name number. Example: "50".
firstTrip
string
The time of the first trip of the day for this route.
lastTrip
string
The time of the last trip of the day for this route.
lastTripAfterMidnight
boolean
True if the last trip of the day is after midnight.
dayType
object
The days and times of day this route is active.
dayPart
string
The part of day. Examples: "Weekday", "Saturday", "Gameday".
timePart
string
The time of day. Examples: "Day", "Night", "Late Night".
daysOfWeek
string
A zero-indexed comma-separated list of ints representing the days of the week this dayType is active. Examples: "1,2,3,4,5" for weekdays only, "0,6" for weekends only.
Value
Definition
0
Sunday
1
Monday
2
Tuesday
3
Wednesday
4
Thursday
5
Friday
6
Saturday
sortOrder
integer
Number used to sort day types in logical order. Lower numbers should appear first in a list.
gtfsRoutes
string[]
GTFS route IDs associated with this route.
routeGroupId
string
The ID of the route group this route belongs to.
GEThttps://api.mtd.dev/routes/groups
curl -X GET "https://api.mtd.dev/routes/groups" \ -H "X-ApiKey: YOUR_API_KEY"