Skip to content
Rubenvangemeren edited this page Jul 28, 2022 · 5 revisions

Line

A line is a predetermined route along several timingpoints. Lines are identified by the combination of DataOwnerCode, LinePlanningNumber and LineDirection.

Get a list of available Line's

  • GET /line/ will return all the Line's processed within the up-time of the API. Lines in this list are all request-able via the requests below. Further metadata such as the dataownercode, lineplanningnumber and direction are returned. Optionally also LineName, LinePublicnumber, TransportType and Destination are returned.
  • LinePublicNumber is the linenumber used when communicated with travellers
  • LinePublicNumber and LinePlanningnumber are both strings.
  • TransportType is an enum with the following values: BUS, TRAIN, METRO, BOAT,TRAM
{
    "VTN_1_1": {
        "TransportType": "BUS",
        "LineName": "Heusdenhout - Westerpark",
        "LinePublicNumber": "1",
        "DataOwnerCode": "VTN",
        "DestinationName50": "Westerpark via Tuinzigt",
        "LinePlanningNumber": "1",
        "LineDirection": "1"
    },
    "HTM_6_1": {
        "TransportType": "TRAM",
        "LineName": "Den Haag Leyenburg - Leidschendam Leidsenhage",
        "LinePublicNumber": "6",
        "DataOwnerCode": "HTM",
        "DestinationName50": "Leidschendam Leidsenhage",
        "LinePlanningNumber": "6",
        "LineDirection": "1"
    },
    "HTM_6_2": {
        "DataOwnerCode": "HTM",
        "LinePlanningNumber": "6",
        "LineDirection": "2"
    },
}

Request information about a Line

  • GET /line/$DataOwnerCode_$LinePlanningNumber_$LineDirection returns the Actuals, the timingpoints along this line and metadata about this line, such as the dataownercode, lineplanningnumber and direction are returned. Optionally also LineName, LinePublicnumber, TransportType and Destination are returned.
  • Actuals are the passes closes to the vehicle driving along the route. On the TripStopStatus it can be determined whether the stop is PLANNED or DRIVING along towards that stop, PASSED along that stop, or ARRIVED at the stop.
  • For the stops the fields Longitude, Latitude, StopAreaCode, TimingPointTown, TimingPointName are optionally based on availability in the Koppelvlak 7 database.
{
    "GVB_5_1": {
        "Actuals": {
            "GVB_95103_5_429_0": {
                "TransportType": "TRAM",
                "DestinationName50": "Centraal Station",
                "longitude": 4.8675123,
                "TimingPointCode": "074451",
                "WheelChairAccessible": "UNKNOWN",
                "LineName": "A'veen Binnenhof - Centraal Station",
                "ExpectedDepartureTime": "2012-06-02T19:00:00",
                "UserStopOrderNumber": 1,
                "TimingPointName": "Binnenhof",
                "LinePlanningNumber": "5",
                "TimingPointDataOwnerCode": "ALGEMEEN",
                "TimingPointTown": "Amstelveen",
                "latitude": 52.3012422,
                "UserStopCode": "074451",
                "JourneyStopType": "FIRST",
                "TargetDepartureTime": "2012-06-02T19:00:00",
                "ExpectedArrivalTime": "2012-06-02T19:00:00",
                "IsTimingStop": false,
                "DataOwnerCode": "GVB",
                "FortifyOrderNumber": 0,
                "JourneyNumber": 429,
                "LocalServiceLevelCode": "95103",
                "LineDirection": "1",
                "LinePublicNumber": "5",
                "DestinationCode": "CS",
                "OperationDate": "2012-06-02",
                "SideCode": "-",
                "ProductFormulaType": 0,
                "StopAreaCode": null,
                "TripStopStatus": "PLANNED",
                "TargetArrivalTime": "2012-06-02T19:00:00"
            },
            "GVB_95103_5_421_0": { },
            "GVB_95103_5_417_0": { }
        },
        "Network": {
            "1984": {
                 "1": {
                     "IsTimingStop": false,
                     "UserStopOrderNumber": 1,
                     "Longitude": 4.8675123,
                     "TimingPointName": "Binnenhof",
                     "StopAreaCode": null,
                     "TimingPointTown": "Amstelveen",
                     "Latitude": 52.3012422,
                     "TimingPointCode": "074451"
                 },
                 "2": { },
                 "3": { }
            }
        },
        "Line": {
            "TransportType": "TRAM",
            "LineName": "A'veen Binnenhof - Centraal Station",
            "LinePublicNumber": "5",
            "DataOwnerCode": "GVB",
            "DestinationName50": "Centraal Station",
            "LinePlanningNumber": "5",
            "LineDirection": "1"
        }
    }
}

Request information about multiple Line's in one request.

  • GET /line/$DataOwnerCode1_$LinePlanningNumber1_$LineDirection1,$DataOwnerCode2_$LinePlanningNumber2_$LineDirection2,... returns multiple Line's in one request.
{

    "GVB_5_1": {
        "Actuals": { },
        "Network": { },
        "Line": {
            "TransportType": "TRAM",
            "LineName": "A'veen Binnenhof - Centraal Station",
            "LinePublicNumber": "5",
            "DataOwnerCode": "GVB",
            "DestinationName50": "Centraal Station",
            "LinePlanningNumber": "5",
            "LineDirection": "1"
        }
    },
    "GVB_5_2": {
        "Actuals": { },
        "Network": { },
        "Line": {
            "TransportType": "TRAM",
            "LineName": "A'veen Binnenhof - Centraal Station",
            "LinePublicNumber": "5",
            "DataOwnerCode": "GVB",
            "DestinationName50": "A'veen Binnenhof",
            "LinePlanningNumber": "5",
            "LineDirection": "2"
        }
    }

}