# 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",
"subscriptionHrefs": [ "https://api.goabout.com/subscription/223" ],
"productHrefs": [ "https://api.goabout.com/product/21" ],
} ],
"notifications" : [ ],
"emission" : 0.0,
"cost" : 0.0,
"self" : {
}
}
}


## Reference¶

### Trip¶

from: Coordinates The coordinates of the departure location Coordinates The coordinates of the arrival location DateTime The time at which to depart. If there is any dynamic/realtime information, this datetime will show the estimated time. DateTime The time at which this trip will arrive. If there is any dynamic/realtime information, this datetime will show the estimated time. Integer The delay in seconds, if any. Integer The duration of the entire trip, in seconds. Double The distance traveled in meters. Integer The number of transfers this trip will need. [1] Double The estimated amount of CO2 emission in kg. Double The estimated costs for this trip, in €, with 2 decimals. TripLeg[] A list of tripLeg. 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 Double The longitude coordinate in degrees, east is positive, west is negative

### TripLeg¶

departure: arrival: DEPRECATED DateTime Scheduled Departure time DEPRECATED DateTime Scheduled Arrival time DateTime Estimated Departure time, based on dynamic/realtime information. DateTime Scheduled Departure time. String A semantic string, indicating the delay at departure. [2] Location (p:location) The location this leg departs from. DateTime Estimated arrival time, based on dynamic/realtime information. DateTime Scheduled Arrival time String A semantic string, indicating the delay at arrival. [2] Location (p:location) The location this leg gets you to. Boolean If true, the answer is the result of planning with dynamic information. Mode The mode used during this leg. Double Distance traveled during this leg, empty for TRAIN legs, in meters. IntermediateStop[] The intermediate stops for this leg. PolyLine A shape, encoded as PolyLine DEPRECATED URI [OPTIONAL] The href to the reservation linked to this trip-leg DEPRECATED URI [OPTIONAL] The href to a subscription the user has, that can be used to make a reservation for this trip-leg. 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. 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.
 [2] (1, 2) Something like “+3 min” for three minutes delay. Not guaranteed to be parse-able.

id: String A temporary unique identifier for this notification String The agency from which the notification originated String A localized message NotificationSeverify The severity of this notification

warning: LiteralValue Things are happening, things that influence the trip, delays and stuff. LiteralValue Kind of ‘take note of this’ severity.

### IntermediateStop¶

location: String The location of this intermediate stop. DateTime The arrival time at this intermediate stop. DateTime The departure time from this intermediate stop.

### Mode¶

modeType: ModeType The type of this Mode. String Something like ‘Intercity’, ‘Arriva Bus’, ‘Fiets’, ‘OV-Fiets’, etc.. String [OPTIONAL] The name of the agency operating this mode, e.g. ‘Haagse Tramweg Maatschappij’, ‘NS Hispeed’. String [OPTIONAL] Main destination of mode, if available, as displayed on the vehicle String [OPTIONAL] Something like ‘1’, ‘213’, ‘22a’, usually associated with a specific route. URI [OPTIONAL] The href pointing to the owner of this mode. URI [OPTIONAL] The href to the logo for this mode. URI [OPTIONAL] The href where more (human readable) information about this mode can be found. 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).

### ModeType¶

These values seem to speak for themselves

• bicycle
• bus
• car
• ferry
• subway
• train
• tram
• walk