Itinerary Data Type

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

Properties
name data type 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 How much time is spent walking, in seconds.
transitTime number How much time is spent on transit, in seconds.
waitingTime number 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 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 Leg 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.
tooSloped boolean 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" : "...",
    "route" : "...",
    "agencyName" : "...",
    "agencyUrl" : "...",
    "agencyBrandingUrl" : "...",
    "agencyTimeZoneOffset" : 12345,
    "routeColor" : "...",
    "routeType" : 12345,
    "routeId" : {
      "agencyId" : "...",
      "id" : "..."
    },
    "routeTextColor" : "...",
    "interlineWithPreviousLeg" : true,
    "tripShortName" : "...",
    "tripBlockId" : "...",
    "headsign" : "...",
    "agencyId" : "...",
    "tripId" : {
      "agencyId" : "...",
      "id" : "..."
    },
    "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" : "...",
      "boardAlightType" : "DEFAULT",
      "flagStopArea" : { }
    },
    "to" : {
      "name" : "...",
      "stopId" : { },
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKESHARE",
      "bikeShareId" : "...",
      "boardAlightType" : "FLAG_STOP",
      "flagStopArea" : { }
    },
    "intermediateStops" : [ {
      "name" : "...",
      "stopId" : { },
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKEPARK",
      "bikeShareId" : "...",
      "boardAlightType" : "DEFAULT",
      "flagStopArea" : { }
    }, {
      "name" : "...",
      "stopId" : { },
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKEPARK",
      "bikeShareId" : "...",
      "boardAlightType" : "DEFAULT",
      "flagStopArea" : { }
    } ],
    "legGeometry" : {
      "points" : "...",
      "levels" : "...",
      "length" : 12345
    },
    "steps" : [ {
      "distance" : 12345.0,
      "relativeDirection" : "HARD_LEFT",
      "streetName" : "...",
      "absoluteDirection" : "NORTHWEST",
      "exit" : "...",
      "stayOn" : true,
      "area" : true,
      "bogusName" : true,
      "lon" : 12345.0,
      "lat" : 12345.0,
      "elevation" : [ { }, { } ],
      "alerts" : [ { }, { } ]
    }, {
      "distance" : 12345.0,
      "relativeDirection" : "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
    }, {
      "alertHeaderText" : "...",
      "alertDescriptionText" : "...",
      "alertUrl" : "...",
      "effectiveStartDate" : 12345
    } ],
    "routeShortName" : "...",
    "routeLongName" : "...",
    "boardRule" : "...",
    "alightRule" : "...",
    "rentedBike" : true,
    "callAndRide" : true,
    "flexCallAndRideMaxStartTime" : 12345,
    "flexCallAndRideMinEndTime" : 12345,
    "flexDrtAdvanceBookMin" : 12345.0,
    "flexDrtPickupMessage" : "...",
    "flexDrtDropOffMessage" : "...",
    "flexFlagStopPickupMessage" : "...",
    "flexFlagStopDropOffMessage" : "...",
    "transitLeg" : true,
    "duration" : 12345.0
  }, {
    "startTime" : 12345,
    "endTime" : 12345,
    "departureDelay" : 12345,
    "arrivalDelay" : 12345,
    "realTime" : true,
    "isNonExactFrequency" : true,
    "headway" : 12345,
    "distance" : 12345.0,
    "pathway" : true,
    "mode" : "...",
    "route" : "...",
    "agencyName" : "...",
    "agencyUrl" : "...",
    "agencyBrandingUrl" : "...",
    "agencyTimeZoneOffset" : 12345,
    "routeColor" : "...",
    "routeType" : 12345,
    "routeId" : {
      "agencyId" : "...",
      "id" : "..."
    },
    "routeTextColor" : "...",
    "interlineWithPreviousLeg" : true,
    "tripShortName" : "...",
    "tripBlockId" : "...",
    "headsign" : "...",
    "agencyId" : "...",
    "tripId" : {
      "agencyId" : "...",
      "id" : "..."
    },
    "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" : "...",
      "boardAlightType" : "DEVIATED",
      "flagStopArea" : { }
    },
    "to" : {
      "name" : "...",
      "stopId" : { },
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "NORMAL",
      "bikeShareId" : "...",
      "boardAlightType" : "DEFAULT",
      "flagStopArea" : { }
    },
    "intermediateStops" : [ {
      "name" : "...",
      "stopId" : { },
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "BIKEPARK",
      "bikeShareId" : "...",
      "boardAlightType" : "DEVIATED",
      "flagStopArea" : { }
    }, {
      "name" : "...",
      "stopId" : { },
      "stopCode" : "...",
      "platformCode" : "...",
      "lon" : 12345.0,
      "lat" : 12345.0,
      "arrival" : 12345,
      "departure" : 12345,
      "orig" : "...",
      "zoneId" : "...",
      "stopIndex" : 12345,
      "stopSequence" : 12345,
      "vertexType" : "TRANSIT",
      "bikeShareId" : "...",
      "boardAlightType" : "DEVIATED",
      "flagStopArea" : { }
    } ],
    "legGeometry" : {
      "points" : "...",
      "levels" : "...",
      "length" : 12345
    },
    "steps" : [ {
      "distance" : 12345.0,
      "relativeDirection" : "HARD_RIGHT",
      "streetName" : "...",
      "absoluteDirection" : "EAST",
      "exit" : "...",
      "stayOn" : true,
      "area" : true,
      "bogusName" : true,
      "lon" : 12345.0,
      "lat" : 12345.0,
      "elevation" : [ { }, { } ],
      "alerts" : [ { }, { } ]
    }, {
      "distance" : 12345.0,
      "relativeDirection" : "SLIGHTLY_RIGHT",
      "streetName" : "...",
      "absoluteDirection" : "SOUTHEAST",
      "exit" : "...",
      "stayOn" : true,
      "area" : true,
      "bogusName" : true,
      "lon" : 12345.0,
      "lat" : 12345.0,
      "elevation" : [ { }, { } ],
      "alerts" : [ { }, { } ]
    } ],
    "alerts" : [ {
      "alertHeaderText" : "...",
      "alertDescriptionText" : "...",
      "alertUrl" : "...",
      "effectiveStartDate" : 12345
    }, {
      "alertHeaderText" : "...",
      "alertDescriptionText" : "...",
      "alertUrl" : "...",
      "effectiveStartDate" : 12345
    } ],
    "routeShortName" : "...",
    "routeLongName" : "...",
    "boardRule" : "...",
    "alightRule" : "...",
    "rentedBike" : true,
    "callAndRide" : true,
    "flexCallAndRideMaxStartTime" : 12345,
    "flexCallAndRideMinEndTime" : 12345,
    "flexDrtAdvanceBookMin" : 12345.0,
    "flexDrtPickupMessage" : "...",
    "flexDrtDropOffMessage" : "...",
    "flexFlagStopPickupMessage" : "...",
    "flexFlagStopDropOffMessage" : "...",
    "transitLeg" : true,
    "duration" : 12345.0
  } ],
  "tooSloped" : true
}