ApiItinerary Data Type

An Itinerary is one complete way of getting from the start location to the end location.

Properties
name data type constraints description
duration number   Duration of the trip on this itinerary, in seconds.
startTime number   Time that the trip departs.
endTime number   Time that the trip arrives.
walkTime number required How much time is spent walking, in seconds.
transitTime number required How much time is spent on transit, in seconds.
waitingTime number required How much time is spent waiting for transit to arrive, in seconds.
walkDistance number   How far the user has to walk, in meters.
walkLimitExceeded boolean required Indicates that the walk limit distance has been exceeded for this itinerary when true.
elevationLost number   How much elevation is lost, in total, over the course of the trip, in meters. As an example, a trip that went from the top of Mount Everest straight down to sea level, then back up K2, then back down again would have an elevationLost of Everest + K2.
elevationGained number   How much elevation is gained, in total, over the course of the trip, in meters. See elevationLost.
transfers number   The number of transfers this trip has.
fare Fare   The cost of this trip
legs array of ApiLeg   A list of Legs. Each Leg is either a walking (cycling, car) portion of the trip, or a transit trip on a particular vehicle. So a trip where the use walks to the Q train, transfers to the 6, then walks to their destination, has four legs.
systemNotices array of ApiSystemNotice   A itinerary can be tagged with a system notice. System notices should only be added to a response if explicit asked for in the request.

For example when tuning or manually testing the itinerary-filter-chain it you can enable the org.opentripplanner.routing.core.RoutingRequest#debugItineraryFilter and instead of removing itineraries from the result the itineraries would be tagged by the filters instead. This enable investigating, why an expected itinerary is missing from the result set.

tooSloped boolean required This itinerary has a greater slope than the user requested (but there are no possible itineraries with a good slope).

Example

