dbopendata / db-fahrplan-api

DB Fahrplan API
31 stars 1 forks source link

JourneyDetail Parser Error Response #12

Open marcelbuesing opened 8 years ago

marcelbuesing commented 8 years ago

Ran into an error response when retrieving journey details:

curl -v http://open-api.bahn.de/bin/rest.exe/departureBoard\?authKey\=xxx\&format\=json\&lang\=de\&id\=008000105\&date\=2016-04-06\&time\=12:00

gave me

"DepartureBoard":{
  "noNamespaceSchemaLocation":"http://open-api.bahn.de/bin/rest.exe/v1.0/xsd?name=hafasRestDepartureBoard.xsd",
  "Departure":[{
    "name":"ICE 73",
    "type":"ICE",
    "stopid":"8000105",
    "stop":"Frankfurt(Main)Hbf",
    "time":"12:05",
    "date":"2016-04-06",
    "direction":"Zürich HB",
    "track":"6",
    "JourneyDetailRef":{
      "ref":"http://open-api.bahn.de/bin/rest.exe/v1.0/journeyDetail?ref=215268%2F77387%2F621882%2F239185%2F80%3Fdate%3D2016-04-06%26station_evaId%3D8000105%26station_type%3Ddep%26authKey%3Dxxx%26lang%3Dde%26format%3Djson%26"
      }
//....
http://open-api.bahn.de/bin/rest.exe/v1.0/journeyDetail?ref=215268%2F77387%2F621882%2F239185%2F80%3Fdate%3D2016-04-06%26station_evaId%3D8000105%26station_type%3Ddep%26authKey%3Dxxx%26lang%3Dde%26format%3Djson%26
{"Error":{"type":"PARSER","code":"2"}}
highsource commented 8 years ago

Can no longer reproduced, JourneyDetailRef links in the response seem to be OK:

http://open-api.bahn.de/bin/rest.exe/departureBoard?authKey=<KEY>&lang=de&id=008000105&date=2016-04-06&time=12%3a00&format=json

I think these JourneyDetailRef links expire after some time, maybe that was the cause. Are you sure the URL was correctly formed?