...
For detailed information on how Samtrafiken NeTEx files ar structured see Samtrafiken NeTEx export and NeTEx format adjustments - Samtrafiken sales export.
...
start
The stop and time for the start of the the trip.
...
See Codelist: Stops for more info and examples.
NeTEx - File: _stops.xml StopPlace.KeyValue.rikshallplatsNummer
...
NeTEx - ServiceJourney.KeyValue.productCode
vehicleNumbers
The vehicleNumber should be the published train number when possible. For buses without unique id:s use the line number. If the bus needs a unique published id, then use that value. In Samtrafiken’s NeTEx dataset, the value is (almost) always found in the ServiceJourney.PublicCode element.
Trains: NeTEx - TrainNumber.ForAdvertisment
Buses /trains without unique id:sand other traffic: NeTEx - LineServiceJourney.PublicCode
carriers
In the Samtrafiken ACCESS API, the carrier IDs are used according to the codelist urn:x_swe:carrier:nnn, where nnn is the carrier ID.
NeTEx - Line.KeyValue.salesAuthorityNumber
publishedServiceName
Bör vi kräva att även det här fältet fylls i? Är väl oftast samma som vehicleNumbers
lineNumbers
Sammas om ovan. Men bör kanske anges vid RKM-trafik mm där linjebegreppet är centralt.
attributes
...
Info |
---|
There is an exception for this, and that is for trains that change their train numbers during their journey. In those cases it must be taken into consideration that the train number will be different depending on the departure stop of the TripSpecification. |
carriers
In the Samtrafiken ACCESS API, the carrier IDs are used according to the codelist urn:x_swe:carrier:nnn, where nnn is the carrier ID.
NeTEx - Line.KeyValue.salesAuthorityNumber
publishedServiceName
Optional and not used today to identify trips. If the field is filled in, it must contain the same value as vehicleNumbers.
lineNumbers
Optional and not used today to identify trips. If the field is filled in, it must contain the same value as vehicleNumbers.
attributes
When the tickets are created by NDS attributes must be sent in the request to be shown on the tickets.
...
Example SJ X2000 train Stockholm - Göteborg
Code Block | ||
---|---|---|
| ||
Code Block | ||
| ||
{ "objectType": "OfferCollectionRequest", "tripSpecifications": [ { "externalRef": "05ba799b-2f92-4c23-9336-a625795006ad|0|48ee70c7-99db-4c12-bfe6-422a30afc069", "legs": [ { "externalRef": "leg1", "timedLeg": { "start": { "stopPlaceRef": { "stopPlaceRef": "urn:x_swe:stn:740000001", "objectType": "stopPlaceRef" }, "serviceDeparture": { "timetabledTime": "2023-09-15T06:27:00+02:00" } }, "end": { "stopPlaceRef": { "stopPlaceRef": "urn:x_swe:stn:740000002", "objectType": "stopPlaceRef" }, "serviceArrival": { "timetabledTime": "2023-09-15T09:35:00+02:00" } }, "service": { "vehicleNumbers": [ "421" ], "mode": { "ptMode": "HIGH_SPEED_TRAIN" }, "productCategory": { "name": "Snabbtåg", "shortName": "Snabbtåg", "productCategoryRef": "urn:x_swe:sbc:ST" }, "carriers": [ { "ref": "urn:x_swe:carrier:74", "name": "SJ" } ] } } } ], "isPartOfInternationalTrip": false } ], "offerSearchCriteria": { "offerMode": "INDIVIDUAL", "currency": "SEK" }, "anonymousPassengerSpecifications": [ { "externalRef": "Adult", "type": "PERSON" } ], "objectTypecorporateCodes": "OfferCollectionRequest",[], "promotionCodes": [] } |
Example SL subway
Code Block |
---|
{ "tripSpecifications": [ { "externalRef": "05ba799b-2f92-4c23-9336-a625795006ad|0|48ee70c7-99db-4c12-bfe6-422a30afc069", "legs": [ { "externalRef": "leg18dff6e54-4444-4749-8a74-789281057f12|0|0", "timedLeg": { "start": { "stopPlaceRef": { "stopPlaceRef": "urn:x_swe:stn:740000001740020757", "objectType": "stopPlaceRef" }, "serviceDeparture": { "timetabledTime": "2023-0910-15T0603T12:2738:00+02:00" } }, "end": { "stopPlaceRef": { "stopPlaceRef": "urn:x_swe:stn:740000002740021650", "objectType": "stopPlaceRef" }, "serviceArrival": { "timetabledTime": "2023-0910-15T0903T13:35:00+02:00" } }, "service": { "vehicleNumbers": [ "vehicleNumbers13": [], "421mode": { ], "modeptMode": {"UNDERGROUND", "ptModename": "HIGH_SPEED_TRAINUnderground" }, "productCategory": { "name": "SnabbtågCounty traffic", "shortName": "SnabbtågLT", "productCategoryRef": "urn:x_swe:sbc:STLT" }, "carriers": [ { "ref": "urn:x_swe:carrier:74275", "name": "SJSL" } ] } } } ], "isPartOfInternationalTrip": false } ], "offerSearchCriteria": { "offerMode": "INDIVIDUAL", "currency": "SEK" }, "anonymousPassengerSpecifications": [ { "externalRef": "Adult""443a49be-3ff3-47a3-8efb-1def96c2be29", "type": "PERSON" } ], "corporateCodes": [], "promotionCodes": [] } |
Example SL
...
bus line 212
Code Block |
---|
{ "tripSpecifications": [ { "externalRef": "05ba799b-2f92-4c23-9336-a625795006ad|0|48ee70c7-99db-4c12-bfe6-422a30afc069", "legs": [ { "externalRef": "8dff6e54-4444-4749-8a74-789281057f12|0|0leg1", "timedLeg": { "start": { "stopPlaceRef": { "stopPlaceRef": "urn:x_swe:stn:740020757740024784", "objectType": "stopPlaceRef" }, "serviceDeparture": { "timetabledTime": "2023-1011-03T1210T14:3821:00+0201:00" } }, "end": { "stopPlaceRef": { "stopPlaceRef": "urn:x_swe:stn:740021650740020757", "objectType": "stopPlaceRef" }, "serviceArrival": { "timetabledTime": "2023-1011-03T1310T14:3538:00+0201:00" } }, "service": { "vehicleNumbers": [ "13212" ], "mode": { "ptMode": "UNDERGROUNDBUS", "name": "UndergroundBus" }, "productCategory": { "name": "County traffic", "shortName": "LT", "productCategoryRef": "urn:x_swe:sbc:LT" }, "carriers": [ { "ref": "urn:x_swe:carrier:275", "name": "SL" } ] } } } ], "isPartOfInternationalTrip": false } ], "offerSearchCriteria": { "offerMode": "INDIVIDUAL", "currency": "SEK" }, "anonymousPassengerSpecifications": [ { "externalRef": "443a49be-3ff3-47a3-8efb-1def96c2be29Adult", "type": "PERSON" } ], "corporateCodes": [], "promotionCodes": [] } |