Välkommen till Trafiklab:s kund- och supportforum! Ställ frågor, rapportera problem och hjälp oss med förslag och idéer!
Vid felrapporter ber vi dig inkludera exakt API-namn och om möjligt ett exempelanrop för att underlätta felsökningen. Glöm inte att ta bort din API-nyckel när du delar ditt exempelanrop.
Undrar du hur du får tillgäng Trafiklabs data? Läs vår introduktion här: https://www.trafiklab.se/hur-gor-jag
Welcome to Trafiklab's customer and supportforum. Ask questions, report issues and help us improve with suggestions and ideas!
If you open a new issue, please always include the exact API you're talking about, and, if applicable, include a sample request so we can check if contains the right parameters. Don't forget to remove your API keys when sharing example requests.
Välkommen till Trafiklab:s kund- och supportforum! Ställ frågor, rapportera problem och hjälp oss med förslag och idéer!
Are you using SL realtime api or Resrobots realtime api?
Best regards
Daniel
I am using SL realtime API.
Hi again
Wonder if you can explain more precisely what you are looking for? Because in the response from SL realtime API you get the LineNumber that identify the trips number.
Best regards
Daniel
Yes, I am looking for an identifier that is unique to a particular trip in the timetable, or an identifier that is unique to a particular physical vehicle. As I understand, LineNumber identifies a group of trips in the timetable. I am looking for a single trip in the timetable that corresponds to a departure, or a vehicle identifier (for example the vehicle licence plate's number) that corresponds to a departure.
Hi again
Sorry to inform you but we dont have that type of data in our api's.
Best regards
Daniel
Hi Elias,
There is no trip or vehicle identifier in the SL realtime API.
What do you want to use it for?
/Sabina
Thanks to Daniel and Sabina for researching.
I want to use the trip or vehicle identifier in the array returned by a function. The function is called by code developed by another developer for an iOS app. The developer informs me that it is required to avoid a single bus being inserted into the cache twice.
Ok, what is the purpose of this?
For reference, this has been covered before (https://kundo.se/org/trafiklabse/d/visa-turnumm...). I've also described my use cases for this in a private conversation.
I don't see the need for unique vehicle identifiers such as the plates but something that could identify a single trip would make some integrations a bit easier.
Do you intend to add this if you get a stronger case for why we would like to see it?
Cheers!
Vehicle identifier would probably not be easy to achieve. Some kind of trip identifier in the realtime API would be easier, but to achieve a coherent solution including all/most API:s is more complex. That's why I want to understand if there would be any point in adding the information in just one API.
/Sabina
One would be better than none. Personally I would benefit the most of having it in the real-time API but there's value in having the trip id in the planner response as well.
Thanks!
Regarding the purpose of this, I dont know what it is. From my limited knowledge, the app may track the movement of a bus by linking individual departure predictions over time.
Regarding adding support for a trip identifier, I agree that it is more useful than a vehicle identifier, and adding it to one API is helpful from my perspective.
Hi, is there any news on the implementation of a trip identifier or a vehicle identifier?
Hi,
The journey number will be returned by next version of the SL realtime API. This will be available in the end of november according to plan.
/Sabina
Thank you for the info.