Calculate a Taxi and Ride Route

User Story

You request a route from the Amsterdam City center to Amsterdam Schiphol Airport with the Intermodal Routing API v8 using a combination of taxi and transit transport types. We call this Taxi and Ride intermodal route. You take a taxi to the closest public transport station, transfer to another mode of transport and reach your destination through public transportation.

Request

An intermodal route calculation consists of a single GET request. The only required request parameters are an origin and a destination, given by two pairs of WGS84 coordinates in the form <latitude>,<longitude>.

However, it is important to set the optional parameters taxi[modes]=car, taxi[enable]=routeHead, transit[enable]=routeTail, and rented[enable]= to ensure the Taxi and Ride intermodal route in the response.

The taxi[modes]=car and taxi[enable]=routeHead parameters force the intermodal router to return taxi transport type in the head section of the route. Whereas the transit[enable]=routeTail parameter forces the intermodal router to return transit transport type in the tail section of the route. The rented[enable]= parameter is needed to disable the rented transport type in the response which is enabled by default for all the sections of the route.

For more information on the flavors and transport types of the Intermodal Routing API v8, see the Intermodal Flavors & Transport Types section.

GET https://intermodal.router.hereapi.com/v8/routes
    ?destination=52.309584623632894,4.762449758418342
    &origin=52.360292297234395,4.883253423531613
    &taxi[enable]=routeHead
    &taxi[modes]=car
    &transit[enable]=routeTail
    &rented[enable]=
Authorization: Bearer 

Note

For more information on the currently available authentication methods, see Authentication and Authorization Developer Guide.

By default, the Intermodal Routing API v8 returns only one optimal intermodal route. The optional parameter alternatives represents the number of alternative routes to return aside from the optimal route. By default, it is set to alternatives=0.

Note

At the moment, taxi[modes]=car parameter is optional as car is the only mode of transport for taxi transport type. In the future, other modes like shuttle might be made available and you will need to use taxi[modes]=shuttle if you only want that to be returned in the response.

Response

If the intermodal route calculation was successful, the /routes response contains the requested details about the calculated route:

  • one optimal intermodal route
  • one or a combination of the following transport types each of which contains departure/arrival times, duration, coordinates, and other section information, depending on their availability in the area:
    • taxi - route section in which you ride from your origin to the location of transfer
    • pedestrian - route section in which you transfer from taxi to transit
    • transit - route section with the actual stops or stations of departure and arrival. Optionally, all intermediate stops in between can be enabled with the return=intermediate parameter
  • a set of operators that run the services included in the alternatives, including operator code, operator name and links to operator websites, if any.
{
  "routes": [
    {
      "id": "R003814-C0",
      "sections": [
        {
          "id": "R003814-C0-S0",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:28:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.360292,
                "lng": 4.883253
              }
            }
          },
          "arrival": {
            "time": "2020-04-28T16:29:00+02:00",
            "place": {
              "name": "Amsterdam, Rijksmuseum",
              "type": "station",
              "location": {
                "lat": 52.359768,
                "lng": 4.883548
              },
              "id": "215030307"
            }
          }
        },
        {
          "id": "R003814-C0-S1",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T16:29:00+02:00",
            "place": {
              "name": "Amsterdam, Rijksmuseum",
              "type": "station",
              "location": {
                "lat": 52.359768,
                "lng": 4.883548
              },
              "id": "215030307"
            },
            "delay": 0
          },
          "arrival": {
            "time": "2020-04-28T16:40:00+02:00",
            "place": {
              "name": "Amsterdam, Station Zuid",
              "type": "station",
              "location": {
                "lat": 52.340825,
                "lng": 4.87374
              },
              "id": "215096212",
              "platform": "D"
            },
            "delay": 0
          },
          "transport": {
            "mode": "lightRail",
            "name": "5",
            "category": "Tram",
            "headsign": "Amstelveen Stadshart"
          },
          "agency": {
            "id": "5wUGVB00",
            "name": "GVB",
            "website": "http://www.gvb.nl"
          }
        },
        {
          "id": "R003814-C0-S2",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:40:00+02:00",
            "place": {
              "name": "Amsterdam, Station Zuid",
              "type": "station",
              "location": {
                "lat": 52.340825,
                "lng": 4.87374
              },
              "id": "215096212"
            }
          },
          "arrival": {
            "time": "2020-04-28T16:46:00+02:00",
            "place": {
              "name": "Amsterdam Zuid",
              "type": "station",
              "location": {
                "lat": 52.33882,
                "lng": 4.872866
              },
              "id": "215154261"
            }
          }
        },
        {
          "id": "R003814-C0-S3",
          "type": "transit",
          "departure": {
            "time": "2020-04-28T16:46:00+02:00",
            "place": {
              "name": "Amsterdam Zuid",
              "type": "station",
              "location": {
                "lat": 52.33882,
                "lng": 4.872866
              },
              "id": "215154261",
              "platform": "3"
            }
          },
          "arrival": {
            "time": "2020-04-28T16:52:00+02:00",
            "place": {
              "name": "Schiphol Airport",
              "type": "station",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              },
              "id": "215125100",
              "platform": "4"
            }
          },
          "transport": {
            "mode": "regionalTrain",
            "name": "Intercity",
            "category": "Regional Train",
            "headsign": "Schiphol Airport"
          },
          "agency": {
            "id": "5wUIFF06",
            "name": "NS",
            "website": "http://www.ns.nl"
          }
        },
        {
          "id": "R003814-C0-S4-dep",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:52:00+02:00",
            "place": {
              "name": "Schiphol Airport",
              "type": "station",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              },
              "id": "215125100"
            }
          },
          "arrival": {
            "time": "2020-04-28T16:53:00+02:00",
            "place": {
              "name": "Schiphol",
              "type": "accessPoint",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              }
            }
          }
        },
        {
          "id": "R003814-C0-S4",
          "type": "pedestrian",
          "departure": {
            "time": "2020-04-28T16:53:00+02:00",
            "place": {
              "name": "Schiphol",
              "type": "accessPoint",
              "location": {
                "lat": 52.309539,
                "lng": 4.762266
              }
            }
          },
          "arrival": {
            "time": "2020-04-28T16:54:00+02:00",
            "place": {
              "type": "place",
              "location": {
                "lat": 52.309585,
                "lng": 4.76245
              }
            }
          }
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""