An Itinerary is one complete way of getting from the start location to the end location.
| 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 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 | 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" : "...",
"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" : "TRANSIT",
"bikeShareId" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"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" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"boardAlightType" : "DEVIATED",
"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" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"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" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"boardAlightType" : "DEFAULT",
"flagStopArea" : { }
} ],
"legGeometry" : {
"points" : "...",
"levels" : "...",
"length" : 12345
},
"interStopGeometry" : [ {
"points" : "...",
"levels" : "...",
"length" : 12345
}, {
"points" : "...",
"levels" : "...",
"length" : 12345
} ],
"steps" : [ {
"distance" : 12345.0,
"relativeDirection" : "HARD_LEFT",
"streetName" : "...",
"absoluteDirection" : "EAST",
"exit" : "...",
"stayOn" : true,
"area" : true,
"bogusName" : true,
"lon" : 12345.0,
"lat" : 12345.0,
"elevation" : [ { }, { } ],
"alerts" : [ { }, { } ]
}, {
"distance" : 12345.0,
"relativeDirection" : "SLIGHTLY_LEFT",
"streetName" : "...",
"absoluteDirection" : "NORTHEAST",
"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,
"rentedCar" : true,
"rentedVehicle" : true,
"hailedCar" : true,
"tncData" : {
"company" : "LYFT",
"currency" : "...",
"travelDuration" : 12345,
"maxCost" : 12345.0,
"minCost" : 12345.0,
"productId" : "...",
"displayName" : "...",
"estimatedArrival" : 12345
},
"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" : "TRANSIT",
"bikeShareId" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"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" : "VEHICLERENTAL",
"bikeShareId" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"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" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"boardAlightType" : "FLAG_STOP",
"flagStopArea" : { }
}, {
"name" : "...",
"stopId" : { },
"stopCode" : "...",
"platformCode" : "...",
"lon" : 12345.0,
"lat" : 12345.0,
"arrival" : 12345,
"departure" : 12345,
"orig" : "...",
"zoneId" : "...",
"stopIndex" : 12345,
"stopSequence" : 12345,
"vertexType" : "CARSHARE",
"bikeShareId" : "...",
"networks" : [ "...", "..." ],
"address" : "...",
"boardAlightType" : "DEVIATED",
"flagStopArea" : { }
} ],
"legGeometry" : {
"points" : "...",
"levels" : "...",
"length" : 12345
},
"interStopGeometry" : [ {
"points" : "...",
"levels" : "...",
"length" : 12345
}, {
"points" : "...",
"levels" : "...",
"length" : 12345
} ],
"steps" : [ {
"distance" : 12345.0,
"relativeDirection" : "ELEVATOR",
"streetName" : "...",
"absoluteDirection" : "NORTH",
"exit" : "...",
"stayOn" : true,
"area" : true,
"bogusName" : true,
"lon" : 12345.0,
"lat" : 12345.0,
"elevation" : [ { }, { } ],
"alerts" : [ { }, { } ]
}, {
"distance" : 12345.0,
"relativeDirection" : "LEFT",
"streetName" : "...",
"absoluteDirection" : "SOUTHWEST",
"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,
"rentedCar" : true,
"rentedVehicle" : true,
"hailedCar" : true,
"tncData" : {
"company" : "LYFT",
"currency" : "...",
"travelDuration" : 12345,
"maxCost" : 12345.0,
"minCost" : 12345.0,
"productId" : "...",
"displayName" : "...",
"estimatedArrival" : 12345
},
"callAndRide" : true,
"flexCallAndRideMaxStartTime" : 12345,
"flexCallAndRideMinEndTime" : 12345,
"flexDrtAdvanceBookMin" : 12345.0,
"flexDrtPickupMessage" : "...",
"flexDrtDropOffMessage" : "...",
"flexFlagStopPickupMessage" : "...",
"flexFlagStopDropOffMessage" : "...",
"transitLeg" : true,
"duration" : 12345.0
} ],
"tooSloped" : true
}