-
Notifications
You must be signed in to change notification settings - Fork 9
TimingPointCode
skywave edited this page Oct 5, 2012
·
7 revisions
Timingpointcodes are a unique identifier for a single bus stop (sign). Most bus stops have two or more timingpointcodes, on one each side of the road. There are also timing points which are not a bus stop, for example bridge operators and virtual points. A timingpoint is a string with 10 characters composed out of numbers, make sure to not mix this up as there are timingpointcodes starting with zero's.
-
GET /tpc/
will return all the timingpoints processed within the uptime of the API. Timingpointcodes in this list are request-able via the requests below. The value of the timingpoint key indicates the amount of passes stored.
{
"58750230": 9,
"7200882": 2,
"044322": 5,
"57003121": 10,
"57242480": 14,
"76000170": 1,
"50000520": 2,
"59620290": 1,
"51400480": 2,
"7260159": 10,
"56332940": 4,
"37221910": 2,
"37330020": 2
}
-
GET /tpc/$timingpointcode
will return all the passes, messages and name/position/town/stopareacode for the timingpoint with $timingpointcode. -
GET /tpc/$timingpointcode/departures
will return all the departures, messages and name/position/town/stopareacode for the timingpoint with $timingpointcode.
{
"57330620": {
"Passes": {
"CXX_93051_M310_4087_0": {
"TransportType": "BUS",
"DestinationName50": "Schiphol Centrum Plaza/NS",
"LocalServiceLevelCode": "93051",
"ReasonContent": null,
"AdviceType": null,
"OperatorCode": null,
"TimingPointCode": "57330620",
"WheelChairAccessible": "UNKNOWN",
"LineName": "Nieuw Vennep - Amsterdam Station Zuid",
"ExpectedDepartureTime": "2012-06-02T00:00:00",
"UserStopOrderNumber": 12,
"MessageType": null,
"SubAdviceType": null,
"TimingPointName": "Schiphol Centrum, Plaza/NS",
"LinePlanningNumber": "M310",
"Longitude": 4.7616716,
"AdviceContent": null,
"TimingPointTown": "schiphol centrum",
"Latitude": 52.3087919,
"UserStopCode": "57330620",
"JourneyStopType": "LAST",
"TargetDepartureTime": "2012-06-02T00:00:00",
"ExpectedArrivalTime": "2012-06-02T16:10:00",
"IsTimingStop": true,
"TimingPointDataOwnerCode": "ALGEMEEN",
"DataOwnerCode": "CXX",
"FortifyOrderNumber": 0,
"JourneyNumber": 4087,
"ReasonType": null,
"LineDirection": "1",
"LinePublicNumber": "310",
"LastUpdateTimeStamp": "2012-06-02T15:49:19+02:00",
"DestinationCode": "M31001429",
"OperationDate": "2012-06-02",
"SideCode": "B5 - B7",
"ProductFormulaType": 37,
"StopAreaCode": "schns",
"NumberOfCoaches": 1,
"TripStopStatus": "DRIVING",
"SubReasonType": null,
"TargetArrivalTime": "2012-06-02T16:10:00",
"MessageContent": null
},
},
"GeneralMessages": {
"CXX_2012-10-05_3_ALGEMEEN_35121030": {
"MessageCodeNumber": "3",
"MeasureType": null,
"EffectType": null,
"MessageTimeStamp": "2012-10-05T11:11:15",
"MeasureContent": null,
"MessageDurationType": "ENDTIME",
"DataOwnerCode": "CXX",
"MessageStartTime": "2012-10-05T00:00:00",
"MessageType": "GENERAL",
"SubEffectType": null,
"SubMeasureType": null,
"ReasonContent": "IVM met de harde wind rijden wij via de Reuzenpandasingel",
"TimingPointDataOwnerCode": "ALGEMEEN",
"MessageEndTime": "2012-10-05T23:59:00",
"MessageCodeDate": "2012-10-05",
"ReasonType": "4",
"EffectContent": null,
"TimingPointCode": "35121030",
"MessageContent": "IVM met de harde wind rijden wij via de Reuzenpandasingel.",
"SubReasonType": "5"
}
},
"Stop": {
"Latitude": 52.3087919,
"TimingPointName": "Schiphol Centrum, Plaza/NS",
"StopAreaCode": "schns",
"Longitude": 4.7616716,
"TimingPointTown": "schiphol centrum"
}
}
}
- Returned are 0 or more passes along this timingpoint. Note that the field DestinationName50, LineName, TargetDepartureTime, TargetArrivalTime, LinePublicNumber, ProductFormulaType are optional as they are depending on static timetable information from Koppelvlak7.
- GeneralMessages are messages destined to display at passengers. Usually only the MessageContent field is useful for the passenger
- Stop is an optional field that contains the position, the name, town and stopareacode of this particular timingpoint.
- HTTP error 404 indicates that the server doesn't recognize the timingpointcode.
-
GET /tpc/$timingpointcode1,$timingpointcode2,$timingpointcode3,..
requests multiple timingpointcodes in one request by putting them in a comma separated list. This is the preferred way to keep the server workload as low as possible.
{
"57330620": {
"Passes": { },
"GeneralMessages": { },
"Stop": {
"Latitude": 52.3087919,
"TimingPointName": "Schiphol Centrum, Plaza/NS",
"StopAreaCode": "schns",
"Longitude": 4.7616716,
"TimingPointTown": "schiphol centrum"
}
},
"57330630": {
"Passes": { },
"GeneralMessages": { },
"Stop": {
"Latitude": 52.3086124,
"TimingPointName": "Schiphol Centrum, Plaza/NS",
"StopAreaCode": "schns",
"Longitude": 4.7617181,
"TimingPointTown": "schiphol centrum"
}
}
}