Intermodal Routing API Developer's Guide

Park and Ride Routing Example

User Story

The user wants to search for a park and ride route departing from 63, Glenmore Drive, West Vancouver (49.36446767,-123.119102027) and arriving at 2 SW Marine Drive, Vancouver (49.21229508,-123.106722459).

Request

https://mobility.cit.api.here.com/v1/route.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&profile=parkandride
&dep=49.36446767,-123.119102027
&arr=49.21229508,-123.106722459
&time=2018-07-16T07%3A30%3A00
&intermodal_max=1
&details=0

Response

The response to the request contains the following information blocks:
  • A connections or journey directing the vehicle driver to a parking lot.
  • The journey starts with a driving route segment and ends with a public transit route, making use of an appropriate parking lot close to a public transit station.
  • Parking related information:
    • Estimated time it takes to park the car
    • Estimated time to walk from the parking lot to a nearby public transit station
  • Parking lot specific information:
    • Location
    • Whether the parking lot is designated specifically for Park and Ride (optional)
  • A list of operators who run the public transit services included in the journeys, such as the operator code, operator name, and links to operator websites, if available.
{
  "Res": {
    "Connections": {
      "Attributions": {
        "Link": [
          {
            "href": "http://www.translink.ca",
            "sec_ids": "R000420-C0-S2 R000420-C2-S2 R000420-C1-S2",
            "text": "TransLink",
            "type": "agency"
          }
        ]
      },
      "Connection": [
        {
          "Arr": {
            "Addr": {
              "x": -123.106713,
              "y": 49.212291
            },
            "time": "2017-12-18T08:28:00"
          },
          "Dep": {
            "Addr": {
              "x": -123.1192379,
              "y": 49.3642824
            },
            "time": "2017-12-18T07:30:00"
          },
          "Sections": {
            "Sec": [
              {
                "Arr": {
                  "Activities": {
                    "Act": [
                      {
                        "duration": "PT5M",
                        "type": "parking"
                      }
                    ]
                  },
                  "Addr": {
                    "At": {
                      "category": "parking",
                      "parkingId": "124bma4v-9fbb59b615320f52562db71267c44e64"
                    },
                    "name": "Vancouver Centre",
                    "x": -123.11751,
                    "y": 49.28161
                  },
                  "RT": {
                    "arr": "2017-12-18T07:52:39"
                  },
                  "time": "2017-12-18T07:49:59"
                },
                "Dep": {
                  "Addr": {
                    "x": -123.1192379,
                    "y": 49.3642824
                  },
                  "Transport": {
                    "mode": 21
                  },
                  "time": "2017-12-18T07:30:00"
                },
                "Journey": {
                  "distance": 11944,
                  "duration": "PT0H19M59S"
                },
                "id": "R000420-C0-S0",
                "mode": 21
              },
              {
                "Arr": {
                  "Stn": {
                    "id": "414508954#100",
                    "name": "Vancouver City Centre Station",
                    "x": -123.118408,
                    "y": 49.282488
                  },
                  "time": "2017-12-18T07:58:59"
                },
                "Dep": {
                  "Addr": {
                    "x": -123.1175,
                    "y": 49.281607
                  },
                  "Transport": {
                    "mode": 20
                  },
                  "time": "2017-12-18T07:54:59"
                },
                "Journey": {
                  "distance": 156,
                  "duration": "PT4M"
                },
                "id": "R000420-C0-S1",
                "mode": 20
              },
              {
                "Arr": {
                  "Stn": {
                    "id": "414508965#100",
                    "name": "Marine Drive Station",
                    "x": -123.117033,
                    "y": 49.209801
                  },
                  "time": "2017-12-18T08:13:00"
                },
                "Dep": {
                  "Freq": {
                    "AltDep": [
                      {
                        "Transport": {
                          "At": {
                            "category": "Regional Train",
                            "color": "#005CA9",
                            "operator": "6kySKY00",
                            "textColor": "#FFFFFF"
                          },
                          "dir": "Canada Line TO Richmond-Brighouse",
                          "mode": 3,
                          "name": "Canada Line Skytrain"
                        },
                        "time": "2017-12-18T08:01:00"
                      },
                      {
                        "Transport": {
                          "At": {
                            "category": "Regional Train",
                            "color": "#005CA9",
                            "operator": "6kySKY00",
                            "textColor": "#FFFFFF"
                          },
                          "dir": "Canada Line TO Yvr-Airport",
                          "mode": 3,
                          "name": "Canada Line Skytrain"
                        },
                        "time": "2017-12-18T08:03:00"
                      },
                      {
                        "Transport": {
                          "At": {
                            "category": "Regional Train",
                            "color": "#005CA9",
                            "operator": "6kySKY00",
                            "textColor": "#FFFFFF"
                          },
                          "dir": "Canada Line TO Yvr-Airport",
                          "mode": 3,
                          "name": "Canada Line Skytrain"
                        },
                        "time": "2017-12-18T08:05:00"
                      }
                    ],
                    "max": 4,
                    "min": 1
                  },
                  "Stn": {
                    "id": "414508954#100",
                    "name": "Vancouver City Centre Station",
                    "x": -123.118408,
                    "y": 49.282488
                  },
                  "Transport": {
                    "At": {
                      "category": "Regional Train",
                      "color": "#005CA9",
                      "operator": "6kySKY00",
                      "textColor": "#FFFFFF"
                    },
                    "dir": "Canada Line TO Yvr-Airport",
                    "mode": 3,
                    "name": "Canada Line Skytrain"
                  },
                  "time": "2017-12-18T07:58:00"
                },
                "Journey": {
                  "duration": "PT15M"
                },
                "id": "R000420-C0-S2",
                "mode": 3
              },
              {
                "Arr": {
                  "Addr": {
                    "x": -123.106713,
                    "y": 49.212291
                  },
                  "time": "2017-12-18T08:28:00"
                },
                "Dep": {
                  "Stn": {
                    "id": "414508965#100",
                    "name": "Marine Drive Station",
                    "x": -123.117033,
                    "y": 49.209801
                  },
                  "Transport": {
                    "mode": 20
                  },
                  "time": "2017-12-18T08:13:00"
                },
                "Journey": {
                  "distance": 857,
                  "duration": "PT15M"
                },
                "id": "R000420-C0-S3",
                "mode": 20
              }
            ]
          },
          "duration": "PT0H58M0S",
          "id": "R000420-C0",
          "transfers": 1
        },
        ... more options ...
      ],
      "Operators": {
        "Op": [
          {
            "Link": [
              {
                "href": "http://www.translink.ca/en/About-Us/Corporate-Overview/Operating-Companies/BCRTC.aspx",
                "text": "British Columbia Rapid Transit Company",
                "type": "website"
              }
            ],
            "code": "6kySKY00",
            "name": "British Columbia Rapid Transit Company",
            "type": "TT"
          }
        ]
      },
      "context": ""
    },
    "serviceUrl": "https://mobility.cit.api.here.com/smartmob/v1/route.json"
  }
}