Public Transit API Developer's Guide

All Next Departures by Station IDs

User Story

The user wants to retrieve a list of transit departures for stations with the specified IDs along the same road for a given date and time.

Note: This service is subject to Terms and Conditions as described in Supplier Terms for Developers Using HERE Location Platform APIs.

Request

The query parameter stnIds takes a list of comma-separated station IDs, 703280098,703280030,703280041. The time parameter is specified in ISO 8601 format, 2019-06-24T08:00:00.

https://transit.api.here.com/v3/multiboard/by_stn_ids.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&lang=en
&stnIds=703280098,703280030,703280041
&max=2
&time=2019-06-24T08%3A00%3A00

Response

The response to the request contains the following information blocks:
  • a maximum of 40 departures per station for all nearby stations, depending on the proximity of the nearby stations to the specified location within a default radius of 500m, can be configured using the optional max and maxStn parameters
  • each departure board element includes the following information:
    • departure time
    • name and ID of the transit stop or station the service departs from
    • name and number of the transit service
    • type of the transit service
    • direction or head-sign of the service
    • optionally, the color of the service line
{
  "Res": {
    "serviceUrl": "http://ip-10-123-14-239.eu-west-1.compute.internal:8080/hafasproxy/G3L",
    "MultiNextDepartures": {
      "MultiNextDeparture": [
        {
          "NextDepartures": {
            "Dep": [
              {
                "Stn": {
                  "id": "703280030#105",
                  "name": "Front / California",
                  "x": -112.529169,
                  "y": 46.000401
                },
                "Transport": {
                  "At": {
                    "category": "Bus",
                    "color": "#006633",
                    "operator": "bKy15000",
                    "textColor": "#FFFFFF"
                  },
                  "dir": "(Loop Route)",
                  "mode": 5,
                  "name": "Green - Montana Tech"
                },
                "journey_ctx": "1|264|1|105|11122017",
                "time": "2017-12-11T08:40:00"
              },
              {
                "Stn": {
                  "id": "703280030#105",
                  "name": "Front / California",
                  "x": -112.529169,
                  "y": 46.000401
                },
                "Transport": {
                  "At": {
                    "category": "Bus",
                    "color": "#006633",
                    "operator": "bKy15000",
                    "textColor": "#FFFFFF"
                  },
                  "dir": "(Loop Route)",
                  "mode": 5,
                  "name": "Green - Montana Tech"
                },
                "journey_ctx": "1|264|2|105|11122017",
                "time": "2017-12-11T09:40:00"
              }
            ],
            "Operators": {
              "Op": [
                {
                  "At": {
                    "phone": "(406) 497-6515"
                  },
                  "Link": [
                    {
                      "href": "https://transit.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.buttebus.org/",
                      "text": "Butte-Silver Bow",
                      "type": "website"
                    }
                  ],
                  "code": "bKy15000",
                  "name": "Butte-Silver Bow",
                  "type": "TT"
                }
              ]
            }
          },
          "Stn": {
            "id": "703280030#105",
            "name": "Front / California",
            "x": -112.529169,
            "y": 46.000401
          }
        },
        {
          "NextDepartures": {
            "Dep": [
              {
                "Stn": {
                  "id": "703280041#105",
                  "name": "Park / Clark",
                  "x": -112.546527,
                  "y": 46.012266
                },
                "Transport": {
                  "At": {
                    "category": "Bus",
                    "color": "#006633",
                    "operator": "bKy15000",
                    "textColor": "#FFFFFF"
                  },
                  "dir": "(Loop Route)",
                  "mode": 5,
                  "name": "Green - Montana Tech"
                },
                "journey_ctx": "1|264|1|105|11122017",
                "time": "2017-12-11T08:32:00"
              },
              {
                "Stn": {
                  "id": "703280041#105",
                  "name": "Park / Clark",
                  "x": -112.546527,
                  "y": 46.012266
                },
                "Transport": {
                  "At": {
                    "category": "Bus",
                    "color": "#006633",
                    "operator": "bKy15000",
                    "textColor": "#FFFFFF"
                  },
                  "dir": "(Loop Route)",
                  "mode": 5,
                  "name": "Green - Montana Tech"
                },
                "journey_ctx": "1|264|2|105|11122017",
                "time": "2017-12-11T09:32:00"
              }
            ],
            "Operators": {
              "Op": [
                {
                  "At": {
                    "phone": "(406) 497-6515"
                  },
                  "Link": [
                    {
                      "href": "https://transit.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.buttebus.org/",
                      "text": "Butte-Silver Bow",
                      "type": "website"
                    }
                  ],
                  "code": "bKy15000",
                  "name": "Butte-Silver Bow",
                  "type": "TT"
                }
              ]
            }
          },
          "Stn": {
            "id": "703280041#105",
            "name": "Park / Clark",
            "x": -112.546527,
            "y": 46.012266
          }
        },
        {
          "NextDepartures": {
            "Dep": [
              {
                "Stn": {
                  "id": "703280098#105",
                  "name": "Harrison / Motor View",
                  "x": -112.507865,
                  "y": 45.953279
                },
                "Transport": {
                  "At": {
                    "category": "Bus",
                    "color": "#FF6600",
                    "operator": "bKy15000",
                    "textColor": "#FFFFFF"
                  },
                  "dir": "Transfer Center",
                  "mode": 5,
                  "name": "Orange - Harrison"
                },
                "journey_ctx": "1|263|1|105|11122017",
                "time": "2017-12-11T08:02:00"
              },
              {
                "Stn": {
                  "id": "703280098#105",
                  "name": "Harrison / Motor View",
                  "x": -112.507865,
                  "y": 45.953279
                },
                "Transport": {
                  "At": {
                    "category": "Bus",
                    "color": "#FF6600",
                    "operator": "bKy15000",
                    "textColor": "#FFFFFF"
                  },
                  "dir": "Transfer Center",
                  "mode": 5,
                  "name": "Orange - Harrison"
                },
                "journey_ctx": "1|261|1|105|11122017",
                "time": "2017-12-11T08:32:00"
              }
            ],
            "Operators": {
              "Op": [
                {
                  "At": {
                    "phone": "(406) 497-6515"
                  },
                  "Link": [
                    {
                      "href": "https://transit.api.here.com/r?appId=intheCAcRA4esTu84PuN&u=http://www.buttebus.org/",
                      "text": "Butte-Silver Bow",
                      "type": "website"
                    }
                  ],
                  "code": "bKy15000",
                  "name": "Butte-Silver Bow",
                  "type": "TT"
                }
              ]
            }
          },
          "Stn": {
            "id": "703280098#105",
            "name": "Harrison / Motor View",
            "x": -112.507865,
            "y": 45.953279
          }
        }
      ]
    }
  }
}