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.
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, 2021-06-24T08:00:00
.
https://transit.ls.hereapi.com/v3/multiboard/by_stn_ids.json
?apiKey={YOUR_API_KEY}
&lang=en
&stnIds=703280098,703280030,703280041
&max=2
&time=2021-06-24T08%3A00%3A00
Response
- 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
andmaxStn
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.ls.hereapi.com/r?apiKey={YOUR_API_KEY}=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.ls.hereapi.com/r?apiKey={YOUR_API_KEY}=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.ls.hereapi.com/r?apiKey={YOUR_API_KEY}=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
}
}
]
}
}
}