Hello,
Routes do not necessarily have a single ordering of stops that every trip follows. For example, the Red Line has the Ashmont and Braintree branches, and many bus routes have "variants" that skip or add stops. We call these Route Patterns — groups of trips that share the same route, direction, and stops. Route patterns have a `representative_trip` relationship that gives you one of the trips, arbitrarily, and trips then have a `stops` relationship which is ordered by stop sequence (equivalent to calling `/schedules` with a `filter[trip]`, sorting by `stop_sequence`, and mapping each schedule to its related `stop`).
The appropriate way to deal with route patterns will depend on your app. MBTA.com, for example, has a
route pattern selector for bus routes (click the down-pointing triangle just above the map). Note this uses the `typicality` field of route patterns to decide which pattern to start on, and to initially hide "uncommon" patterns; you can read about that field in the
RoutePatternResource section of our
Swagger docs.
—Developer@MBTA