Shapes endpoint and route relationships

43 views
Skip to first unread message

Brian Runck

unread,
Feb 5, 2022, 10:34:04 PM2/5/22
to MBTA Developers
I can't seem to get route information included with the Shapes endpoint, although I think it used to work.

If I do this:


I get results with only Shapes but no route relationships are returned.

Am I doing something wrong?

Developer at MBTA

unread,
Feb 25, 2022, 4:20:09 PM2/25/22
to MBTA Developers
Hi Brian,

Shapes have "route" and "stops" relationships only in versions of the API before 2020-05-01, as mentioned in the Changelog. These were removed because RoutePatterns now provide a better way to get the same information (what "patterns of service" exist on each route). If you need to go back to a previous version for compatibility with older code, there are ways to specify this: see our Versioning page. Locking your requests to a specific version is generally recommended, otherwise you may be surprised by backwards-incompatible changes.

Separately, there is a known issue where a request is allowed to `include` a relationship that doesn't exist, if the relationship does exist in past API versions. Instead of an error, a normal response is returned with an "empty" relationship. We are working on addressing this, but thank you for bringing this instance to our attention.

—Developer@MBTA
Reply all
Reply to author
Forward
0 new messages