Description

With this API, you can get travel proposals from point A to point B within Stockholm County using SL’s traffic. Waxholmsbolaget’s traffic is also included in SL’s journey planner. The API can be used to calculate travel proposals between any combination of positions and/or stops. The API returns travel proposals based on the “best match” for the input.

In the journey planner, there are four different functions that can be called:

  • Trip: Calculates a journey from a starting point to a destination. These can be station IDs or coordinates based on addresses or “points of interest.”
  • JourneyDetail: Returns detailed information about part of a journey with a vehicle. It returns a list of all stops/stations, including all arrival and departure times with real-time data (if available).
  • Reconstruction: Used to recreate a copy of a Trip using a reconstruction context. The result will be a complete copy given that the underlying data has not changed.
  • GisRoute: Provides detailed information about the route.
  • XSD: Returns an XSD containing definitions for all the input parts of the response structures for the services in SL Reseplanerare 3.

The journey planner is invoked with a GET request per service with UTF-8 URL-encoded GET parameters.

Changes Since the Previous Version

A change has been made that may affect implemented applications. For version 3.1 of the journey planner, the response format regarding the “crd” elements in the polyline describing the detailed route has changed. The points in this version are represented by double values compared to version 3.0, which represented them as integers.

Previous version (3.0): <crd>17973032</crd><crd>59360501</crd><crd>9</crd> <crd>18</crd>

Travelplanner 3.1: <crd>17.973032</crd><crd>59.360501</crd><crd>9.0E-6</crd><crd>1.8E-5</crd>

URL

The old domain and base URL https://api.sl.se/api2/TravelplannerV3_1/ has changed on January 15th, and will stop working on March 15th. Query parameters, response bodies and API keys remain unchanged.

API Key Levels

LevelMax Requests/MinuteMax Requests/Month
Bronze3010,000
Silver60500,000
GoldAs needed

Format

JSON or XML according to the extension of the service call.

Trip

Parameters

Change in Site-ids used as search parameter

After an unexpected breaking change in February 2024 the SiteId value expected by the SL Routeplanner 3.1 API has changed. These values changed in February but do still match SiteId values returned by the SL Stop lookup API (given that both APIs are accessed through the integration.sl.se domain).

If you are using site-ids you stored previously, you should convert short (4-7 digits) site-ids in the form of ABCDEFG (padding with zeroes on the left side) into 3BA1CDEFG. For example 9001 becomes 300109001.

NameDescriptionComment
LangLanguage (en/sv/de)Language in the response, default is de.
originExtIdStarting point, ID (9 digits)Can be obtained through SL Stop Lookup or SL Nearby stops.
originCoordLatLatitude for the starting point. WGS84 in decimal notation, for example 64.00.Must be provided together with originCoordLong.
originCoordLongLongitude for the starting point. WGS84 in decimal notation, for example 17.50.Must be provided together with originCoordLat.
destExtIdDestination, ID (9 digits)Can be obtained through SL Stop Lookup or SL Nearby stops.
destCoordLatLatitude for the destination. WGS84 in decimal notation, for example 64.00.Must be provided together with destCoordLong.
destCoordLongLongitude for the destination. WGS84 in decimal notation, for example 17.50.Must be provided together with destCoordLat
ViaList of specifications for stations to pass.Optional, max 2. Separated by ; in the following format: viaId|waitTime|status|products
  • viaId, external ID of the stop/station to pass
  • waitTime, minutes to stop at the passed stop/station (optional)
  • status, one of EXR (boarding and alighting required), NER (boarding not required), NXR (alighting not required), NEXR (boarding and alighting not required). Optional, EXT is default.
  • products, transport modes for via, see Product
Ex1. via two stops, 300109001;300109117 Ex2, via two stops with 15 and 10 minutes waiting time, 300109001|15;300109117|10
viaIdID for station to pass.Optional Single ID for a stop/station to pass, e.g., 300109001.
viaWaitTimeWaiting time for the passed stationOptional Number of minutes to spend at the via-station specified with viaId.
AvoidList of stations to avoid passing.Optional Separated by ; in the following format: avoidId|avoidStatus
  • avoidId, internal or external ID for stop/station to avoid
  • avoidStatus, one of NPAVO (do not pass), NCAVO (do not change at)
Optional.
avoidIDID for station to avoid.Optional Internal or external ID for stop/station to avoid for changes.
changeTimePercentExtended change time, percentage (100-500)Optional Percentage extension of the originally calculated time to manage a change. For example, 200 doubles the time that the system will use for the traveler to make a change. Default 100.
minChangeTimeMinimum change time (min)Optional Minimum number of minutes to be used when changing.
maxChangeTimeMaximum change timeOptional Maximum number of minutes to be used when changing.
addChangeTimeExtended change timeOptional Number of minutes added to the calculated change time.
maxChangeMaximum number of changes (0-11)Optional Maximum number of changes on suggested journeys.
DateDate YYYY-MM-DDOptional. Date for the journey. Default is today’s date (server time)
TimeTime HH:MMOptional Time for the journey. Default is the current time (server time)
searchForArrival0 or 1Optional. If 1, use the specified date and time for arrival instead of departure.
numF0-6Optional Minimum number of journeys after the specified start time, default is 4. numF and numB together cannot exceed 6.
numB0-6Optional. Minimum number of journeys before the specified start time, default is 1. numF and numB together cannot exceed 6.
ProductsTransport modes, integerOptional Combination value of desired transport modes if not all should be used in the search for journeys. Bitmask as follows: Commuter train (1) Metro (2) Local train/tram (4) Bus (8) Not in use (16) Not in use (32) Boat type (64) Local traffic (128) The value is given as the integer value of the combined bitmask, e.g., Bus and boat, 8+64 = 72
LinesIncluded line filtering.Line or lines, separated by commas, to be used to filter results, exclamation mark is used for exclusion of lines. E.g.: lines=55,122 (only lines 55 and 122) lines=!19 (Not line 19)
ContextEarlier or later journeysOptional. Parameter that specifies the starting point for searching for later or earlier journeys. The value is obtained from the result value srcF or srcB in a call to the trip service. See 2.4.2
Poly0 or 1Optional. Specifies whether detailed routes should be calculated for the results. For a description of the polyline, see 2.4.5. Default is 0.
Passlist0 or 1Optional. Specifies whether stops/stations passed during the journey should be retrieved. Default is 0.
originWalk0 or 1 + detailingOptional, Default 1 Specifies whether a journey can start with a walking distance. For detailing distance, min and max number of meters can be specified as 1,[min distance],[max distance],[speed],[as the crow flies] Speed is specified as follows: < 100: faster = 100: normal (default) > 100: slower As the crow flies: 1= on 0= off Example: 1,0,1000,0,1 Allows fast walking but a maximum of 1000 meters as the crow flies.
destWalk0 or 1 + detailingOptional. Similar to originWalk but for destination.
originBikeOptional. Similar to originWalk Comment: To get accurate results, you need to disable walking search, i.e., set the parameter originWalk=0
destBikeOptional. Similar to originWalk Comment: To get accurate results, you need to disable walking search, i.e., set the parameter destWalk=0
originCarNot used at the moment
destCarNot used at the moment
originTaxiNot used at the moment
destTaxiNot used at the moment
originParkNot used at the moment Enables “Park and Ride” at the beginning of a journey. To fine-tune the distance to the next station, see originWalk
destParkNot used at the moment Enables “Park and Ride” at the end of a journey. To fine-tune the distance to the next station, see originWalk

Search for Earlier or Later Journeys

In the result from the trip, two output parameters, scrB and scrF, can be used to search for earlier (scrB) or later (scrF) departures. This is done by sending the same search to the trip with the context parameter set to the value of the one to be used.

Notes

In the search results, there are different types of notes.

Fixed notes are entered as “notes”. Fixed notes are notes linked to the departure in the timetable, such as pre-booking by phone.

Disruption messages are entered as “Messages”.

