Skip to content

StopTimetable-Request (Aushangfahrplan)

Stellt den Aushangfahrplan einer Linie an einer Haltestelle bereit.

Endpoint

  • Pfad: XML_STOPTIMETABLE_REQUEST
  • Methode: GET

Parameter (Auszug)

ParameterTypBeschreibung
stopIdstringHaltestellen-ID
lineIdstringLinie/Variante
datestringDatum YYYYMMDD (optional)

Beispiel-Request

GET /XML_STOPTIMETABLE_REQUEST?stopId=de:05513:1001&lineId=VRR:196:A

Antwort (Beispiel)

json
{
  "timetable": {
    "weekday": [["05:12","05:32"],["06:02","06:22"]],
    "saturday": [],
    "sunday": []
  }
}

JavaScript-Beispiel

js
async function getStopTimetable(stopId, lineId) {
  const base = 'https://server:port/virtuellesVerzeichnis/XML_STOPTIMETABLE_REQUEST'
  const usp = new URLSearchParams({ stopId, lineId })
  const res = await fetch(`${base}?${usp}`)
  if (!res.ok) throw new Error('HTTP ' + res.status)
  return res.json()
}

title: StopTimetable-Request (Aushangfahrplan) outline: deep

StopTimetable-Request

Gibt den Aushangfahrplan einer Linie an einer Haltestelle zurück.

Endpoint

  • Pfad: XML_STOPTIMETABLE_REQUEST
  • Methode: GET

Parameter (Auszug)

ParameterTypBeschreibung
stopIdstringHaltestellen-ID
lineIdstringLinien-ID/Bezeichnung
directionIdstringRichtung/Endpunkt
datestringDatum YYYYMMDD oder dayType
dayTypestringOptional: weekday, sat, sun

Beispiel-Request

GET /XML_STOPTIMETABLE_REQUEST?stopId=de:05513:1001&lineId=196&directionId=K&dayType=weekday

Antwort (Beispiel)

json
{
  "timetable": [
    { "hour": 8, "minutes": ["05", "22", "38", "50"] },
    { "hour": 9, "minutes": ["10", "30", "50"] }
  ]
}

JavaScript-Beispiel

js
async function getStopTimetable(stopId, lineId, directionId, opts = {}) {
  const base = 'https://server:port/virtuellesVerzeichnis/XML_STOPTIMETABLE_REQUEST'
  const usp = new URLSearchParams({ stopId, lineId, directionId })
  if (opts.date) usp.set('date', opts.date)
  if (opts.dayType) usp.set('dayType', opts.dayType)
  const res = await fetch(`${base}?${usp}`)
  if (!res.ok) throw new Error('HTTP ' + res.status)
  return res.json()
}