Trip (p:trip)¶
http://profiles.goabout.com/trip
A trip is a description to get from one location to another location at a certain time. It is created in the context of a Trip alternatives (p:trip-alternatives) resource by sending a POST request to a Trip planner (r:plan) relation link.
Trip resources may expire in time, unless the trip is selected using a Trip selection (p:trip-selection) resource.
Example¶
$ curl -H'Content-Type: application/json' -H'Authorization: Bearer UArtDY9Bpo9Whga2mfd7nIK6vENxp2twtnH7RvPC6xj0jy6' 'https://api.goabout.com/trip/512'
{
"delay" : 0,
"departure" : "2013-12-16T10:12:00.000Z",
"arrival" : "2013-12-16T10:18:39.000Z",
"duration" : 399,
"distance" : 522.0705836936742,
"transfers" : 0,
"from" : {
"latitude" : 52.37460530588672,
"longitude" : 4.895497175516921
},
"to" : {
"latitude" : 52.37759095501316,
"longitude" : 4.900266416974644
},
"tripLegs" : [ {
"departure" : "2013-12-16T10:12:00.000Z",
"departureTime" : "2013-12-16T10:12:00.000Z",
"scheduledDepartureTime" : "2013-12-16T10:12:00.000Z",
"arrival" : "2013-12-16T10:18:39.000Z",
"arrivalTime" : "2013-12-16T10:18:39.000Z",
"scheduledArrivalTime" : "2013-12-16T10:18:39.000Z",
"departureLocation" : {
"type" : "street",
"label" : "Beursplein, Amsterdam",
"coordinates" : {
"latitude" : 52.37460530588672,
"longitude" : 4.895497175516921
},
"street" : "Beursplein",
"city" : "Amsterdam"
},
"arrivalLocation" : {
"type" : "street",
"label" : "Stationsplein, Amsterdam",
"coordinates" : {
"latitude" : 52.37759095501316,
"longitude" : 4.900266416974644
},
"street" : "Stationsplein",
"city" : "Amsterdam"
},
"mode" : {
"modeType" : "walk",
"name" : "",
"lineNumber" : ""
},
"distance" : 522.0705836936742,
"intermediateStops" : [ ],
"shape" : "o}||Hwyd^hE{CCK",
"reservationHref" : "https://api.goabout.com/reservation/12",
"subscriptionHrefs": [ "https://api.goabout.com/subscription/223" ],
"productHrefs": [ "https://api.goabout.com/product/21" ],
"selfHref" : "https://api.goabout.com/trip-leg/1623"
} ],
"notifications" : [ ],
"emission" : 0.0,
"cost" : 0.0,
"_links" : {
"self" : {
"href" : "https://api.goabout.com/trip/512"
}
}
}
Reference¶
Trip¶
- from
Coordinates The coordinates of the departure location
- to
Coordinates The coordinates of the arrival location
- departure
DateTime The time at which to depart. If there is any dynamic/realtime information, this datetime will show the estimated time.
- arrival
DateTime The time at which this trip will arrive. If there is any dynamic/realtime information, this datetime will show the estimated time.
- delay
Integer The delay in seconds, if any.
- duration
Integer The duration of the entire trip, in seconds.
- distance
Double The distance traveled in meters.
- transfers
Integer The number of transfers this trip will need. 1
- emission
Double The estimated amount of CO2 emission in kg.
- cost
Double The estimated costs for this trip, in €, with 2 decimals.
- tripLegs
TripLeg[] A list of tripLeg.
- notifications
Notification[] A list of notification.
- 1
Only transfers from and to transit modes are counted. E.g. from tram to train, but not from bike to tram. Or: walk-tram-bus-cycle trip, has 1 transfer.
Coordinates¶
- latitude
Double The latitude coordinate in degrees, north is positive, south is negative
- longitude
Double The longitude coordinate in degrees, east is positive, west is negative
TripLeg¶
- departure
DEPRECATED
DateTime Scheduled Departure time- arrival
DEPRECATED
DateTime Scheduled Arrival time- departureTime
DateTime Estimated Departure time, based on dynamic/realtime information.
- scheduledDepartureTime
DateTime Scheduled Departure time.
- departureDelay
String A semantic string, indicating the delay at departure. 2
- departureLocation
Location (p:location) The location this leg departs from.
- arrivalTime
DateTime Estimated arrival time, based on dynamic/realtime information.
- scheduledArrivalTime
DateTime Scheduled Arrival time
- arrivalDelay
String A semantic string, indicating the delay at arrival. 2
- arrivalLocation
Location (p:location) The location this leg gets you to.
- dynamic
Boolean If true, the answer is the result of planning with dynamic information.
- mode
Mode The mode used during this leg.
- distance
Double Distance traveled during this leg, empty for TRAIN legs, in meters.
- intermediateStops
IntermediateStop[] The intermediate stops for this leg.
- shape
PolyLine A shape, encoded as PolyLine
- reservationHref
DEPRECATED
URI [OPTIONAL] The href to the reservation linked to this trip-leg- subscriptionHrefs
DEPRECATED
URI [OPTIONAL] The href to a subscription the user has, that can be used to make a reservation for this trip-leg.- productHrefs
DEPRECATED
URI [OPTIONAL] The href to a product, that can be used to make a reservation for this trip-leg. Note that there the user needs to subscribe to this product first. The client :term:MAY subscribe the user on-the-fly while making a reservation.- selfHref
DEPRECATED
URI Same as self-link. Here only to facilitate the need for trip-leg to be an entity, but it isn’t yet in context of a trip.
Notification¶
- id
String A temporary unique identifier for this notification
- agency
String The agency from which the notification originated
- message
String A localized message
- severity
NotificationSeverify The severity of this notification
NotificationSeverity¶
- warning
LiteralValue Things are happening, things that influence the trip, delays and stuff.
- info
LiteralValue Kind of ‘take note of this’ severity.
IntermediateStop¶
- location
String The location of this intermediate stop.
- arrival
DateTime The arrival time at this intermediate stop.
- departure
DateTime The departure time from this intermediate stop.
Mode¶
- modeType
ModeType The type of this Mode.
- name
String Something like ‘Intercity’, ‘Arriva Bus’, ‘Fiets’, ‘OV-Fiets’, etc..
- agencyName
String [OPTIONAL] The name of the agency operating this mode, e.g. ‘Haagse Tramweg Maatschappij’, ‘NS Hispeed’.
- headsign
String [OPTIONAL] Main destination of mode, if available, as displayed on the vehicle
- lineNumber
String [OPTIONAL] Something like ‘1’, ‘213’, ‘22a’, usually associated with a specific route.
- ownerHref
URI [OPTIONAL] The href pointing to the owner of this mode.
- logoHref
URI [OPTIONAL] The href to the logo for this mode.
- href
URI [OPTIONAL] The href where more (human readable) information about this mode can be found.
- description
String [OPTIONAL] A (short) description about this mode. Intended to be displayed close to where the mode itself is shown (e.g. in a tooltip text).