Prices

Prices for a journey come in “TariffResult,” and the prices are specified as integers in öre. For example:

 1
 2<TariffResult>
 3    <fareSetItem name="ONEWAY" desc="SL">
 4        <fareItem name="Reskassa" desc="Helt pris" cur="SEK" price="3100"/>
 5        <fareItem name="övriga försäljningsställen" desc="Helt pris" cur="SEK" price="4400"/>
 6        <fareItem name="Konduktör på Spårväg City" desc="Helt pris" cur="SEK" price="6200"/>
 7        <fareItem name="Reskassa" desc="Reducerat pris" cur="SEK" price="2100"/>
 8        <fareItem name="övriga försäljningsställen" desc="Reducerat pris" cur="SEK" price="3000"/>
 9        <fareItem name="Konduktör på Spårväg City" desc="Reducerat pris" cur="SEK" price="4100"/>
10    </fareSetItem>
11</TariffResult>

Detailed Routes

Trip and journeyDetail can provide a detailed route for the result in “Polyline”, for example:

1
2<Polyline type="WGS84" delta="true" dim="2" crdEncS="NNNNNN">
3    <crd>18.06199</crd>
4    <crd>59.332455</crd>
5    <crd>2.7E-5</crd>
6    <crd>-9.0E-6</crd>
7    <crd>-1.8E-5</crd>
8    <crd>9.0E-6</crd>
9</Polyline>

The coordinate list consists of a starting longitude and latitude, and the following differences from the previous point. In the example above, a line consisting of points (longitude, latitude): (18.061711,59.331331),( 18.062017, 59.332446),( 18.061999, 59.332455)

Real-time

Real-time is currently available for buses, commuter trains, tram and Roslagsbanan.

Real-time is a forecast, i.e., it is approximate.

If there is real-time, this is indicated in separate fields. For real-time in the travel proposal, “rtTime” and “rtDate” are added to the response. The old fields “time” and “date” are still there so that you know what has changed from/to.

In this version of the API, real-time is not parameter-driven but is always delivered if data is available.

Response Format

