Magidoc

planConnection
Query

Plan (itinerary) search that follows GraphQL Cursor Connections Specification .

Arguments

#

after

Takes in cursor from a previous search. Used for forward pagination. If earliest departure time is used in the original query, the new search then returns itineraries that depart after the start time of the last itinerary that was returned, or at the same time if there are multiple itinerary options that can depart at that moment in time. If latest arrival time is defined, the new search returns itineraries that arrive before the end time of the last itinerary that was returned in the previous search, or at the same time if there are multiple itinerary options that can arrive at that moment in time. This parameter is part of the GraphQL Cursor Connections Specification and should be used together with the first parameter.

before

Takes in cursor from a previous search. Used for backwards pagination. If earliest departure time is used in the original query, the new search then returns itineraries that depart before that time. If latest arrival time is defined, the new search returns itineraries that arrive after that time. This parameter is part of the GraphQL Cursor Connections Specification and should be used together with the last parameter.

dateTime

Datetime of the search. It's possible to either define the earliest departure time or the latest arrival time. By default, earliest departure time is set as now.

destination

Non-null

The destination where the search ends. Usually coordinates but can also be a stop location.

first

How many new itineraries should at maximum be returned in either the first search or with forward pagination. This parameter is part of the GraphQL Cursor Connections Specification and should be used together with the after parameter (although after shouldn't be defined in the first search).

itineraryFilter

Settings that control the behavior of itinerary filtering. These are advanced settings and should not be set by a user through user preferences.

last

How many new itineraries should at maximum be returned in backwards pagination. It's recommended to use the same value as was used for the first parameter in the original search for optimal performance. This parameter is part of the GraphQL Cursor Connections Specification and should be used together with the before parameter.

locale

Locale used for translations. Note, there might not necessarily be translations available. It's possible and recommended to use the ´accept-language´ header instead of this parameter.

modes

Street and transit modes used during the search. This also includes options to only return an itinerary that contains no transit legs or force transit to be used in all itineraries. By default, all transit modes are usable and WALK is used for direct street suggestions, access, egress and transfers.

origin

Non-null

The origin where the search starts. Usually coordinates but can also be a stop location.

preferences

Preferences that affect what itineraries are returned. Preferences are split into categories.

searchWindow

Duration of the search window. This either starts at the defined earliest departure time or ends at the latest arrival time. If this is not provided or the value is set as null, a reasonable search window is automatically generated. When searching for earlier or later itineraries with paging, this search window is no longer used and the new window will be based on how many suggestions were returned in the previous search. The new search window can be shorter or longer than the original search window. Note, itineraries are returned faster with a smaller search window and search window limitation is done mainly for performance reasons.

Setting this parameter makes especially sense if the transportation network is as sparse or dense in the whole itinerary search area. Otherwise, letting the system decide what is the search window is in combination of using paging can lead to better performance and to getting a more consistent number of itineraries in each search.

via

The list of points the itinerary is required to pass through.

Response

#

Returns PlanConnection .

Example

#

    
  

3

    
  

3

    
  

3