{
  "duration" : 12345,
  "startTime" : 12345,
  "endTime" : 12345,
  "walkTime" : 12345,
  "transitTime" : 12345,
  "waitingTime" : 12345,
  "walkDistance" : 12345.0,
  "walkLimitExceeded" : true,
  "elevationLost" : 12345.0,
  "elevationGained" : 12345.0,
  "transfers" : 12345,
  "fare" : {
    "fare" : {
      "property1" : {
        "currency" : { },
        "cents" : 12345
      },
      "property2" : {
        "currency" : { },
        "cents" : 12345
      }
    },
    "details" : {
      "property1" : [ {
        "fareId" : { },
        "price" : { },
        "routes" : [ { }, { } ]
      }, {
        "fareId" : { },
        "price" : { },
        "routes" : [ { }, { } ]
      } ],
      "property2" : [ {
        "fareId" : { },
        "price" : { },
        "routes" : [ { }, { } ]
      }, {
        "fareId" : { },
        "price" : { },
        "routes" : [ { }, { } ]
      } ]
    }
  },
  "legs" : [ {
    "startTime" : 12345,
    "endTime" : 12345,
    "departureDelay" : 12345,
    "arrivalDelay" : 12345,
    "realTime" : true,
    "isNonExactFrequency" : true,
    "headway" : 12345,
    "distance" : 12345.0,
    "pathway" : true,
    "mode" : "...",
    "transitLeg" : true,
    "route" : "...",
    "agencyName" : "...",
    "agencyUrl" : "...",
    "agencyBrandingUrl" : "...",
    "agencyTimeZoneOffset" : 12345,
    "routeColor" : "...",
    "routeType" : 12345,
    "routeId" : "...",
    "routeTextColor" : "...",
    "interlineWithPreviousLeg" : true,
    "tripShortName" : "...",
    "tripBlockId" : "...",
    "headsign" : "...",
    "agencyId" : "...",
    "tripId" : "...",
    "serviceDate" : "...",
    "routeBrandingUrl" : "...",
    "from" : {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKESHARE",
      "bikeShareId" : "..."
    },
    "to" : {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKESHARE",
      "bikeShareId" : "..."
    },
    "intermediateStops" : [ {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "NORMAL",
      "bikeShareId" : "..."
    }, {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "TRANSIT",
      "bikeShareId" : "..."
    } ],
    "legGeometry" : {
      "points" : "...",
      "levels" : "...",
      "length" : 12345
    },
    "steps" : [ {
      "distance" : 12345.0,
      "relativeDirection" : "CIRCLE_COUNTERCLOCKWISE",
      "streetName" : "...",
      "absoluteDirection" : "SOUTHWEST",
      "exit" : "...",
      "stayOn" : true,
      "area" : true,
      "bogusName" : true,
      "lon" : 12345.0,
      "lat" : 12345.0,
      "elevation" : "...",
      "alerts" : [ { }, { } ]
    }, {
      "distance" : 12345.0,
      "relativeDirection" : "DEPART",
      "streetName" : "...",
      "absoluteDirection" : "SOUTHEAST",
      "exit" : "...",
      "stayOn" : true,
      "area" : true,
      "bogusName" : true,
      "lon" : 12345.0,
      "lat" : 12345.0,
      "elevation" : "...",
      "alerts" : [ { }, { } ]
    } ],
    "alerts" : [ {
      "alertHeaderText" : "...",
      "alertDescriptionText" : "...",
      "alertUrl" : "...",
      "effectiveStartDate" : 12345,
      "effectiveEndDate" : 12345
    }, {
      "alertHeaderText" : "...",
      "alertDescriptionText" : "...",
      "alertUrl" : "...",
      "effectiveStartDate" : 12345,
      "effectiveEndDate" : 12345
    } ],
    "routeShortName" : "...",
    "routeLongName" : "...",
    "boardRule" : "...",
    "alightRule" : "...",
    "rentedBike" : true,
    "duration" : 12345.0
  }, {
    "startTime" : 12345,
    "endTime" : 12345,
    "departureDelay" : 12345,
    "arrivalDelay" : 12345,
    "realTime" : true,
    "isNonExactFrequency" : true,
    "headway" : 12345,
    "distance" : 12345.0,
    "pathway" : true,
    "mode" : "...",
    "transitLeg" : true,
    "route" : "...",
    "agencyName" : "...",
    "agencyUrl" : "...",
    "agencyBrandingUrl" : "...",
    "agencyTimeZoneOffset" : 12345,
    "routeColor" : "...",
    "routeType" : 12345,
    "routeId" : "...",
    "routeTextColor" : "...",
    "interlineWithPreviousLeg" : true,
    "tripShortName" : "...",
    "tripBlockId" : "...",
    "headsign" : "...",
    "agencyId" : "...",
    "tripId" : "...",
    "serviceDate" : "...",
    "routeBrandingUrl" : "...",
    "from" : {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "TRANSIT",
      "bikeShareId" : "..."
    },
    "to" : {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKEPARK",
      "bikeShareId" : "..."
    },
    "intermediateStops" : [ {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "NORMAL",
      "bikeShareId" : "..."
    }, {
      "name" : "...",
      "stopId" : "...",
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKEPARK",
      "bikeShareId" : "..."
    } ],
    "legGeometry" : {
      "points" : "...",
      "levels" : "...",
      "length" : 12345
    },
    "steps" : [ {
      "distance" : 12345.0,
      "relativeDirection" : "HARD_LEFT",
      "streetName" : "...",
      "absoluteDirection" : "NORTHEAST",
      "exit" : "...",
      "stayOn" : true,
      "area" : true,
      "bogusName" : true,
      "lon" : 12345.0,
      "lat" : 12345.0,
      "elevation" : "...",
      "alerts" : [ { }, { } ]
    }, {
      "distance" : 12345.0,
      "relativeDirection" : "SLIGHTLY_RIGHT",
      "streetName" : "...",
      "absoluteDirection" : "WEST",
      "exit" : "...",
      "stayOn" : true,
      "area" : true,
      "bogusName" : true,
      "lon" : 12345.0,
      "lat" : 12345.0,
      "elevation" : "...",
      "alerts" : [ { }, { } ]
    } ],
    "alerts" : [ {
      "alertHeaderText" : "...",
      "alertDescriptionText" : "...",
      "alertUrl" : "...",
      "effectiveStartDate" : 12345,
      "effectiveEndDate" : 12345
    }, {
      "alertHeaderText" : "...",
      "alertDescriptionText" : "...",
      "alertUrl" : "...",
      "effectiveStartDate" : 12345,
      "effectiveEndDate" : 12345
    } ],
    "routeShortName" : "...",
    "routeLongName" : "...",
    "boardRule" : "...",
    "alightRule" : "...",
    "rentedBike" : true,
    "duration" : 12345.0
  } ],
  "systemNotices" : [ {
    "tag" : "...",
    "text" : "..."
  }, {
    "tag" : "...",
    "text" : "..."
  } ],
  "tooSloped" : true
}