The API can return both XML and JSON. The JSON content is automatically converted from XML according to the following rules:

  • Element names become object properties
  • Text (PCDATA) becomes an object property with the name $: foo becomes { "a": { "$" : "foo" } }
  • Nested elements become nested properties: <a><b>foo</b><c>foo</c></a> becomes { "a": { "b" : { "$": "foo" }, "c": { "$": "foo"} } }
  • If there are multiple elements with the same name, it is translated into a JSON array, e.g.: <a><b>foo1</b><b>foo2</b></a> becomes { "a": { "b" : [{"$": foo1" }, {"$": "foo2" }] } }
  • Attribute names become object properties: <a atb="foo1">foo2</a> becomes { "a": { "atb" : "foo1", "$" : "foo2" } }

Response Structure

In the table below, the XML structure is described. Some obvious attributes are not included as it becomes very much otherwise, such as Lat and Lon, to give an easier overview of what is less obvious. For more information about various attributes and elements so there is also xsd’n hafasRestTrip.xsd.

Example explanation of the structure in the table below: element1/element2 => element2 is a sub-element to element1. element1.attribut1 => attribut1 is an attribute of element1.

ElementNotes
ElementNotes
Element ErrorElement som innehåller felbeskrivning
Complex type PolylineDetaljerad färdväg, om poly=1 angivits.
Element Product
Complex type ProductType
Produktkontext, möjliggör åtkomst till intern data.
Ex.
<Product name=" " admin="100017" operatorCode="SL"
operator="Storstockholms Lokaltrafik" num="11297"
line="17" catOutS="MET" catOutL="TUNNELBANA "
catOut="METRO " catIn="MET" catCode="1"/>
Element JourneyDetailRefReferens till journey detail för ett detta leg-elementet.
Simple type PrognosisTypeInnehåller typ av prognos. Om den rapporterades in av extern part, räknades ut, eller rättades av systemet.
Element StopsEn lista av journey stops/stations, om passlist=1 angivits.
Complex type StopTypeElementet stop innehåller namnet, route index, latitude, longitude, departure time/date, arrival time/date, track, realtidsdata för ankomst och avgång sampt track.
Element MessagesInnehåller en lista av meddelanden för denna trip.
Element NamesLists av journey names
Element JourneyStatusInnehåller status för Journey.
Element TripListRotelement, innehåller en lista på alla Trips vid anrop till trip. Om ett större fel har inträffat under anrop så innehåller attributen errorCode och errortext felbeskrivning.
Element TripTrip-objektet innehåller en lista med Leg-objekt med den uträknade resan.
Element LegListInnehåller alla Leg-element för en Trip.
Element LegLeg-objektet är en del av en resa. Det kan vara antingen en gångväg, cykel eller bilväg eller oftast en resa med bus, tåg, eller annat typ av transportmedel.
Element OriginInnehåller namn, typ, rout index, realtidsdata för startpunkten för denna resa.
Element DestinationInnehåller namn, typ, rout index, realtidsdata för destinationen för denna resa.
Element GisRefReferens till en specifik route i ett Leg-element.

Genererad exempeldata

  1<?xml version="1.0" encoding="utf-8"?>
  2<Trip alternative="false" valid="true" idx="1" tripId="tripId1" ctxRecon="ctxRecon1" duration="P396DT1H1M1S"
  3      return="false" ecoUrl="ecoUrl1" checksum="checksum1" xmlns="hafas_rest">
  4    <Messages>
  5        <Message id="id1" externalId="externalId1" act="true" pub="pub1" head="head1" lead="lead1" text="text1"
  6                 tckr="tckr1" company="company1" category="category1" priority="1" products="1" icon="icon1"
  7                 routeIdxFrom="1" routeIdxTo="1" sTime="sTime1" sDate="sDate1" eTime="eTime1" eDate="eDate1"
  8                 altStart="altStart1" altEnd="altEnd1">
  9            <affectedProduct name="name1" num="num1" line="line1" catOut="catOut1" catIn="catIn1" catCode="catCode1"
 10                             catOutS="catOutS1" catOutL="catOutL1" operatorCode="operatorCode1" operator="operator1"
 11                             admin="admin1"/>
 12            <affectedProduct name="name2" num="num2" line="line2" catOut="catOut2" catIn="catIn2" catCode="catCode2"
 13                             catOutS="catOutS2" catOutL="catOutL2" operatorCode="operatorCode2" operator="operator2"
 14                             admin="admin2"/>
 15            <affectedProduct name="name3" num="num3" line="line3" catOut="catOut3" catIn="catIn3" catCode="catCode3"
 16                             catOutS="catOutS3" catOutL="catOutL3" operatorCode="operatorCode3" operator="operator3"
 17                             admin="admin3"/>
 18        </Message>
 19        <Message id="id2" externalId="externalId2" act="false" pub="pub2" head="head2" lead="lead2" text="text2"
 20                 tckr="tckr2" company="company2" category="category2" priority="-2147483647" products="-2147483647"
 21                 icon="icon2" routeIdxFrom="-2147483647" routeIdxTo="-2147483647" sTime="sTime2" sDate="sDate2"
 22                 eTime="eTime2" eDate="eDate2" altStart="altStart2" altEnd="altEnd2">
 23            <affectedProduct name="name4" num="num4" line="line4" catOut="catOut4" catIn="catIn4" catCode="catCode4"
 24                             catOutS="catOutS4" catOutL="catOutL4" operatorCode="operatorCode4" operator="operator4"
 25                             admin="admin4"/>
 26            <affectedProduct name="name5" num="num5" line="line5" catOut="catOut5" catIn="catIn5" catCode="catCode5"
 27                             catOutS="catOutS5" catOutL="catOutL5" operatorCode="operatorCode5" operator="operator5"
 28                             admin="admin5"/>
 29            <affectedProduct name="name6" num="num6" line="line6" catOut="catOut6" catIn="catIn6" catCode="catCode6"
 30                             catOutS="catOutS6" catOutL="catOutL6" operatorCode="operatorCode6" operator="operator6"
 31                             admin="admin6"/>
 32        </Message>
 33        <Message id="id3" externalId="externalId3" act="true" pub="pub3" head="head3" lead="lead3" text="text3"
 34                 tckr="tckr3" company="company3" category="category3" priority="2147483647" products="2147483647"
 35                 icon="icon3" routeIdxFrom="2147483647" routeIdxTo="2147483647" sTime="sTime3" sDate="sDate3"
 36                 eTime="eTime3" eDate="eDate3" altStart="altStart3" altEnd="altEnd3">
 37            <affectedProduct name="name7" num="num7" line="line7" catOut="catOut7" catIn="catIn7" catCode="catCode7"
 38                             catOutS="catOutS7" catOutL="catOutL7" operatorCode="operatorCode7" operator="operator7"
 39                             admin="admin7"/>
 40            <affectedProduct name="name8" num="num8" line="line8" catOut="catOut8" catIn="catIn8" catCode="catCode8"
 41                             catOutS="catOutS8" catOutL="catOutL8" operatorCode="operatorCode8" operator="operator8"
 42                             admin="admin8"/>
 43            <affectedProduct name="name9" num="num9" line="line9" catOut="catOut9" catIn="catIn9" catCode="catCode9"
 44                             catOutS="catOutS9" catOutL="catOutL9" operatorCode="operatorCode9" operator="operator9"
 45                             admin="admin9"/>
 46        </Message>
 47    </Messages>
 48    <Eco co2="0.0" part="0.0" partV="0.0" nmhc="0.0" nox="0.0" prime="0.0" so2="0.0"/>
 49    <ServiceDays planningPeriodBegin="planningPeriodBegin1" planningPeriodEnd="planningPeriodEnd1" sDaysR="sDaysR1"
 50                 sDaysI="sDaysI1" sDaysB="sDaysB1" routeIdxFrom="1" routeIdxTo="1"/>
 51    <ServiceDays planningPeriodBegin="planningPeriodBegin2" planningPeriodEnd="planningPeriodEnd2" sDaysR="sDaysR2"
 52                 sDaysI="sDaysI2" sDaysB="sDaysB2" routeIdxFrom="-2147483647" routeIdxTo="-2147483647"/>
 53    <ServiceDays planningPeriodBegin="planningPeriodBegin3" planningPeriodEnd="planningPeriodEnd3" sDaysR="sDaysR3"
 54                 sDaysI="sDaysI3" sDaysB="sDaysB3" routeIdxFrom="2147483647" routeIdxTo="2147483647"/>
 55    <LegList>
 56        <Leg idx="anySimpleType" name="name1" number="number1" category="category1" type="type1" cancelled="false"
 57             partCancelled="false" reachable="true" direction="direction1" duration="P396DT1H1M1S" dist="1">
 58            <Origin name="name1" type="ST" id="id1" extId="extId1" lon="1" lat="1" routeIdx="1"
 59                    prognosisType="PROGNOSED" time="time1" date="date1" tz="0" track="track1" rtTime="rtTime1"
 60                    rtDate="rtDate1" rtTz="0" rtTrack="rtTrack1" hasMainMast="true" mainMastId="mainMastId1"
 61                    mainMastExtId="mainMastExtId1">
 62                <Notes>
 63                    <Note key="key1" type="U" priority="1" routeIdxFrom="1" routeIdxTo="1">Note1</Note>
 64                    <Note key="key2" type="A" priority="-2147483647" routeIdxFrom="-2147483647"
 65                          routeIdxTo="-2147483647">Note2
 66                    </Note>
 67                    <Note key="key3" type="I" priority="2147483647" routeIdxFrom="2147483647" routeIdxTo="2147483647">
 68                        Note3
 69                    </Note>
 70                </Notes>
 71            </Origin>
 72            <Destination name="name1" type="ST" id="id1" extId="extId1" lon="1" lat="1" routeIdx="1"
 73                         prognosisType="PROGNOSED" time="time1" date="date1" tz="0" track="track1" rtTime="rtTime1"
 74                         rtDate="rtDate1" rtTz="0" rtTrack="rtTrack1" hasMainMast="true" mainMastId="mainMastId1"
 75                         mainMastExtId="mainMastExtId1"/>
 76            <JourneyDetailRef ref="ref1"/>
 77            <GeometryRef ref="anySimpleType"/>
 78            <GisRef ref="ref1"/>
 79            <GisRoute dist="1" durS="P396DT1H1M1S" durR="P396DT1H1M1S" durST="P396DT1H1M1S" durW2C="P396DT1H1M1S"
 80                      durW2D="P396DT1H1M1S" dirTxt="dirTxt1" dirGeo="1">
 81                <seg name="name1" rType="U" rNum="rNum1" man="NO" manTx="manTx1" dirTx="dirTx1" ori="U" polyS="1"
 82                     polyE="1" dist="1"/>
 83                <seg name="name2" rType="M" rNum="rNum2" man="FR" manTx="manTx2" dirTx="dirTx2" ori="N"
 84                     polyS="-2147483647" polyE="-2147483647" dist="-2147483647"/>
 85                <seg name="name3" rType="H" rNum="rNum3" man="TO" manTx="manTx3" dirTx="dirTx3" ori="S"
 86                     polyS="2147483647" polyE="2147483647" dist="2147483647"/>
 87                <polyline name="name1" delta="true" dim="2" type="WGS84" crdEncYX="crdEncYX1" crdEncZ="crdEncZ1"
 88                          crdEncS="crdEncS1">
 89                    <crd>1</crd>
 90                    <crd>-2147483647</crd>
 91                    <crd>2147483647</crd>
 92                </polyline>
 93                <altPolyline name="name1" delta="true" dim="2" type="WGS84" crdEncYX="crdEncYX1" crdEncZ="crdEncZ1"
 94                             crdEncS="crdEncS1">
 95                    <crd>1</crd>
 96                    <crd>-2147483647</crd>
 97                    <crd>2147483647</crd>
 98                </altPolyline>
 99                <altPolyline name="name2" delta="false" dim="1" type="WGS84" crdEncYX="crdEncYX2" crdEncZ="crdEncZ2"
100                             crdEncS="crdEncS2">
101                    <crd>0</crd>
102                    <crd>2</crd>
103                    <crd>-2147483646</crd>
104                </altPolyline>
105                <altPolyline name="name3" delta="true" dim="-2147483647" type="PLANAR" crdEncYX="crdEncYX3"
106                             crdEncZ="crdEncZ3" crdEncS="crdEncS3">
107                    <crd>2147483646</crd>
108                    <crd>-1</crd>
109                    <crd>3</crd>
110                </altPolyline>
111            </GisRoute>
112            <JourneyStatus>P</JourneyStatus>
113            <Product name="name1" num="num1" line="line1" catOut="catOut1" catIn="catIn1" catCode="catCode1"
114                     catOutS="catOutS1" catOutL="catOutL1" operatorCode="operatorCode1" operator="operator1"
115                     admin="admin1"/>
116            <Polyline name="name1" delta="true" dim="2" type="WGS84" crdEncYX="crdEncYX1" crdEncZ="crdEncZ1"
117                      crdEncS="crdEncS1">
118                <crd>1</crd>
119                <crd>-2147483647</crd>
120                <crd>2147483647</crd>
121            </Polyline>
122            <Stops>
123                <Stop name="name1" id="id1" extId="extId1" routeIdx="1" lon="1" lat="1" arrPrognosisType="PROGNOSED"
124                      depPrognosisType="PROGNOSED" depTime="depTime1" depDate="depDate1" depTz="0" arrTime="arrTime1"
125                      arrDate="arrDate1" arrTz="0" passingTime="passingTime1" passingDate="passingDate1" passingTz="0"
126                      arrTrack="arrTrack1" depTrack="depTrack1" rtDepTime="rtDepTime1" rtDepDate="rtDepDate1"
127                      rtDepTz="0" rtArrTime="rtArrTime1" rtArrDate="rtArrDate1" rtArrTz="0" rtArrTrack="rtArrTrack1"
128                      rtDepTrack="rtDepTrack1" rtPassingTime="rtPassingTime1" rtPassingDate="rtPassingDate1"
129                      rtPassingTz="0" cancelled="false" hasMainMast="true" mainMastId="mainMastId1"
130                      mainMastExtId="mainMastExtId1"/>
131                <Stop name="name2" id="id2" extId="extId2" routeIdx="-2147483647" lon="-79228162514264337593543950335"
132                      lat="-79228162514264337593543950335" arrPrognosisType="MANUAL" depPrognosisType="MANUAL"
133                      depTime="depTime2" depDate="depDate2" depTz="1" arrTime="arrTime2" arrDate="arrDate2" arrTz="1"
134                      passingTime="passingTime2" passingDate="passingDate2" passingTz="1" arrTrack="arrTrack2"
135                      depTrack="depTrack2" rtDepTime="rtDepTime2" rtDepDate="rtDepDate2" rtDepTz="1"
136                      rtArrTime="rtArrTime2" rtArrDate="rtArrDate2" rtArrTz="1" rtArrTrack="rtArrTrack2"
137                      rtDepTrack="rtDepTrack2" rtPassingTime="rtPassingTime2" rtPassingDate="rtPassingDate2"
138                      rtPassingTz="1" cancelled="true" hasMainMast="false" mainMastId="mainMastId2"
139                      mainMastExtId="mainMastExtId2"/>
140                <Stop name="name3" id="id3" extId="extId3" routeIdx="2147483647" lon="79228162514264337593543950335"
141                      lat="79228162514264337593543950335" arrPrognosisType="REPORTED" depPrognosisType="REPORTED"
142                      depTime="depTime3" depDate="depDate3" depTz="-2147483647" arrTime="arrTime3" arrDate="arrDate3"
143                      arrTz="-2147483647" passingTime="passingTime3" passingDate="passingDate3" passingTz="-2147483647"
144                      arrTrack="arrTrack3" depTrack="depTrack3" rtDepTime="rtDepTime3" rtDepDate="rtDepDate3"
145                      rtDepTz="-2147483647" rtArrTime="rtArrTime3" rtArrDate="rtArrDate3" rtArrTz="-2147483647"
146                      rtArrTrack="rtArrTrack3" rtDepTrack="rtDepTrack3" rtPassingTime="rtPassingTime3"
147                      rtPassingDate="rtPassingDate3" rtPassingTz="-2147483647" cancelled="false" hasMainMast="true"
148                      mainMastId="mainMastId3" mainMastExtId="mainMastExtId3"/>
149            </Stops>
150        </Leg>
151        <Leg idx="anySimpleType" name="name2" number="number2" category="category2" type="type2" cancelled="true"
152             partCancelled="true" reachable="true" direction="direction2" duration="-P10675199DT2H48M5.477S"
153             dist="-2147483647">
154            <Origin name="name2" type="ADR" id="id2" extId="extId2" lon="-79228162514264337593543950335"
155                    lat="-79228162514264337593543950335" routeIdx="-2147483647" prognosisType="MANUAL" time="time2"
156                    date="date2" tz="1" track="track2" rtTime="rtTime2" rtDate="rtDate2" rtTz="1" rtTrack="rtTrack2"
157                    hasMainMast="false" mainMastId="mainMastId2" mainMastExtId="mainMastExtId2">
158                <Notes>
159                    <Note key="key4" type="R" priority="0" routeIdxFrom="0" routeIdxTo="0">Note4</Note>
160                    <Note key="key5" type="H" priority="2" routeIdxFrom="2" routeIdxTo="2">Note5</Note>
161                    <Note key="key6" type="U" priority="-2147483646" routeIdxFrom="-2147483646"
162                          routeIdxTo="-2147483646">Note6
163                    </Note>
164                </Notes>
165            </Origin>
166            <Destination name="name2" type="ADR" id="id2" extId="extId2" lon="-79228162514264337593543950335"
167                         lat="-79228162514264337593543950335" routeIdx="-2147483647" prognosisType="MANUAL" time="time2"
168                         date="date2" tz="1" track="track2" rtTime="rtTime2" rtDate="rtDate2" rtTz="1"
169                         rtTrack="rtTrack2" hasMainMast="false" mainMastId="mainMastId2"
170                         mainMastExtId="mainMastExtId2"/>
171            <JourneyDetailRef ref="ref2"/>
172            <GeometryRef ref="anySimpleType"/>
173            <GisRef ref="ref2"/>
174            <GisRoute dist="-2147483647" durS="-P10675199DT2H48M5.477S" durR="-P10675199DT2H48M5.477S"
175                      durST="-P10675199DT2H48M5.477S" durW2C="-P10675199DT2H48M5.477S" durW2D="-P10675199DT2H48M5.477S"
176                      dirTxt="dirTxt2" dirGeo="-2147483647">
177                <seg name="name4" rType="T" rNum="rNum4" man="ON" manTx="manTx4" dirTx="dirTx4" ori="E" polyS="0"
178                     polyE="0" dist="0"/>
179                <seg name="name5" rType="T4L" rNum="rNum5" man="LE" manTx="manTx5" dirTx="dirTx5" ori="W" polyS="2"
180                     polyE="2" dist="2"/>
181                <seg name="name6" rType="T2L" rNum="rNum6" man="RI" manTx="manTx6" dirTx="dirTx6" ori="NE"
182                     polyS="-2147483646" polyE="-2147483646" dist="-2147483646"/>
183                <polyline name="name2" delta="false" dim="1" type="WGS84" crdEncYX="crdEncYX2" crdEncZ="crdEncZ2"
184                          crdEncS="crdEncS2">
185                    <crd>0</crd>
186                    <crd>2</crd>
187                    <crd>-2147483646</crd>
188                </polyline>
189                <altPolyline name="name4" delta="false" dim="2147483647" type="HAFASGEO" crdEncYX="crdEncYX4"
190                             crdEncZ="crdEncZ4" crdEncS="crdEncS4">
191                    <crd>-2147483645</crd>
192                    <crd>2147483645</crd>
193                    <crd>-2</crd>
194                </altPolyline>
195                <altPolyline name="name5" delta="true" dim="0" type="WGS84" crdEncYX="crdEncYX5" crdEncZ="crdEncZ5"
196                             crdEncS="crdEncS5">
197                    <crd>4</crd>
198                    <crd>-2147483644</crd>
199                    <crd>2147483644</crd>
200                </altPolyline>
201                <altPolyline name="name6" delta="false" dim="2" type="PLANAR" crdEncYX="crdEncYX6" crdEncZ="crdEncZ6"
202                             crdEncS="crdEncS6">
203                    <crd>-3</crd>
204                    <crd>5</crd>
205                    <crd>-2147483643</crd>
206                </altPolyline>
207            </GisRoute>
208            <JourneyStatus>R</JourneyStatus>
209            <Product name="name2" num="num2" line="line2" catOut="catOut2" catIn="catIn2" catCode="catCode2"
210                     catOutS="catOutS2" catOutL="catOutL2" operatorCode="operatorCode2" operator="operator2"
211                     admin="admin2"/>
212            <Polyline name="name2" delta="false" dim="1" type="WGS84" crdEncYX="crdEncYX2" crdEncZ="crdEncZ2"
213                      crdEncS="crdEncS2">
214                <crd>0</crd>
215                <crd>2</crd>
216                <crd>-2147483646</crd>
217            </Polyline>
218            <Stops>
219                <Stop name="name4" id="id4" extId="extId4" routeIdx="0" lon="0.9" lat="0.9" arrPrognosisType="CORRECTED"
220                      depPrognosisType="CORRECTED" depTime="depTime4" depDate="depDate4" depTz="2147483647"
221                      arrTime="arrTime4" arrDate="arrDate4" arrTz="2147483647" passingTime="passingTime4"
222                      passingDate="passingDate4" passingTz="2147483647" arrTrack="arrTrack4" depTrack="depTrack4"
223                      rtDepTime="rtDepTime4" rtDepDate="rtDepDate4" rtDepTz="2147483647" rtArrTime="rtArrTime4"
224                      rtArrDate="rtArrDate4" rtArrTz="2147483647" rtArrTrack="rtArrTrack4" rtDepTrack="rtDepTrack4"
225                      rtPassingTime="rtPassingTime4" rtPassingDate="rtPassingDate4" rtPassingTz="2147483647"
226                      cancelled="true" hasMainMast="false" mainMastId="mainMastId4" mainMastExtId="mainMastExtId4"/>
227                <Stop name="name5" id="id5" extId="extId5" routeIdx="2" lon="1.1" lat="1.1"
228                      arrPrognosisType="CALCULATED" depPrognosisType="CALCULATED" depTime="depTime5" depDate="depDate5"
229                      depTz="0" arrTime="arrTime5" arrDate="arrDate5" arrTz="0" passingTime="passingTime5"
230                      passingDate="passingDate5" passingTz="0" arrTrack="arrTrack5" depTrack="depTrack5"
231                      rtDepTime="rtDepTime5" rtDepDate="rtDepDate5" rtDepTz="0" rtArrTime="rtArrTime5"
232                      rtArrDate="rtArrDate5" rtArrTz="0" rtArrTrack="rtArrTrack5" rtDepTrack="rtDepTrack5"
233                      rtPassingTime="rtPassingTime5" rtPassingDate="rtPassingDate5" rtPassingTz="0" cancelled="false"
234                      hasMainMast="true" mainMastId="mainMastId5" mainMastExtId="mainMastExtId5"/>
235                <Stop name="name6" id="id6" extId="extId6" routeIdx="-2147483646" lon="-79228162514264337593543950335"
236                      lat="-79228162514264337593543950335" arrPrognosisType="PROGNOSED" depPrognosisType="PROGNOSED"
237                      depTime="depTime6" depDate="depDate6" depTz="2" arrTime="arrTime6" arrDate="arrDate6" arrTz="2"
238                      passingTime="passingTime6" passingDate="passingDate6" passingTz="2" arrTrack="arrTrack6"
239                      depTrack="depTrack6" rtDepTime="rtDepTime6" rtDepDate="rtDepDate6" rtDepTz="2"
240                      rtArrTime="rtArrTime6" rtArrDate="rtArrDate6" rtArrTz="2" rtArrTrack="rtArrTrack6"
241                      rtDepTrack="rtDepTrack6" rtPassingTime="rtPassingTime6" rtPassingDate="rtPassingDate6"
242                      rtPassingTz="2" cancelled="true" hasMainMast="false" mainMastId="mainMastId6"
243                      mainMastExtId="mainMastExtId6"/>
244            </Stops>
245        </Leg>
246        <Leg idx="anySimpleType" name="name3" number="number3" category="category3" type="type3" cancelled="false"
247             partCancelled="false" reachable="false" direction="direction3" duration="P10675199DT2H48M5.477S"
248             dist="2147483647">
249            <Origin name="name3" type="POI" id="id3" extId="extId3" lon="79228162514264337593543950335"
250                    lat="79228162514264337593543950335" routeIdx="2147483647" prognosisType="REPORTED" time="time3"
251                    date="date3" tz="-2147483647" track="track3" rtTime="rtTime3" rtDate="rtDate3" rtTz="-2147483647"
252                    rtTrack="rtTrack3" hasMainMast="true" mainMastId="mainMastId3" mainMastExtId="mainMastExtId3">
253                <Notes>
254                    <Note key="key7" type="A" priority="2147483646" routeIdxFrom="2147483646" routeIdxTo="2147483646">
255                        Note7
256                    </Note>
257                    <Note key="key8" type="I" priority="-1" routeIdxFrom="-1" routeIdxTo="-1">Note8</Note>
258                    <Note key="key9" type="R" priority="3" routeIdxFrom="3" routeIdxTo="3">Note9</Note>
259                </Notes>
260            </Origin>
261            <Destination name="name3" type="POI" id="id3" extId="extId3" lon="79228162514264337593543950335"
262                         lat="79228162514264337593543950335" routeIdx="2147483647" prognosisType="REPORTED" time="time3"
263                         date="date3" tz="-2147483647" track="track3" rtTime="rtTime3" rtDate="rtDate3"
264                         rtTz="-2147483647" rtTrack="rtTrack3" hasMainMast="true" mainMastId="mainMastId3"
265                         mainMastExtId="mainMastExtId3"/>
266            <JourneyDetailRef ref="ref3"/>
267            <GeometryRef ref="anySimpleType"/>
268            <GisRef ref="ref3"/>
269            <GisRoute dist="2147483647" durS="P10675199DT2H48M5.477S" durR="P10675199DT2H48M5.477S"
270                      durST="P10675199DT2H48M5.477S" durW2C="P10675199DT2H48M5.477S" durW2D="P10675199DT2H48M5.477S"
271                      dirTxt="dirTxt3" dirGeo="2147483647">
272                <seg name="name7" rType="TR" rNum="rNum7" man="KL" manTx="manTx7" dirTx="dirTx7" ori="SE"
273                     polyS="2147483646" polyE="2147483646" dist="2147483646"/>
274                <seg name="name8" rType="NT" rNum="rNum8" man="KR" manTx="manTx8" dirTx="dirTx8" ori="NW" polyS="-1"
275                     polyE="-1" dist="-1"/>
276                <seg name="name9" rType="CT" rNum="rNum9" man="HL" manTx="manTx9" dirTx="dirTx9" ori="SW" polyS="3"
277                     polyE="3" dist="3"/>
278                <polyline name="name3" delta="true" dim="-2147483647" type="PLANAR" crdEncYX="crdEncYX3"
279                          crdEncZ="crdEncZ3" crdEncS="crdEncS3">
280                    <crd>2147483646</crd>
281                    <crd>-1</crd>
282                    <crd>3</crd>
283                </polyline>
284                <altPolyline name="name7" delta="true" dim="-2147483646" type="HAFASGEO" crdEncYX="crdEncYX7"
285                             crdEncZ="crdEncZ7" crdEncS="crdEncS7">
286                    <crd>2147483643</crd>
287                    <crd>-4</crd>
288                    <crd>6</crd>
289                </altPolyline>
290                <altPolyline name="name8" delta="false" dim="2147483646" type="WGS84" crdEncYX="crdEncYX8"
291                             crdEncZ="crdEncZ8" crdEncS="crdEncS8">
292                    <crd>-2147483642</crd>
293                    <crd>2147483642</crd>
294                    <crd>-5</crd>
295                </altPolyline>
296                <altPolyline name="name9" delta="true" dim="-1" type="PLANAR" crdEncYX="crdEncYX9" crdEncZ="crdEncZ9"
297                             crdEncS="crdEncS9">
298                    <crd>7</crd>
299                    <crd>-2147483641</crd>
300                    <crd>2147483641</crd>
301                </altPolyline>
302            </GisRoute>
303            <JourneyStatus>A</JourneyStatus>
304            <Product name="name3" num="num3" line="line3" catOut="catOut3" catIn="catIn3" catCode="catCode3"
305                     catOutS="catOutS3" catOutL="catOutL3" operatorCode="operatorCode3" operator="operator3"
306                     admin="admin3"/>
307            <Polyline name="name3" delta="true" dim="-2147483647" type="PLANAR" crdEncYX="crdEncYX3" crdEncZ="crdEncZ3"
308                      crdEncS="crdEncS3">
309                <crd>2147483646</crd>
310                <crd>-1</crd>
311                <crd>3</crd>
312            </Polyline>
313            <Stops>
314                <Stop name="name7" id="id7" extId="extId7" routeIdx="2147483646" lon="79228162514264337593543950335"
315                      lat="79228162514264337593543950335" arrPrognosisType="MANUAL" depPrognosisType="MANUAL"
316                      depTime="depTime7" depDate="depDate7" depTz="-2147483646" arrTime="arrTime7" arrDate="arrDate7"
317                      arrTz="-2147483646" passingTime="passingTime7" passingDate="passingDate7" passingTz="-2147483646"
318                      arrTrack="arrTrack7" depTrack="depTrack7" rtDepTime="rtDepTime7" rtDepDate="rtDepDate7"
319                      rtDepTz="-2147483646" rtArrTime="rtArrTime7" rtArrDate="rtArrDate7" rtArrTz="-2147483646"
320                      rtArrTrack="rtArrTrack7" rtDepTrack="rtDepTrack7" rtPassingTime="rtPassingTime7"
321                      rtPassingDate="rtPassingDate7" rtPassingTz="-2147483646" cancelled="false" hasMainMast="true"
322                      mainMastId="mainMastId7" mainMastExtId="mainMastExtId7"/>
323                <Stop name="name8" id="id8" extId="extId8" routeIdx="-1" lon="0.8" lat="0.8" arrPrognosisType="REPORTED"
324                      depPrognosisType="REPORTED" depTime="depTime8" depDate="depDate8" depTz="2147483646"
325                      arrTime="arrTime8" arrDate="arrDate8" arrTz="2147483646" passingTime="passingTime8"
326                      passingDate="passingDate8" passingTz="2147483646" arrTrack="arrTrack8" depTrack="depTrack8"
327                      rtDepTime="rtDepTime8" rtDepDate="rtDepDate8" rtDepTz="2147483646" rtArrTime="rtArrTime8"
328                      rtArrDate="rtArrDate8" rtArrTz="2147483646" rtArrTrack="rtArrTrack8" rtDepTrack="rtDepTrack8"
329                      rtPassingTime="rtPassingTime8" rtPassingDate="rtPassingDate8" rtPassingTz="2147483646"
330                      cancelled="true" hasMainMast="false" mainMastId="mainMastId8" mainMastExtId="mainMastExtId8"/>
331                <Stop name="name9" id="id9" extId="extId9" routeIdx="3" lon="1.2" lat="1.2" arrPrognosisType="CORRECTED"
332                      depPrognosisType="CORRECTED" depTime="depTime9" depDate="depDate9" depTz="-1" arrTime="arrTime9"
333                      arrDate="arrDate9" arrTz="-1" passingTime="passingTime9" passingDate="passingDate9" passingTz="-1"
334                      arrTrack="arrTrack9" depTrack="depTrack9" rtDepTime="rtDepTime9" rtDepDate="rtDepDate9"
335                      rtDepTz="-1" rtArrTime="rtArrTime9" rtArrDate="rtArrDate9" rtArrTz="-1" rtArrTrack="rtArrTrack9"
336                      rtDepTrack="rtDepTrack9" rtPassingTime="rtPassingTime9" rtPassingDate="rtPassingDate9"
337                      rtPassingTz="-1" cancelled="false" hasMainMast="true" mainMastId="mainMastId9"
338                      mainMastExtId="mainMastExtId9"/>
339            </Stops>
340        </Leg>
341    </LegList>
342    <TariffResult>
343        <fareSetItem name="name1" desc="desc1">
344            <ticketParam name="name1" value="value1"/>
345            <ticketParam name="name2" value="value2"/>
346            <ticketParam name="name3" value="value3"/>
347            <fareItem name="name1" desc="desc1" price="0" cur="cur1" shpCtx="shpCtx1">
348                <ticket name="name1" desc="desc1" price="0" cur="cur1" shpCtx="shpCtx1">
349                    <ticketParam name="name1" value="value1"/>
350                    <ticketParam name="name2" value="value2"/>
351                    <ticketParam name="name3" value="value3"/>
352                </ticket>
353                <ticket name="name2" desc="desc2" price="1" cur="cur2" shpCtx="shpCtx2">
354                    <ticketParam name="name4" value="value4"/>
355                    <ticketParam name="name5" value="value5"/>
356                    <ticketParam name="name6" value="value6"/>
357                </ticket>
358                <ticket name="name3" desc="desc3" price="-2147483647" cur="cur3" shpCtx="shpCtx3">
359                    <ticketParam name="name7" value="value7"/>
360                    <ticketParam name="name8" value="value8"/>
361                    <ticketParam name="name9" value="value9"/>
362                </ticket>
363            </fareItem>
364            <fareItem name="name2" desc="desc2" price="1" cur="cur2" shpCtx="shpCtx2">
365                <ticket name="name4" desc="desc4" price="2147483647" cur="cur4" shpCtx="shpCtx4">
366                    <ticketParam name="name10" value="value10"/>
367                    <ticketParam name="name11" value="value11"/>
368                    <ticketParam name="name12" value="value12"/>
369                </ticket>
370                <ticket name="name5" desc="desc5" price="0" cur="cur5" shpCtx="shpCtx5">
371                    <ticketParam name="name13" value="value13"/>
372                    <ticketParam name="name14" value="value14"/>
373                    <ticketParam name="name15" value="value15"/>
374                </ticket>
375                <ticket name="name6" desc="desc6" price="2" cur="cur6" shpCtx="shpCtx6">
376                    <ticketParam name="name16" value="value16"/>
377                    <ticketParam name="name17" value="value17"/>
378                    <ticketParam name="name18" value="value18"/>
379                </ticket>
380            </fareItem>
381            <fareItem name="name3" desc="desc3" price="-2147483647" cur="cur3" shpCtx="shpCtx3">
382                <ticket name="name7" desc="desc7" price="-2147483646" cur="cur7" shpCtx="shpCtx7">
383                    <ticketParam name="name19" value="value19"/>
384                    <ticketParam name="name20" value="value20"/>
385                    <ticketParam name="name21" value="value21"/>
386                </ticket>
387                <ticket name="name8" desc="desc8" price="2147483646" cur="cur8" shpCtx="shpCtx8">
388                    <ticketParam name="name22" value="value22"/>
389                    <ticketParam name="name23" value="value23"/>
390                    <ticketParam name="name24" value="value24"/>
391                </ticket>
392                <ticket name="name9" desc="desc9" price="-1" cur="cur9" shpCtx="shpCtx9">
393                    <ticketParam name="name25" value="value25"/>
394                    <ticketParam name="name26" value="value26"/>
395                    <ticketParam name="name27" value="value27"/>
396                </ticket>
397            </fareItem>
398        </fareSetItem>
399        <fareSetItem name="name2" desc="desc2">
400            <ticketParam name="name4" value="value4"/>
401            <ticketParam name="name5" value="value5"/>
402            <ticketParam name="name6" value="value6"/>
403            <fareItem name="name4" desc="desc4" price="2147483647" cur="cur4" shpCtx="shpCtx4">
404                <ticket name="name10" desc="desc10" price="3" cur="cur10" shpCtx="shpCtx10">
405                    <ticketParam name="name28" value="value28"/>
406                    <ticketParam name="name29" value="value29"/>
407                    <ticketParam name="name30" value="value30"/>
408                </ticket>
409                <ticket name="name11" desc="desc11" price="-2147483645" cur="cur11" shpCtx="shpCtx11">
410                    <ticketParam name="name31" value="value31"/>
411                    <ticketParam name="name32" value="value32"/>
412                    <ticketParam name="name33" value="value33"/>
413                </ticket>
414                <ticket name="name12" desc="desc12" price="2147483645" cur="cur12" shpCtx="shpCtx12">
415                    <ticketParam name="name34" value="value34"/>
416                    <ticketParam name="name35" value="value35"/>
417                    <ticketParam name="name36" value="value36"/>
418                </ticket>
419            </fareItem>
420            <fareItem name="name5" desc="desc5" price="0" cur="cur5" shpCtx="shpCtx5">
421                <ticket name="name13" desc="desc13" price="-2" cur="cur13" shpCtx="shpCtx13">
422                    <ticketParam name="name37" value="value37"/>
423                    <ticketParam name="name38" value="value38"/>
424                    <ticketParam name="name39" value="value39"/>
425                </ticket>
426                <ticket name="name14" desc="desc14" price="4" cur="cur14" shpCtx="shpCtx14">
427                    <ticketParam name="name40" value="value40"/>
428                    <ticketParam name="name41" value="value41"/>
429                    <ticketParam name="name42" value="value42"/>
430                </ticket>
431                <ticket name="name15" desc="desc15" price="-2147483644" cur="cur15" shpCtx="shpCtx15">
432                    <ticketParam name="name43" value="value43"/>
433                    <ticketParam name="name44" value="value44"/>
434                    <ticketParam name="name45" value="value45"/>
435                </ticket>
436            </fareItem>
437            <fareItem name="name6" desc="desc6" price="2" cur="cur6" shpCtx="shpCtx6">
438                <ticket name="name16" desc="desc16" price="2147483644" cur="cur16" shpCtx="shpCtx16">
439                    <ticketParam name="name46" value="value46"/>
440                    <ticketParam name="name47" value="value47"/>
441                    <ticketParam name="name48" value="value48"/>
442                </ticket>
443                <ticket name="name17" desc="desc17" price="-3" cur="cur17" shpCtx="shpCtx17">
444                    <ticketParam name="name49" value="value49"/>
445                    <ticketParam name="name50" value="value50"/>
446                    <ticketParam name="name51" value="value51"/>
447                </ticket>
448                <ticket name="name18" desc="desc18" price="5" cur="cur18" shpCtx="shpCtx18">
449                    <ticketParam name="name52" value="value52"/>
450                    <ticketParam name="name53" value="value53"/>
451                    <ticketParam name="name54" value="value54"/>
452                </ticket>
453            </fareItem>
454        </fareSetItem>
455        <fareSetItem name="name3" desc="desc3">
456            <ticketParam name="name7" value="value7"/>
457            <ticketParam name="name8" value="value8"/>
458            <ticketParam name="name9" value="value9"/>
459            <fareItem name="name7" desc="desc7" price="-2147483646" cur="cur7" shpCtx="shpCtx7">
460                <ticket name="name19" desc="desc19" price="-2147483643" cur="cur19" shpCtx="shpCtx19">
461                    <ticketParam name="name55" value="value55"/>
462                    <ticketParam name="name56" value="value56"/>
463                    <ticketParam name="name57" value="value57"/>
464                </ticket>
465                <ticket name="name20" desc="desc20" price="2147483643" cur="cur20" shpCtx="shpCtx20">
466                    <ticketParam name="name58" value="value58"/>
467                    <ticketParam name="name59" value="value59"/>
468                    <ticketParam name="name60" value="value60"/>
469                </ticket>
470                <ticket name="name21" desc="desc21" price="-4" cur="cur21" shpCtx="shpCtx21">
471                    <ticketParam name="name61" value="value61"/>
472                    <ticketParam name="name62" value="value62"/>
473                    <ticketParam name="name63" value="value63"/>
474                </ticket>
475            </fareItem>
476            <fareItem name="name8" desc="desc8" price="2147483646" cur="cur8" shpCtx="shpCtx8">
477                <ticket name="name22" desc="desc22" price="6" cur="cur22" shpCtx="shpCtx22">
478                    <ticketParam name="name64" value="value64"/>
479                    <ticketParam name="name65" value="value65"/>
480                    <ticketParam name="name66" value="value66"/>
481                </ticket>
482                <ticket name="name23" desc="desc23" price="-2147483642" cur="cur23" shpCtx="shpCtx23">
483                    <ticketParam name="name67" value="value67"/>
484                    <ticketParam name="name68" value="value68"/>
485                    <ticketParam name="name69" value="value69"/>
486                </ticket>
487                <ticket name="name24" desc="desc24" price="2147483642" cur="cur24" shpCtx="shpCtx24">
488                    <ticketParam name="name70" value="value70"/>
489                    <ticketParam name="name71" value="value71"/>
490                    <ticketParam name="name72" value="value72"/>
491                </ticket>
492            </fareItem>
493            <fareItem name="name9" desc="desc9" price="-1" cur="cur9" shpCtx="shpCtx9">
494                <ticket name="name25" desc="desc25" price="-5" cur="cur25" shpCtx="shpCtx25">
495                    <ticketParam name="name73" value="value73"/>
496                    <ticketParam name="name74" value="value74"/>
497                    <ticketParam name="name75" value="value75"/>
498                </ticket>
499                <ticket name="name26" desc="desc26" price="7" cur="cur26" shpCtx="shpCtx26">
500                    <ticketParam name="name76" value="value76"/>
501                    <ticketParam name="name77" value="value77"/>
502                    <ticketParam name="name78" value="value78"/>
503                </ticket>
504                <ticket name="name27" desc="desc27" price="-2147483641" cur="cur27" shpCtx="shpCtx27">
505                    <ticketParam name="name79" value="value79"/>
506                    <ticketParam name="name80" value="value80"/>
507                    <ticketParam name="name81" value="value81"/>
508                </ticket>
509            </fareItem>
510        </fareSetItem>
511    </TariffResult>
512</Trip>

JourneyDetail

JourneyDetail is used to obtain detailed information about a journey/leg. This is based on first calling trip. (See 2.4) In the response from trip, you get a reference, for example,

1
2<JourneyDetailRef ref="1|3598|0|74|13062017">...</JourneyDetailRef>

This reference is used when calling JourneyDetail for the specific journey. The entire line stretch for the specified journey is returned. If you only want information about stops in the part of the journey that a search with trip provides, it is recommended to set passlist=1 in trip. This is an extension from api-version 2.

Parameters

NameDescriptionComment
idReference from Trip, see aboveIt may be necessary to escape the | character by its URL encoding %7C.
dateyyyy-MM-DDOptional
Provides the corresponding journey on another day, if possible
poly0 or 1Optional.
Indicates whether detailed routes should be calculated for the results. For a description of the polyline, see 2.4.5. Default 0.

Example:

1https://journeyplanner.integration.sl.se/v1/TravelplannerV3_1/journeydetail.&lt;FORMAT&gt;?key=&lt;DIN API NYCKEL&gt;&amp;id=1|3598|0|74|13062017

Real-time

If there is real-time information, it is indicated in separate extra fields. For real-time times in JourneyDetail, “rtArrTime,” “rtArrDate,” “rtDepTime,” and " rtDepDate" are added to the response. The old fields “arrTime,” “arrDate,” “depTime,” and “depDate” are retained to track changes.

Response Structure

In the table below, the XML structure is described. Some obvious attributes are not included to keep it concise, such as Lat and Lon for a clearer overview of less obvious elements.

Example explanation of the structure in the table:

  • element1/element2 => element2 is a sub-element to element1.
  • element1.attribut1 => attribut1 is an attribute of element1.
NameData TypeDescription
JourneyDetailElementRoot element.
JourneyDetail/NotesElementContains notes to be displayed for the journey.
JourneyDetail/StopsListList of stops for this journey.
Stops/StopElementStop contains the name of the stop, route index, latitude, longitude, departure date and time, arrival date and time.
Stop.idAttributeId for the specified location in the list of stops. Can be used for further travel from that point.
Stop.routeIdxAttributeUsed in conjunction with routeIdx in the Trip response in a search, to know which part of the list is relevant for the journey.
JourneyDetail/DirectionsListList of directions.
Directions/DirectionElementDirection information.
JourneyDetail/TypesListList of travel types.
JourneyDetail/NamesListList of elements.
Names/NameElementContains the name of the journey.
JourneyDetail/MessagesListContains a list of real-time messages to be displayed.
PolylineElementDetailed route if poly=1 is specified.

GisRoute

This service is used to obtain detailed information about the route. Since Trip does not return a polyline for walking and cycling, this is mainly used to draw the cycling and walking path on the map. In the response from trip, a leg is obtained:

 1
 2<Leg type="WALK" idx="1" dist="464" duration="PT6M" name="">
 3    <Origin id="A=1@O=Stockholm City@X=18059500@Y=59331143@U=74@L=400105313@" extId="400105313" name="Stockholm City"
 4            type="ST" lon="18.0595" lat="59.331143" hasMainMast="true"
 5            mainMastId="A=1@O=Centralen (Stockholm)@X=18057657@Y=59331134@U=74@L=300101002@" mainMastExtId="300101002"
 6            date="2019-02-12" time="08:45:00"/>
 7    <Destination id="A=2@O=Stockholm, Drottninggatan 22@l=@X=18065001@Y=59330415@u=0@"
 8                 name="Stockholm, Drottninggatan 22" type="ADR" lon="18.065001" lat="59.330415" date="2019-02-12"
 9                 time="08:51:00"/>
10    <GisRef ref="G|1|G@F|A=1@O=Stockholm City@X=18059500@Y=59331143@U=74@L=400105313@|A=2@O=Stockholm, Drottninggatan 22@l=@X=18065001@Y=59330415@u=0@|12022019|84500|85100|ft|ft@0@1000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§bt@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§tt@0@5000@120@-1@100@1@2500@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$§|"/>
11</Leg>

The value in the “ref” in the GisRef object is used as input for gisroute.

Parameters

NameDescriptionDescription
ctxThe value in ctxRecon obtained in the response from trip.
langsv = Swedish
en = English
poly0 or 1Optional. Specifies whether detailed routes should be calculated for the results. Default 0.

Example:

1http://https://journeyplanner.integration.sl.se/v1/TravelplannerV3_1/gisroute.&lt;FORMAT&gt;?key=&lt;YOUR API KEY&gt;&amp;ctx=G|1|G@F|A=1@O=Stockholm%20City@X=18059500@Y=59331143@U=74@L=400105313@|A=2@O=Stockholm,%20Drottninggatan%2022@l=@X=18065001@Y=59330415@u=0@|12022019|84500|85100|ft|ft@0@1000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$%C2%A7bt@0@2000@120@-1@100@1@1000@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$%C2%A7tt@0@5000@120@-1@100@1@2500@0@@@@@false@0@-1@$f@$f@$f@$f@$f@$%C2%A7%7C&amp;lang=sv&amp;poly=1

Response Structure

The response from gisroute is the same as for the result from trip, with the difference that there is only one journey in the result. It also includes an object to describe the route, GisRoute:

 1
 2<GisRoute dist="189" durS="PT2M">
 3    <seg dist="22" man="ST" manTx="Fortsätt på Renstiernas gata" name="Renstiernas gata" ori="N" polyE="10" polyS="7"
 4         rType="CT"/>
 5    <seg man="TO" manTx="Ankomst på Renstiernas gata"/>
 6    <polyline type="WGS84" dim="3" crdEncS="NNNNNHMNNNN" crdEncZ="???????????" delta="true">
 7        <crd>18.080803</crd>
 8        <crd>59.315164</crd>
 9        <crd>0.0</crd>
10        <crd>3.45E-4</crd>
11        <crd>4.1E-5</crd>
12        <crd>0.0</crd>
13        <crd>-2.7E-5</crd>
14        <crd>6.1E-5</crd>
15        <crd>0.0</crd>
16        <crd>9.0E-5</crd>
17        <crd>1.1E-5</crd>
18        <crd>0.0</crd>
19        <crd>2.5E-5</crd>
20        <crd>2.7E-5</crd>
21        <crd>0.0</crd>
22        <crd>9.9E-5</crd>
23        <crd>4.0E-6</crd>
24        <crd>0.0</crd>
25        <crd>1.7E-4</crd>
26        <crd>1.5E-5</crd>
27        <crd>0.0</crd>
28        <crd>0.001985</crd>
29        <crd>2.48E-4</crd>
30        <crd>0.0</crd>
31        <crd>8.8E-5</crd>
32        <crd>1.1E-5</crd>
33        <crd>0.0</crd>
34        <crd>4.0E-5</crd>
35        <crd>3.5E-5</crd>
36        <crd>0.0</crd>
37        <crd>-4.9E-5</crd>
38        <crd>1.05E-4</crd>
39        <crd>0.0</crd>
40    </polyline>
41</GisRoute>

The segments describe parts of the journey, and the polyline describes coordinates in the same way documented in the Trip.

Reconstruction

To reconstruct a journey retrieved via the trip service, the reconstruction service can be used (for example, for sharing functions or similar).

In the response from trip, you get:

1
2<Trip idx="0" ctxRecon="T$A=1@O=T-Centralen@L=400101052@a=128@$A=1@O=Slussen@L=400101012@a=128@$201706140859$201706140902$ $" checksum="774B67E9_4" tripId="C-0"
3      duration="PT3M">...
4</Trip>

The value in ctxRecon is used as input for reconstruction

Parameters

NameDescriptionDescription
ctxThe value in ctxRecon obtained in the response from trip.
poly0 or 1Optional. Specifies whether detailed routes should be calculated for the results.
dateDate< (YYYY-MM-DD)Optional. Tries to reconstruct a journey on the specified date, if possible.

Example:

1https://journeyplanner.integration.sl.se/v1/TravelplannerV3_1/reconstruction.<FORMAT>?key=<DIN API NYCKEL>&amp;ctx=T%24A%3D1%40O%3DT-Centralen%40L%3D400101052%40a%3D128%40%24A%3D1%40O%3DSlussen%40L%3D400101012%40a%3D128%40%24201706140859%24201706140902%24%20%24

Response Structure

The response from reconstruction is the same as the result from trip, with the difference that there is only one journey in the result.

XSD

Returns an XSD containing definitions for all the components of the response structures for the services in SL Reseplanerare 3.

Parameters

No specific parameters are used for this service.

Example:

1https://journeyplanner.integration.sl.se/v1/TravelplannerV3_1/xsd.xml?key=<DIN API NYCKEL>.xsd

TTI – Time Table Info

The Time Table Info service shows for which time period timetable data is available in the journey planner. The information can, for example, be used to highlight a searchable time period in a calendar.

Parameters

No specific parameters are used for this service.

Example:

1https://journeyplanner.integration.sl.se/v1/TravelplannerV3_1/tti?key=<DIN API NYCKEL>

Response Structure

The response contains information about the valid search period, in the example below, the date interval is from 2016-12-11 to 2018-12-08.

1
2<TimetableInfoList serverVersion="1.7.6" dialectVersion="1.23" requestId="1507536412387"
3                   begin="2016-12-11" end="2018-12-08">
4    <TimetableInfo ident="7mtpu" date="2017-10-05" time="10:50:08"/>
5    <TimetableInfo ident="65wha" date="2017-09-26" time="07:30:36"/>
6    <TimetableInfo ident="6jpdq" date="2017-09-14" time="07:50:04"/>
7    <TimetableInfo ident="2x6uq" date="2017-07-06" time="09:19:28"/>
8</TimetableInfoList>

Error Messages

Status CodeMessage
1001Problem with the request: Key is not present in the requests
1002Problem with the request: Key is invalid
1003Invalid API.
1004Problem with the request: This API is currently not available for keys with priority above 2
1005Key exists but not for this API
Problem with the request: Invalid API for key
1006Too many requests per minute for the used profile.
1007Too many requests per month for the used profile.

Differences compared to TravelPlannerV3

The XSD has been updated, but apart from the changes listed below, the existing functions are not affected.

Changes:

  • The format of coordinates in the polyline in the Trip request has been modified. They are now described using double values, and difference values are indicated with exponents.