OTP Fare info by leg

41 views
Skip to first unread message

Daniel Heppner

unread,
Apr 20, 2022, 12:23:03 AM4/20/22
to OpenTripPlanner Developers
We are looking to add fare information to OTP on a per-leg basis. This is already supported at a basic level by the current API via the fareDetails object which appears in the fare object on an itinerary. Currently, as far as I can tell, the only fare module that uses this is the default one which pulls fares from the GTFS file.

This fareDetails object appears to include fares that are linked to legs via the route ID. However, the route ID is not a durable method of making this link since there could be multiple legs with the same route ID (loop routes, for example).

More information on the existing API structure, and some of our ideas for possible changes are described in this Google Doc.
Currently we are favoring Option 1.1, as it has minimal changes to the existing API (only two additional properties), and should support more durable linking between legs and fares.
Reply all
Reply to author
Forward
0 new messages