{"openapi":"3.0.1","info":{"title":"rata.digitraffic.fi","version":"1.0","description":"[OpenAPI document](/swagger/openapi.json)\n\nDigitraffic is a service operated by [Fintraffic](https://www.fintraffic.fi), offering real time traffic information. Currently the service covers *road, marine and rail* traffic. More information can be found at the [Digitraffic website](https://www.digitraffic.fi/)\n\nThe service has a public Google-group [rail.digitraffic.fi](https://groups.google.com/forum/#!forum/rata_digitraffic_fi) for communication between developers, service administrators and Fintraffic. The discussion in the forum is mostly in Finnish, but you're welcome to communicate in English too.\n\n### General notes of the API\n* Many Digitraffic APIs use the GeoJSON format. The definition of GeoJSON can be found at [https://tools.ietf.org/html/rfc7946](https://tools.ietf.org/html/rfc7946).\n* For dates and times, the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format is used with \"Zulu\" zero offset from UTC unless otherwise specified (i.e., \"yyyy-mm-ddThh:mm:ss[.mmm]Z\"). E.g. 2019-11-01T06:30:00Z.","termsOfService":"https://www.digitraffic.fi/en/terms-of-service/","contact":{"name":"Digitraffic / Fintraffic","url":"https://www.digitraffic.fi/"},"license":{"name":"Creative Commons 4.0 BY","url":"https://creativecommons.org/licenses/by/4.0/"}},"servers":[{"url":"https://rata.digitraffic.fi"}],"paths":{"/api/v1/passenger-information/active":{"get":{"tags":["passenger-information"],"summary":"Get currently active passenger information messages","parameters":[{"name":"station","in":"query","description":"Station identifier, for example _HKI_","schema":{"type":"string"}},{"name":"train_departure_date","in":"query","description":"Train departure date in format YYYY-MM-DD","schema":{"type":"string"}},{"name":"train_number","in":"query","description":"Train number","schema":{"type":"string"}},{"name":"only_general","in":"query","description":"If _true_, return only general notices (notices not related to a train number). _false_ by default","schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassengerInformationMessages"}}}},"400":{"description":"400 response","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponseModel"}}}}}}},"/api/v1/passenger-information/updated-after/{date}":{"get":{"tags":["passenger-information"],"summary":"Get messages updated after date","parameters":[{"name":"date","in":"path","description":"Date or date-time on or after which message was created or updated. For example _2023-01-01_ or _2023-01-01T12:00Z_","required":true,"schema":{"type":"string"}},{"name":"station","in":"query","description":"Station identifier, for example _HKI_","schema":{"type":"string"}},{"name":"train_departure_date","in":"query","description":"Train departure date in format YYYY-MM-DD","schema":{"type":"string"}},{"name":"train_number","in":"query","description":"Train number","schema":{"type":"string"}},{"name":"only_active","in":"query","description":"If _true_, return only currently active messages. _false_ returns all messages updated after _{date}_ regardless of validity dates. _true_ by default","schema":{"type":"string"}},{"name":"only_general","in":"query","description":"If _true_, return only general notices (notices not related to a train number). _false_ by default","schema":{"type":"string"}}],"responses":{"200":{"description":"200 response","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PassengerInformationMessages"}}}},"400":{"description":"400 response","headers":{"Access-Control-Allow-Origin":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponseModel"}}}}}}},"/api/v1/trains":{"get":{"tags":["trains"],"summary":"Returns trains that are newer than {version}","operationId":"getTrainsByVersion","parameters":[{"name":"version","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Train"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/{departure_date}":{"get":{"tags":["trains"],"summary":"Returns trains run on {departure_date}","operationId":"getTrainsByDepartureDate","parameters":[{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Train"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/{departure_date}/{train_number}":{"get":{"tags":["trains"],"summary":"Returns a specific train","operationId":"getTrainByTrainNumberAndDepartureDate","parameters":[{"name":"train_number","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}},{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Train"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/latest/{train_number}":{"get":{"tags":["trains"],"summary":"Returns latest train","operationId":"getTrainByTrainNumber","parameters":[{"name":"train_number","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Train"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/history/{departure_date}/{train_number}":{"get":{"tags":["trains"],"summary":"Returns all train versions for given train.  History is available for 14 days.","operationId":"getTrainHistory","parameters":[{"name":"departure_date","in":"path","description":"Departure date","required":true,"schema":{"type":"string","format":"date"}},{"name":"train_number","in":"path","description":"Train number","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/History"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/gtfs-rt-updates":{"get":{"tags":["gtfs"],"summary":"Returns GTFS Realtime updates","operationId":"getGtfsRtUpdates","responses":{"200":{"description":"OK","content":{"application/protobuf":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/gtfs-rt-locations":{"get":{"tags":["gtfs"],"summary":"Returns GTFS Realtime locations","operationId":"getGtfsRtLocations","responses":{"200":{"description":"OK","content":{"application/protobuf":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/gtfs-passenger.zip":{"get":{"tags":["gtfs"],"summary":"Returns GTFS zip file","operationId":"getGtfsForPassengerTrains","parameters":[{"name":"on_date","in":"query","description":"Return the package generated on this date instead of the current one. Packages are kept for 14 days.","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/zip":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trains/gtfs-all.zip":{"get":{"tags":["gtfs"],"summary":"Returns GTFS zip file","operationId":"getGtfsForAllTrains","parameters":[{"name":"on_date","in":"query","description":"Return the package generated on this date instead of the current one. Packages are kept for 14 days.","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"application/zip":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-tracking":{"get":{"tags":["train-tracking"],"summary":"Returns train running messages newer than {version}","operationId":"getTrainTrackingByVersion","parameters":[{"name":"version","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainRunningMessage"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-tracking/{departure_date}/{train_number}":{"get":{"tags":["train-tracking"],"summary":"Returns train running messages for single train","operationId":"getTrainTrackingByTrainNumberAndDepartureDate","parameters":[{"name":"train_number","in":"path","required":true,"schema":{"type":"string"}},{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainRunningMessage"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-tracking/station/{station}/{departure_date}":{"get":{"tags":["train-tracking"],"summary":"Returns train running messages for trains that have passed {station} on {departure_date}","operationId":"getTrainTrackingByStationAndDepartureDate","parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"}},{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainRunningMessage"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-tracking/station/{station}/{departure_date}/{track_section}":{"get":{"tags":["train-tracking"],"summary":"Returns train running messages for trains that have passed {station}, {track_section} on {departure_date}","operationId":"getTrainTrackingByStationAndTrackSectionAndDate","parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"}},{"name":"track_section","in":"path","required":true,"schema":{"type":"string"}},{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainRunningMessage"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-tracking/station/{station}/latest/{track_section}":{"get":{"tags":["train-tracking"],"summary":"Returns train running messages for trains that have passed {station}, {track_section}","operationId":"getTrainTrackingByStationAndTrackSectionAndLimit","parameters":[{"name":"station","in":"path","required":true,"schema":{"type":"string"}},{"name":"track_section","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainRunningMessage"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-tracking/latest/{train_number}":{"get":{"tags":["train-tracking"],"summary":"Returns latest train running messages for single train","operationId":"getTrainTrackingByTrainNumber","parameters":[{"name":"train_number","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","format":"int64","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainRunningMessage"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-locations/{departure_date}/{train_number}":{"get":{"tags":["train-locations"],"summary":"Returns wsg84 coordinates for a train run on departure date","operationId":"getTrainLocationByTrainNumberAndDepartureDate","parameters":[{"name":"train_number","in":"path","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}},{"name":"bbox","in":"query","required":false,"schema":{"type":"array","items":{"type":"number","format":"double"}},"example":"1,1,70,70"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainLocation"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-locations/latest":{"get":{"tags":["train-locations"],"summary":"Returns latest wsg84 coordinates for trains","operationId":"getTrainLocations","parameters":[{"name":"bbox","in":"query","required":false,"schema":{"type":"array","items":{"type":"number","format":"double"}},"example":"1,1,70,70"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainLocation"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-locations/latest/{train_number}":{"get":{"tags":["train-locations"],"summary":"Returns latest wsg84 coordinates for a train","operationId":"getTrainLocationByTrainNumber","parameters":[{"name":"train_number","in":"path","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"bbox","in":"query","required":false,"schema":{"type":"array","items":{"type":"number","format":"double"}},"example":"1,1,70,70"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainLocation"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-locations.geojson/{departure_date}/{train_number}":{"get":{"tags":["train-locations"],"summary":"Returns wsg84 coordinates for a train run on departure date in geojson format","operationId":"getTrainLocationByTrainNumberAndDepartureDateAsGeoJson","parameters":[{"name":"train_number","in":"path","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"departure_date","in":"path","description":"departure_date","required":true,"schema":{"type":"string","format":"date"}},{"name":"bbox","in":"query","description":"bbox","required":false,"schema":{"type":"array","items":{"type":"number","format":"double"}},"example":"1,1,70,70"}],"responses":{"200":{"description":"OK","content":{"application/vnd.geo+json":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-locations.geojson/latest":{"get":{"tags":["train-locations"],"summary":"Returns latest wsg84 coordinates for trains in geojson format","operationId":"getTrainLocationsAsGeoJson","parameters":[{"name":"bbox","in":"query","description":"bbox","required":false,"schema":{"type":"array","items":{"type":"number","format":"double"}},"example":"1,1,70,70"}],"responses":{"200":{"description":"OK","content":{"application/vnd.geo+json":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/train-locations.geojson/latest/{train_number}":{"get":{"tags":["train-locations"],"summary":"Returns latest wsg84 coordinates for a train in geojson format","operationId":"getTrainLocationByTrainNumberAsGeoJson","parameters":[{"name":"train_number","in":"path","description":"train_number","required":true,"schema":{"type":"integer","format":"int64"},"example":1},{"name":"bbox","in":"query","description":"bbox","required":false,"schema":{"type":"array","items":{"type":"number","format":"double"}},"example":"1,1,70,70"}],"responses":{"200":{"description":"OK","content":{"application/vnd.geo+json":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trafficrestriction-notifications/{id}":{"get":{"tags":["traffic-restriction-notifications"],"summary":"Returns all versions of a trafficrestriction notification or an empty list if the notification does not exist","operationId":"getTrafficRestrictionNotificationsById","parameters":[{"name":"id","in":"path","description":"Traffic restriction notification identifier","required":true,"schema":{"type":"string"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TrafficRestrictionNotificationWithVersions"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trafficrestriction-notifications/{id}/{version}":{"get":{"tags":["traffic-restriction-notifications"],"summary":"Returns a specific version of a trafficrestriction notification or an empty list if the notification does not exist","operationId":"getTrafficRestrictionNotificationsByVersion","parameters":[{"name":"id","in":"path","description":"Traffic restriction notification identifier","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","description":"Traffic restriction notification version","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpatialTrafficRestrictionNotification"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trafficrestriction-notifications/{id}/latest.json":{"get":{"tags":["traffic-restriction-notifications"],"summary":"Returns the latest version of a trafficrestriction notification in JSON format or an empty list if the notification does not exist","operationId":"getLatestTrafficRestrictionNotificationById","parameters":[{"name":"id","in":"path","description":"Traffic restriction notification identifier","required":true,"schema":{"type":"string"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpatialTrafficRestrictionNotification"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trafficrestriction-notifications/{id}/latest.geojson":{"get":{"tags":["traffic-restriction-notifications"],"summary":"Returns the latest version of a trafficrestriction notification in GeoJSON format or an empty FeatureCollection if the notification does not exist","operationId":"getLatestTrafficRestrictionNotificationByIdGeoJson","parameters":[{"name":"id","in":"path","description":"Traffic restriction notification identifier","required":true,"schema":{"type":"string"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trafficrestriction-notifications/status":{"get":{"tags":["traffic-restriction-notifications"],"summary":"Returns ids and latest versions of all trafficrestriction notifications, limited to 500 results","operationId":"getAllTrafficRestrictionNotifications","parameters":[{"name":"start","in":"query","description":"Start time. If missing, current date - 7 days is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-01-01T00:00:00.000Z"},{"name":"end","in":"query","description":"End time. If missing, current date is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-02-02T10:10:10.000Z"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RumaNotificationIdAndVersion"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trafficrestriction-notifications.json":{"get":{"tags":["traffic-restriction-notifications"],"summary":"Returns newest versions of trafficrestriction notifications by state in JSON format, limited to 500 results","operationId":"getTrafficRestrictionNotificationsByStateJson","parameters":[{"name":"state","in":"query","description":"State of traffic restriction notification","required":false,"schema":{"type":"array","items":{"type":"string","enum":["FINISHED","SENT","DRAFT","REMOVED"]}}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false},{"name":"start","in":"query","description":"Start time. If missing, current date - 7 days.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-01-01T00:00:00.000Z"},{"name":"end","in":"query","description":"End time. If missing, current date is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-02-02T10:10:10.000Z"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpatialTrafficRestrictionNotification"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trafficrestriction-notifications.geojson":{"get":{"tags":["traffic-restriction-notifications"],"summary":"Returns newest versions of trafficrestriction notifications by state in GeoJSON format, limited to 500 results","operationId":"getTrafficRestrictionNotificationsByStateGeoJson","parameters":[{"name":"state","in":"query","description":"State of traffic restriction notification","required":false,"schema":{"type":"array","items":{"type":"string","enum":["FINISHED","SENT","DRAFT","REMOVED"]}}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false},{"name":"start","in":"query","description":"Start time. If missing, current date - 7 days is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-01-01T00:00:00.000Z"},{"name":"end","in":"query","description":"End time. If missing, current date is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-02-02T10:10:10.000Z"}],"responses":{"200":{"description":"OK","content":{"application/vnd.geo+json":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trackwork-notifications/{id}":{"get":{"tags":["track-work-notifications"],"summary":"Returns all versions of a trackwork notification or an empty list if the notification does not exist","operationId":"getTrackWorkNotificationsById","parameters":[{"name":"id","in":"path","description":"Track work notification identifier","required":true,"schema":{"type":"string"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","default":false},"example":false}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TrackWorkNotificationWithVersions"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trackwork-notifications/{id}/{version}":{"get":{"tags":["track-work-notifications"],"summary":"Returns a specific version of a trackwork notification or an empty list if the notification does not exist","operationId":"getTrackWorkNotificationsByIdAndVersion","parameters":[{"name":"id","in":"path","description":"Track work notification identifier","required":true,"schema":{"type":"string"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","default":false},"example":false},{"name":"version","in":"path","description":"Track work notification version","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpatialTrackWorkNotification"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trackwork-notifications/{id}/latest.json":{"get":{"tags":["track-work-notifications"],"summary":"Returns the latest version of a trackwork notification in JSON format or an empty list if the notification does not exist","operationId":"getLatestTrackWorkNotificationById","parameters":[{"name":"id","in":"path","description":"Track work notification identifier","required":true,"schema":{"type":"string"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","default":false},"example":false}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpatialTrackWorkNotification"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trackwork-notifications/{id}/latest.geojson":{"get":{"tags":["track-work-notifications"],"summary":"Returns the latest version of a trackwork notification in GeoJSON format or an empty FeatureCollection if the notification does not exist","operationId":"getLatestTrackWorkNotificationByIdGeoJson","parameters":[{"name":"id","in":"path","description":"Track work notification identifier","required":true,"schema":{"type":"string"}},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","default":false},"example":false}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trackwork-notifications/status":{"get":{"tags":["track-work-notifications"],"summary":"Returns ids and latest versions of all trackwork notifications, limited to 500 results","operationId":"getAllTrackWorkNotifications","parameters":[{"name":"start","in":"query","description":"Start time. If missing, current date - 7 days is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-01-01T00:00:00.000Z"},{"name":"end","in":"query","description":"End time. If missing, current date is used","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-02-02T10:10:10.000Z"}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RumaNotificationIdAndVersion"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trackwork-notifications.json":{"get":{"tags":["track-work-notifications"],"summary":"Returns newest versions of trackwork notifications by state in JSON format, limited to 500 results","operationId":"getTrackWorkNotificationsByStateJson","parameters":[{"name":"state","in":"query","description":"State of track work notification","required":false,"schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","PASSIVE","FINISHED","SENT","DRAFT","REMOVED","REJECTED"]}},"example":"SENT,ACTIVE,PASSIVE"},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false},{"name":"start","in":"query","description":"Start time. If missing, current date - 7 days is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-01-01T00:00:00.000Z"},{"name":"end","in":"query","description":"End time. If missing, current date is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-02-02T10:10:10.000Z"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SpatialTrackWorkNotification"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/trackwork-notifications.geojson":{"get":{"tags":["track-work-notifications"],"summary":"Returns newest versions of trackwork notifications by state in GeoJSON format, limited to 500 results","operationId":"getTrackWorkNotificationsByStateGeoJson","parameters":[{"name":"state","in":"query","description":"State of track work notification","required":false,"schema":{"type":"array","items":{"type":"string","enum":["ACTIVE","PASSIVE","FINISHED","SENT","DRAFT","REMOVED","REJECTED"]}},"example":"SENT,ACTIVE,PASSIVE"},{"name":"schema","in":"query","description":"Show map or schema locations","required":false,"schema":{"type":"boolean","example":false,"default":false},"example":false},{"name":"start","in":"query","description":"Start time. If missing, current date - 7 days is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-01-01T00:00:00.000Z"},{"name":"end","in":"query","description":"End time. If missing, current date is used.","required":false,"schema":{"type":"string","format":"date-time"},"example":"2019-02-02T10:10:10.000Z"}],"responses":{"200":{"description":"OK","content":{"application/vnd.geo+json":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/siri/vm":{"get":{"tags":["siri"],"summary":"Returns SIRI Nordic Vehicle Monitoring (VM) real-time XML","description":"Stop references use identifiers from Fintraffic's national stop registry (PETI).\n\nFor example, `FSR:Quay:415` in `StopPointRef` identifies the corresponding PETI `Quay`.\n\n[Browse rail stops and their quays in PETI](https://peti.fintraffic.fi/api/fintraffic/v1/stops?transportModes=rail).\n","operationId":"getSiriVm","responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/siri/sx":{"get":{"tags":["siri"],"summary":"Returns SIRI Nordic Situation Exchange (SX) XML","description":"Passenger information messages shown on train and station displays and spoken in announcements.\n\nStation messages point to stops with `StopPlaceRef`, and train messages to a train with\n`FramedVehicleJourneyRef`. Stop place identifiers are from Fintraffic's national stop registry (PETI).\n\n[Browse rail stops in PETI](https://peti.fintraffic.fi/api/fintraffic/v1/stops?transportModes=rail).\n","operationId":"getSiriSx","responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/siri/et":{"get":{"tags":["siri"],"summary":"Returns SIRI Nordic Estimated Timetable (ET) real-time XML","description":"Stop references use identifiers from Fintraffic's national stop registry (PETI).\n\nFor example, `FSR:Quay:415` in `StopPointRef` identifies the corresponding PETI `Quay`.\n\n[Browse rail stops and their quays in PETI](https://peti.fintraffic.fi/api/fintraffic/v1/stops?transportModes=rail).\n","operationId":"getSiriEt","responses":{"200":{"description":"OK","content":{"application/xml":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/routesets":{"get":{"tags":["routesets"],"summary":"Returns routesets that are newer than {version}","operationId":"getRoutesetsByVersion","parameters":[{"name":"version","in":"query","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Routeset"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/routesets/{departure_date}/{train_number}":{"get":{"tags":["routesets"],"summary":"Returns routesets for {train_number} and {departure_date}","operationId":"getRoutesetsByTrainNumber","parameters":[{"name":"train_number","in":"path","description":"train_number","required":true,"schema":{"type":"string"}},{"name":"departure_date","in":"path","description":"departure_date","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Routeset"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/routesets/station/{station}/{departure_date}":{"get":{"tags":["routesets"],"summary":"Returns routesets for {station} and {departure_date}","operationId":"getRoutesetsByStationAndDepartureDate","parameters":[{"name":"station","in":"path","description":"station","required":true,"schema":{"type":"string"}},{"name":"departure_date","in":"path","description":"departure_date","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Routeset"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/netex/FTR-netex.zip":{"get":{"tags":["netex"],"summary":"Returns train timetables and routes in NeTEx Nordic","operationId":"getNeTEx","responses":{"200":{"description":"OK","content":{"application/zip":{"schema":{"type":"string","format":"byte"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/train-types":{"get":{"tags":["metadata"],"summary":"Returns a list of train types","operationId":"getTrainTypes","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainType"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/train-running-message-rules":{"get":{"tags":["metadata"],"summary":"Returns list of train running message rules","operationId":"getTrainRunningMessageRules","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainRunningMessageRule"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/train-categories":{"get":{"tags":["metadata"],"summary":"Returns a list of train categories","operationId":"getTrainCategories","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrainCategory"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/track-sections":{"get":{"tags":["metadata"],"summary":"Returns list of track sections","operationId":"getTrackSections","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TrackSection"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/time-table-periods":{"get":{"tags":["metadata"],"summary":"Returns list of time table periods","operationId":"getTimeTablePeriods","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TimeTablePeriod"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/third-cause-category-codes":{"get":{"tags":["metadata"],"summary":"Returns list of third cause category codes","operationId":"getThirdCauseResources","parameters":[{"name":"show_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ThirdCategoryCode"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/stations":{"get":{"tags":["metadata"],"summary":"Returns list of stations","operationId":"getStations","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Station"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/stations.geojson":{"get":{"tags":["metadata"],"summary":"Returns list of stations in geojson format","operationId":"getStationsAsGeoJson","responses":{"200":{"description":"OK","content":{"application/vnd.geo+json":{"schema":{"$ref":"#/components/schemas/FeatureCollection"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/operators":{"get":{"tags":["metadata"],"summary":"Returns list of operators","operationId":"getOperators","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Operator"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/detailed-cause-category-codes":{"get":{"tags":["metadata"],"summary":"Returns list of detailed cause category codes","operationId":"getDetailedCauseResources","parameters":[{"name":"show_inactive","in":"query","description":"show_inactive","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCategoryCode"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/metadata/cause-category-codes":{"get":{"tags":["metadata"],"summary":"Returns list of cause category codes","operationId":"getCauseCodes","parameters":[{"name":"show_inactive","in":"query","description":"show_inactive","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CategoryCode"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/live-trains":{"get":{"tags":["live-trains"],"summary":"Returns active trains that are newer than {version}","operationId":"getLiveTrainsByVersion","parameters":[{"name":"version","in":"query","description":"version","required":false,"schema":{"type":"integer","format":"int64","default":0}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Train"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/live-trains/station/{station}":{"get":{"tags":["live-trains"],"summary":"Returns trains that travel trough {station}","operationId":"getStationsTrains","parameters":[{"name":"station","in":"path","description":"station","required":true,"schema":{"type":"string"}},{"name":"version","in":"query","description":"version","required":false,"schema":{"type":"integer","format":"int64","default":0}},{"name":"arrived_trains","in":"query","description":"arrived_trains","required":false,"schema":{"type":"integer","format":"int32","default":5}},{"name":"arriving_trains","in":"query","description":"arriving_trains","required":false,"schema":{"type":"integer","format":"int32","default":5}},{"name":"departed_trains","in":"query","description":"departed_trains","required":false,"schema":{"type":"integer","format":"int32","default":5}},{"name":"departing_trains","in":"query","description":"departing_trains","required":false,"schema":{"type":"integer","format":"int32","default":5}},{"name":"minutes_before_departure","in":"query","description":"Minutes before departure - all time limit parameters must be set for filtering to work","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"minutes_after_departure","in":"query","description":"Minutes after departure - all time limit parameters must be set for filtering to work","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"minutes_before_arrival","in":"query","description":"Minutes before arrival - all time limit parameters must be set for filtering to work","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"minutes_after_arrival","in":"query","description":"Minutes after arrival - all time limit parameters must be set for filtering to work","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"include_nonstopping","in":"query","description":"include_nonstopping","required":false,"schema":{"type":"boolean","default":false}},{"name":"train_categories","in":"query","description":"train_categories","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Train"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/live-trains/station/{departure_station}/{arrival_station}":{"get":{"tags":["live-trains"],"summary":"Return trains that run from {arrival_station} to {departure_station}","operationId":"getTrainsFromDepartureToArrivalStation","parameters":[{"name":"departure_station","in":"path","description":"departure_station","required":true,"schema":{"type":"string"}},{"name":"arrival_station","in":"path","description":"arrival_station","required":true,"schema":{"type":"string"}},{"name":"departure_date","in":"query","description":"departure_date","required":false,"schema":{"type":"string","format":"date"}},{"name":"include_nonstopping","in":"query","description":"include_nonstopping","required":false,"schema":{"type":"boolean","default":false}},{"name":"startDate","in":"query","description":"startDate","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"endDate","in":"query","description":"endDate","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","description":"limit","required":false,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Train"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/compositions":{"get":{"tags":["compositions"],"summary":"Returns all compositions that are newer than {version}","operationId":"getCompositionsByVersion","parameters":[{"name":"version","in":"query","description":"version","required":false,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Composition"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/compositions/{departure_date}":{"get":{"tags":["compositions"],"summary":"Returns all compositions for trains run on {departure_date}","operationId":"getCompositionsByDepartureDate","parameters":[{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Composition"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/compositions/{departure_date}/{train_number}":{"get":{"tags":["compositions"],"summary":"Returns composition for a specific train","operationId":"getCompositionByTrainNumberAndDepartureDate","parameters":[{"name":"departure_date","in":"path","required":true,"schema":{"type":"string","format":"date"}},{"name":"train_number","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Composition"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/compositions/history/{departure_date}/{train_number}":{"get":{"tags":["compositions"],"summary":"Returns all composition versions for given train. History is available for 14 days.","operationId":"getCompositionHistory","parameters":[{"name":"departure_date","in":"path","description":"Departure date","required":true,"schema":{"type":"string","format":"date"}},{"name":"train_number","in":"path","description":"Train number","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/History"}}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error","content":{}}}}},"/api/v1/last-updated":{"get":{"tags":["last-updated"],"summary":"Returns the last update time of each data type","description":"Shows how fresh the data is and whether it is within the alarm limit.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","properties":{"lastUpdated":{"type":"string","description":"When the data type was last updated","format":"date-time"},"alarmLimit":{"type":"string","description":"How old the data can be before it is considered outdated (ISO 8601 duration)","example":"PT5M"},"durationSinceLastUpdate":{"type":"string","description":"Time since the last update (ISO 8601 duration)","example":"PT1.2S"},"isUpToDate":{"type":"boolean","description":"False when the time since the last update is longer than the alarm limit"}}},"description":"Keyed by data type, for example TRAINS, TRAIN_LOCATIONS, GTFS, SIRI_ET, SIRI_VM, SIRI_SX_STATIONS and SIRI_SX_TRAINS. Every data type in use is listed from the service start. The time is the stored time of the last update, or the service start time when nothing has been stored yet."}}}}}}}},"components":{"schemas":{"PassengerInformationMessage":{"required":["creationDateTime","endValidity","id","startValidity","version"],"type":"object","properties":{"trainDepartureDate":{"type":"string","description":"Date of departure as a local date for train to which message relates"},"endValidity":{"type":"string","description":"Message validity end date and time"},"startValidity":{"type":"string","description":"Message validity start date and time"},"id":{"type":"string"},"stations":{"type":"array","description":"List of stations where message is delivered","items":{"type":"string"}},"trainNumber":{"type":"string","description":"Number of train to which message relates"},"audio":{"$ref":"#/components/schemas/PassengerInformationAudio"},"video":{"$ref":"#/components/schemas/PassengerInformationVideo"},"version":{"type":"number"},"creationDateTime":{"type":"string","description":"Date and time when message version was created"}},"description":"PassengerInformation message schema"},"PassengerInformationMessages":{"type":"array","items":{"$ref":"#/components/schemas/PassengerInformationMessage"}},"PassengerInformationVideo":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/PassengerInformationTextContent"},"deliveryRules":{"type":"object","properties":{"startDateTime":{"type":"string","description":"Video delivery start date"},"weekDays":{"type":"array","description":"Days of week on which video is delivered","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"deliveryType":{"type":"string","description":"CONTINUOS_VISUALIZATION: the message is delivered from _startDateTime_ (at _startTime_ if exists) to _endDateTime_ (at _endTime_ if exists) \n WHEN: the message is delivered  from  _startDateTime_ to _endDateTime_ only in the time interval between _startTime_ and _endTime_ for each day in _weekDays_","enum":["WHEN","CONTINUOS_VISUALIZATION"]},"startTime":{"type":"string","description":"Video delivery start time"},"endTime":{"type":"string","description":"Video delivery end time"},"endDateTime":{"type":"string","description":"Video delivery end date"}}}},"description":"PassengerInformation message video content schema"},"PassengerInformationAudio":{"type":"object","properties":{"text":{"$ref":"#/components/schemas/PassengerInformationTextContent"},"deliveryRules":{"type":"object","properties":{"startDateTime":{"type":"string","description":"Audio delivery start date"},"weekDays":{"type":"array","description":"Days of week on which audio is delivered","items":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]}},"deliveryType":{"type":"string","description":"NOW: the message is delivered at the time of insertion \n DELIVERY_AT: the message is delivered on the date-time _deliveryAt_ \n REPEAT_EVERY: the message is delivered from _startDateTime_ at _startTime_ to _endDateTime_ at _endTime_ evaluating the repetition conditions and _weekDays_ conditions \n ON_SCHEDULE: the message is delivered for a specific vehicle journey when a scheduling date happens at a station (e.g. estimated arrival time) \n ON_EVENT: the message is delivered for a vehicle journey when an event specified in _eventType_ (e.g. ARRIVING) happens for a station defined in _stations_","enum":["NOW","DELIVERY_AT","REPEAT_EVERY","ON_EVENT","ON_SCHEDULE"]},"startTime":{"type":"string","description":"Audio delivery start time"},"deliveryAt":{"type":"string","description":"Date and time on which message is delivered when _deliveryType_ is DELIVERY_AT"},"repeatEvery":{"type":"integer","description":"Period of time in minutes between repetitions of message when  _deliveryType_ is REPEAT_EVERY"},"endTime":{"type":"string","description":"Audio delivery end time"},"eventType":{"type":"string","description":"Event type on which message is delivered when _deliveryType_ is ON_EVENT","enum":["ARRIVING","DEPARTING"]},"endDateTime":{"type":"string","description":"Audio delivery end date"},"repetitions":{"type":"integer","description":"Number of times message is repeated on each occurrence when  _deliveryType_ is REPEAT_EVERY"}}}},"description":"PassengerInformation message audio content schema"},"MessageResponseModel":{"type":"object","properties":{"message":{"type":"string","description":"Response message"}},"description":"Response with message"},"PassengerInformationTextContent":{"type":"object","properties":{"fi":{"type":"string","description":"Message text content in Finnish"},"sv":{"type":"string","description":"Message text content in Swedish"},"en":{"type":"string","description":"Message text content in English"}},"description":"PassengerInformation message text content schema"},"CategoryCode":{"title":"CategoryCode","required":["categoryCode","categoryName","validFrom"],"type":"object","properties":{"passengerTerm":{"$ref":"#/components/schemas/PassengerTerm"},"categoryCode":{"type":"string","description":"Official code","example":"E"},"categoryName":{"type":"string","description":"Official name","example":"Etuajassakulku"},"validFrom":{"type":"string","description":"Start date when this code is used","format":"date"},"validTo":{"type":"string","description":"End date when this code is used. Empty means category is used until further notice","format":"date"},"id":{"type":"integer","format":"int32"}},"description":"A code that is used to categorize reasons for a train not being on schedule"},"Cause":{"title":"Cause","required":["categoryCode","categoryName","validFrom"],"type":"object","properties":{"passengerTerm":{"$ref":"#/components/schemas/PassengerTerm"},"categoryCode":{"type":"string","description":"Official code","example":"E"},"categoryName":{"type":"string","description":"Official name","example":"Etuajassakulku"},"validFrom":{"type":"string","description":"Start date when this category code is used","format":"date"},"validTo":{"type":"string","description":"End date when this code is used. Empty means category is used until further notice","format":"date"},"id":{"type":"integer","format":"int32"},"detailedCategoryCode":{"type":"string","example":"E2"},"detailedCategoryName":{"type":"string","example":"Ajo- tai pysähdysajan alitus"},"thirdCategoryCode":{"type":"string","example":"E103"},"thirdCategoryName":{"type":"string","example":"Valmistuminen etuajassa"},"description":{"type":"string","description":"Detailed description","example":"Jos kyseessä ei ole kääntyvä juna ja se on valmis lähtemään etuajassa. Esim. vaihtotöitä on selkeästi suunniteltua vähemmän."},"categoryCodeId":{"type":"integer","format":"int32"},"detailedCategoryCodeId":{"type":"integer","format":"int32"},"thirdCategoryCodeId":{"type":"integer","format":"int32"}},"description":"Details why a train is not on schedule. Train-responses only have ids and codes populated."},"DetailedCategoryCode":{"title":"DetailedCategoryCode","required":["validFrom"],"type":"object","properties":{"passengerTerm":{"$ref":"#/components/schemas/PassengerTerm"},"detailedCategoryCode":{"type":"string","example":"E2"},"detailedCategoryName":{"type":"string","example":"Ajo- tai pysähdysajan alitus"},"validFrom":{"type":"string","description":"Start date when this category code is used","format":"date"},"validTo":{"type":"string","description":"End date when this code is used. Empty means category is used until further notice","format":"date"},"id":{"type":"integer","format":"int32"}},"description":"Category code that is one step more detailed from its parent CategoryCode"},"PassengerTerm":{"title":"PassengerTerm","type":"object","properties":{"fi":{"type":"string","description":"Finnish passenger friendly term for the code"},"en":{"type":"string","description":"English passenger friendly term for the code"},"sv":{"type":"string","description":"Swedish passenger friendly term for the code"}}},"ThirdCategoryCode":{"title":"ThirdCategoryCode","required":["validFrom"],"type":"object","properties":{"passengerTerm":{"$ref":"#/components/schemas/PassengerTerm"},"thirdCategoryCode":{"type":"string","example":"E103"},"thirdCategoryName":{"type":"string","example":"Valmistuminen etuajassa"},"description":{"type":"string","description":"Detailed description","example":"Jos kyseessä ei ole kääntyvä juna ja se on valmis lähtemään etuajassa. Esim. vaihtotöitä on selkeästi suunniteltua vähemmän."},"validFrom":{"type":"string","description":"Start date when this category code is used","format":"date"},"validTo":{"type":"string","description":"End date when this code is used. Empty means category is used until further notice","format":"date"},"id":{"type":"integer","format":"int32"}},"description":"Most detailed category code for a Cause"},"TimeTableRow":{"title":"TimeTableRow","required":["scheduledTime","type"],"type":"object","properties":{"stationShortCode":{"type":"string","example":"HKI"},"stationUICCode":{"type":"integer","format":"int32","example":1},"countryCode":{"type":"string","example":"FI"},"type":{"type":"string","enum":["ARRIVAL","DEPARTURE"]},"trainStopping":{"type":"boolean","description":"Does the train actual stop on the station"},"commercialStop":{"type":"boolean","description":"Is the stop 'commercial' ie. loading/unloading of passengers or cargo","nullable":true},"cancelled":{"type":"boolean","description":"Is the schedule part cancelled"},"scheduledTime":{"type":"string","description":"Scheduled time for departure/arrival of the train","format":"date-time"},"estimateSource":{"type":"string","description":"Source for the estimate","example":"LIIKE_USER","enum":["LIIKE_USER","MIKU_USER","LIIKE_AUTOMATIC","UNKNOWN","COMBOCALC"]},"unknownDelay":{"type":"boolean","description":"Set if the train is delayed, but it is impossible to estimate for how long","nullable":true},"unknownTrack":{"type":"boolean","description":"Set if the track is not known","nullable":true},"actualTime":{"type":"string","description":"Actual time when train departured or arrived on the station","format":"date-time","nullable":true},"differenceInMinutes":{"type":"integer","description":"Difference between schedule and actual time in minutes","format":"int64","example":5},"causes":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/Cause"}},"stopSector":{"type":"string","nullable":true},"commercialTrack":{"type":"string","description":"Track where the train stops","example":"1"},"liveEstimateTime":{"type":"string","description":"Estimated time for departure/arrival of the train","format":"date-time"},"trainReady":{"$ref":"#/components/schemas/TrainReady"}},"description":"A part of train's schedule"},"Train":{"required":["departureDate","trainNumber"],"type":"object","properties":{"trainNumber":{"type":"integer","description":"Identifies the train inside a single departure date","format":"int64","example":1},"departureDate":{"type":"string","description":"Date of the train's first departure","format":"date","example":"2017-12-01"},"operatorUICCode":{"type":"integer","description":"Official UIC code of the operator","format":"int32","example":10},"operatorShortCode":{"type":"string","description":"Short code of the operator","example":"vr"},"trainType":{"type":"string","example":"IC"},"trainCategory":{"type":"string","example":"Long-distance"},"commuterLineID":{"type":"string","example":"Z"},"runningCurrently":{"type":"boolean","description":"Is the train running currently or does it have actual times"},"cancelled":{"type":"boolean","description":"Is the train wholly cancelled"},"deleted":{"type":"boolean","description":"Is the train deleted which means cancelled 10 days before its departure date"},"version":{"type":"integer","description":"When was train last modified","format":"int64"},"timetableType":{"type":"string","description":"Is the train ADHOC or REGULAR. REGULAR trains are run for example every monday, ADHOC trains are one-time trains","enum":["REGULAR","ADHOC"]},"timetableAcceptanceDate":{"type":"string","description":"When was this train accepted to run on Finnish railways by the FTA","format":"date-time"},"timeTableRows":{"type":"array","items":{"$ref":"#/components/schemas/TimeTableRow"}}}},"TrainReady":{"title":"TrainReady","type":"object","properties":{"source":{"type":"string","description":"How was the permission given","enum":["PHONE","LIIKE","UNKNOWN","KUPLA"]},"accepted":{"type":"boolean","description":"Was the permission given"},"timestamp":{"type":"string","description":"When was the permission given","format":"date-time"}},"description":"Operator has to ask permission (=TrainReady) to leave certain stations"},"History":{"title":"History","required":["id","json","version"],"type":"object","properties":{"version":{"type":"integer","description":"History version number","format":"int32"},"id":{"$ref":"#/components/schemas/Version"},"json":{"type":"object","description":"Content"}}},"Version":{"required":["departureDate","fetchDate","trainNumber"],"type":"object","properties":{"trainNumber":{"type":"integer","description":"Train number","format":"int32"},"departureDate":{"type":"string","description":"Departure date","format":"date"},"fetchDate":{"type":"string","description":"Date when this version was fetched","format":"date-time"}},"description":"History train identifier"},"TrainRunningMessage":{"title":"TrainRunningMessage","required":["departureDate","trainNumber"],"type":"object","properties":{"id":{"type":"integer","format":"int64"},"version":{"type":"integer","format":"int64"},"trainNumber":{"type":"string","description":"Identifies the train inside a single departure date","example":"1"},"departureDate":{"type":"string","description":"Date of the train's first departure","format":"date","example":"2017-12-01"},"timestamp":{"type":"string","description":"Timestamp when the message was generated","format":"date-time"},"trackSection":{"type":"string"},"nextTrackSection":{"type":"string"},"previousTrackSection":{"type":"string"},"station":{"type":"string"},"nextStation":{"type":"string"},"previousStation":{"type":"string"},"type":{"type":"string","description":"OCCUPY = train entered TrackSection, RELEASE = train exited TrackSection","enum":["OCCUPY","RELEASE"]}},"description":"TrainRunMessages are generated when a train either enters or exists a TrackSection"},"SwaggerPoint":{"title":"SwaggerPoint","type":"object","properties":{"type":{"type":"string"},"coordinates":{"type":"array","items":{"type":"number","format":"double"}}}},"TrainLocation":{"title":"TrainLocation","type":"object","properties":{"trainNumber":{"type":"integer","format":"int64"},"departureDate":{"type":"string","format":"date"},"timestamp":{"type":"string","format":"date-time"},"SwaggerPoint":{"$ref":"#/components/schemas/SwaggerPoint"},"speed":{"type":"integer","format":"int32"},"accuracy":{"type":"integer","format":"int32"},"isGpsLocation":{"type":"boolean"}}},"Coordinate":{"type":"object","properties":{"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"},"z":{"type":"number","format":"double"},"valid":{"type":"boolean"},"m":{"type":"number","format":"double"},"coordinate":{"$ref":"#/components/schemas/Coordinate"}}},"CoordinateSequence":{"type":"object","properties":{"dimension":{"type":"integer","format":"int32"},"measures":{"type":"integer","format":"int32"}}},"CoordinateSequenceFactory":{"type":"object"},"Envelope":{"type":"object","properties":{"null":{"type":"boolean"},"diameter":{"type":"number","format":"double"},"width":{"type":"number","format":"double"},"minX":{"type":"number","format":"double"},"minY":{"type":"number","format":"double"},"maxX":{"type":"number","format":"double"},"maxY":{"type":"number","format":"double"},"area":{"type":"number","format":"double"},"height":{"type":"number","format":"double"}}},"Feature":{"type":"object","properties":{"type":{"type":"string"},"geometry":{"$ref":"#/components/schemas/Geometry"},"properties":{"type":"object"}}},"FeatureCollection":{"title":"FeatureCollection","type":"object","properties":{"type":{"type":"string"},"features":{"type":"array","items":{"$ref":"#/components/schemas/Feature"}}}},"Geometry":{"type":"object","properties":{"envelope":{"$ref":"#/components/schemas/Geometry"},"factory":{"$ref":"#/components/schemas/GeometryFactory"},"userData":{"type":"object"},"length":{"type":"number","format":"double"},"empty":{"type":"boolean"},"valid":{"type":"boolean"},"dimension":{"type":"integer","format":"int32"},"numGeometries":{"type":"integer","format":"int32"},"envelopeInternal":{"$ref":"#/components/schemas/Envelope"},"coordinate":{"$ref":"#/components/schemas/Coordinate"},"precisionModel":{"$ref":"#/components/schemas/PrecisionModel"},"srid":{"type":"integer","format":"int32"},"geometryType":{"type":"string"},"coordinates":{"type":"array","items":{"$ref":"#/components/schemas/Coordinate"}},"numPoints":{"type":"integer","format":"int32"},"simple":{"type":"boolean"},"rectangle":{"type":"boolean"},"area":{"type":"number","format":"double"},"centroid":{"$ref":"#/components/schemas/Point"},"interiorPoint":{"$ref":"#/components/schemas/Point"},"boundary":{"$ref":"#/components/schemas/Geometry"},"boundaryDimension":{"type":"integer","format":"int32"}}},"GeometryFactory":{"type":"object","properties":{"precisionModel":{"$ref":"#/components/schemas/PrecisionModel"},"coordinateSequenceFactory":{"$ref":"#/components/schemas/CoordinateSequenceFactory"},"srid":{"type":"integer","format":"int32"}}},"Point":{"type":"object","properties":{"envelope":{"$ref":"#/components/schemas/Geometry"},"factory":{"$ref":"#/components/schemas/GeometryFactory"},"userData":{"type":"object"},"coordinates":{"type":"array","items":{"$ref":"#/components/schemas/Coordinate"}},"empty":{"type":"boolean"},"dimension":{"type":"integer","format":"int32"},"coordinateSequence":{"$ref":"#/components/schemas/CoordinateSequence"},"coordinate":{"$ref":"#/components/schemas/Coordinate"},"x":{"type":"number","format":"double"},"y":{"type":"number","format":"double"},"geometryType":{"type":"string"},"numPoints":{"type":"integer","format":"int32"},"simple":{"type":"boolean"},"boundary":{"$ref":"#/components/schemas/Geometry"},"boundaryDimension":{"type":"integer","format":"int32"},"length":{"type":"number","format":"double"},"valid":{"type":"boolean"},"numGeometries":{"type":"integer","format":"int32"},"envelopeInternal":{"$ref":"#/components/schemas/Envelope"},"precisionModel":{"$ref":"#/components/schemas/PrecisionModel"},"srid":{"type":"integer","format":"int32"},"rectangle":{"type":"boolean"},"area":{"type":"number","format":"double"},"centroid":{"$ref":"#/components/schemas/Point"},"interiorPoint":{"$ref":"#/components/schemas/Point"}}},"PrecisionModel":{"type":"object","properties":{"scale":{"type":"number","format":"double"},"type":{"$ref":"#/components/schemas/Type"},"floating":{"type":"boolean"},"maximumSignificantDigits":{"type":"integer","format":"int32"},"offsetX":{"type":"number","format":"double"},"offsetY":{"type":"number","format":"double"}}},"Type":{"type":"object"},"ElementRange":{"title":"ElementRange","required":["elementId1","elementId2","trackIds"],"type":"object","properties":{"elementId1":{"type":"string","description":"Identifier of element 1"},"elementId2":{"type":"string","description":"Identifier of element 2"},"trackKilometerRange":{"type":"string","description":"Track kilometer range, required if notification type is traffic restriction, e.g. (006) 754+0273 > 764+0771"},"trackIds":{"type":"array","description":"Track identifiers","items":{"type":"string","description":"Track identifiers"}},"specifiers":{"type":"array","description":"Specify a more detailed work area (track element)","items":{"type":"string","description":"Specify a more detailed work area (track element)"}}},"description":"Two consecutive elements in an identifier range"},"IdentifierRange":{"title":"IdentifierRange","required":["notificationId"],"type":"object","properties":{"notificationId":{"type":"string","description":"Notification identifier"},"elementId":{"type":"string","description":"Identifier of element, required if element pair or ranges are not present"},"elementPairId1":{"type":"string","description":"Identifier of element 1 in element pair, required if element or ranges are not present"},"elementPairId2":{"type":"string","description":"Identifier of element 2 in element pair, required if element or ranges are not present"},"speedLimit":{"$ref":"#/components/schemas/SpeedLimit"},"elementRanges":{"uniqueItems":true,"type":"array","description":"Element ranges, required if element or element pair is not present","items":{"$ref":"#/components/schemas/ElementRange"}}},"description":"Place of work: between two track elements or a single track element"},"SpatialRumaLocation":{"title":"SpatialRumaLocation","required":["locationType","notificationId","workPartIndex"],"type":"object","properties":{"notificationId":{"type":"string","description":"Notification identifier"},"workPartIndex":{"type":"integer","description":"Track work part index","format":"int64"},"locationType":{"type":"string","description":"Type","enum":["WORK","FIREWORK","SPEED_LIMIT"]},"operatingPointId":{"type":"string","description":"Identifier of operating point, required if section is not present"},"sectionBetweenOperatingPointsId":{"type":"string","description":"Identifier of section between operating points, required if operating point is not present"},"location":{"type":"object","description":"Location if no identifer ranges are present"},"identifierRanges":{"uniqueItems":true,"type":"array","description":"Identifier ranges","items":{"$ref":"#/components/schemas/IdentifierRange"}}},"description":"Location of work, either an operating point or a section between operating points"},"SpatialTrafficRestrictionNotification":{"title":"SpatialTrafficRestrictionNotification","required":["created","id","limitation","location","locations","organization","startDate","state","version"],"type":"object","properties":{"id":{"type":"string","description":"Id"},"state":{"type":"string","description":"State","enum":["FINISHED","SENT","DRAFT","REMOVED"]},"organization":{"type":"string","description":"Which organization created this notification"},"created":{"type":"string","description":"When this notification was created","format":"date-time"},"modified":{"type":"string","description":"When this notification last modified","format":"date-time"},"limitation":{"type":"string","description":"Limitation type","enum":["CLOSED_FROM_TRAFFIC","CLOSED_FROM_ELECTRIC_ROLLING_STOCK","TEMPORARY_SPEED_LIMIT","AXLE_WEIGHT_MAX","ATP_CONSTRUCTION_ZONE","SWITCH_LOCKED","FIREWORK_DANGER_ZONE","OTHER"]},"trackWorkNotificationId":{"type":"string","description":"Track work notification identifier"},"axleWeightMax":{"type":"number","description":"Max axle weight, required if limitation type is max axle weight","format":"double"},"startDate":{"type":"string","description":"Start datetime","format":"date-time"},"endDate":{"type":"string","description":"End datetime","format":"date-time"},"finished":{"type":"string","description":"Finished datetime, required if state is finished","format":"date-time"},"location":{"type":"object","description":"Approximate location"},"locations":{"uniqueItems":true,"type":"array","description":"Locations","items":{"$ref":"#/components/schemas/SpatialRumaLocation"}},"version":{"type":"integer","description":"Version","format":"int64"}},"description":"Describes a restriction affecting the use of a railway infrastructure part"},"SpeedLimit":{"title":"SpeedLimit","required":["balises","signs","speed"],"type":"object","properties":{"speed":{"type":"integer","description":"Speed limit value","format":"int32"},"signs":{"type":"boolean","description":"Speed limit signs used?"},"balises":{"type":"boolean","description":"Balises used?"}},"description":"Speed limit set for a part of a track"},"TrafficRestrictionNotificationWithVersions":{"title":"TrafficRestrictionNotificationWithVersions","type":"object","properties":{"id":{"type":"string","description":"Traffic restriction notification id"},"versions":{"type":"array","description":"Traffic resctriction notification versions","items":{"$ref":"#/components/schemas/SpatialTrafficRestrictionNotification"}}}},"RumaNotificationIdAndVersion":{"title":"RumaNotificationIdAndVersion","type":"object","properties":{"id":{"type":"string","description":"Id"},"version":{"type":"integer","description":"Version","format":"int64"},"modified":{"type":"string","description":"Last modified","format":"date-time"}}},"RumaLocation":{"title":"RumaLocation","required":["locationType","notificationId","workPartIndex"],"type":"object","properties":{"notificationId":{"type":"string","description":"Notification identifier"},"workPartIndex":{"type":"integer","description":"Track work part index","format":"int64"},"locationType":{"type":"string","description":"Type","enum":["WORK","FIREWORK","SPEED_LIMIT"]},"operatingPointId":{"type":"string","description":"Identifier of operating point, required if section is not present"},"sectionBetweenOperatingPointsId":{"type":"string","description":"Identifier of section between operating points, required if operating point is not present"}},"description":"Location of work, either an operating point or a section between operating points"},"SpatialTrackWorkNotification":{"title":"SpatialTrackWorkNotification","required":["created","electricitySafetyPlan","id","location","organization","personInChargePlan","speedLimitPlan","speedLimitRemovalPlan","state","trafficSafetyPlan","version","workParts"],"type":"object","properties":{"id":{"type":"string","description":"Id"},"state":{"type":"string","description":"State","enum":["ACTIVE","PASSIVE","FINISHED","SENT","DRAFT","REMOVED","REJECTED"]},"organization":{"type":"string","description":"Which organization created this notification"},"created":{"type":"string","description":"When this notification was created","format":"date-time"},"modified":{"type":"string","description":"When this notification last modified","format":"date-time"},"trafficSafetyPlan":{"type":"boolean","description":"Does the notification contain a traffic safety plan"},"speedLimitRemovalPlan":{"type":"boolean","description":"Does the notification contain a speed limit removal plan"},"electricitySafetyPlan":{"type":"boolean","description":"Does the notification contain a electricity safety plan"},"speedLimitPlan":{"type":"boolean","description":"Does the notification contain a speed limit plan"},"personInChargePlan":{"type":"boolean","description":"Does the notification contain a plan for persons in charge"},"location":{"type":"object","description":"Approximate location"},"workParts":{"type":"array","description":"Work parts","items":{"$ref":"#/components/schemas/TrackWorkPart"}},"version":{"type":"integer","description":"Version","format":"int64"}},"description":"Describes planned, in-progress or finished track work"},"TrackWorkNotificationWithVersions":{"title":"TrackWorkNotificationWithVersions","type":"object","properties":{"id":{"type":"string","description":"Track work notification id"},"versions":{"type":"array","description":"Track work notification versions","items":{"$ref":"#/components/schemas/SpatialTrackWorkNotification"}}}},"TrackWorkPart":{"title":"TrackWorkPart","required":["containsFireWork","locations","partIndex","permissionMinimumDuration","startDay"],"type":"object","properties":{"partIndex":{"type":"integer","description":"Index number","format":"int64"},"startDay":{"type":"string","description":"Planned (not necessarily actual) start day","format":"date"},"permissionMinimumDuration":{"type":"string","description":"Requested minimum duration for work permission in ISO 8601 format, e.g. PT30M"},"containsFireWork":{"type":"boolean","description":"Contains fire work"},"plannedWorkingGap":{"type":"string","description":"Planned working gap in local time with no time zone, e.g. 11:43:00"},"advanceNotifications":{"type":"array","description":"Related advance notifications","items":{"type":"string","description":"Related advance notifications"}},"locations":{"uniqueItems":true,"type":"array","description":"Locations","items":{"$ref":"#/components/schemas/RumaLocation"}}},"description":"A logical part of a track work"},"Routesection":{"title":"Routesection","type":"object","properties":{"sectionId":{"type":"string"},"stationCode":{"type":"string"},"commercialTrackId":{"type":"string"}}},"Routeset":{"title":"Routeset","required":["departureDate","trainNumber"],"type":"object","properties":{"version":{"type":"integer","format":"int64"},"messageTime":{"type":"string","format":"date-time"},"trainNumber":{"type":"string","description":"Identifies the train inside a single departure date","example":"1"},"departureDate":{"type":"string","description":"Date of the train's first departure","format":"date","example":"2017-12-01"},"routeType":{"type":"string"},"clientSystem":{"type":"string"},"messageId":{"type":"string"},"routesections":{"type":"array","items":{"$ref":"#/components/schemas/Routesection"}}}},"TrainCategory":{"title":"TrainCategory","type":"object","properties":{"name":{"type":"string","example":"Commuter"}}},"TrainType":{"title":"TrainType","type":"object","properties":{"name":{"type":"string","example":"HL"},"trainCategory":{"$ref":"#/components/schemas/TrainCategory"}}},"TrainRunningMessageRule":{"title":"TrainRunningMessageRule","type":"object","properties":{"id":{"type":"integer","format":"int64"},"timeTableRowStationShortCode":{"type":"string","description":"For which station is the actual time generated"},"timeTableRowType":{"type":"string","description":"For which TimeTableRow is the actual time generated","enum":["ARRIVAL","DEPARTURE"]},"trainRunningMessageStationShortCode":{"type":"string"},"trainRunningMessageNextStationShortCode":{"type":"string"},"trainRunningMessageTrackSection":{"type":"string"},"trainRunningMessageType":{"type":"string","enum":["OCCUPY","RELEASE"]},"offset":{"type":"integer","description":"TrainRunningMessages timestamp is adjusted for offset when generating actual time","format":"int32"}},"description":"These rules define how TrainRunningMessages trigger actual times for TimeTableRows"},"TrackLocation":{"title":"TrackLocation","type":"object","properties":{"track":{"type":"string","example":"003"},"kilometres":{"type":"integer","format":"int32","example":34},"metres":{"type":"integer","format":"int32","example":940}},"description":"A location on the track. Kilometres and meters are distance from the start of the track"},"TrackRange":{"title":"TrackRange","type":"object","properties":{"id":{"type":"integer","format":"int64"},"startLocation":{"$ref":"#/components/schemas/TrackLocation"},"endLocation":{"$ref":"#/components/schemas/TrackLocation"}}},"TrackSection":{"title":"TrackSection","type":"object","properties":{"id":{"type":"integer","format":"int64"},"station":{"type":"string","example":"JNS"},"trackSectionCode":{"type":"string","example":"JNS_ERV40"},"ranges":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/TrackRange"}}}},"TimeTablePeriod":{"title":"TimeTablePeriod","type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"effectiveFrom":{"type":"string","format":"date"},"effectiveTo":{"type":"string","format":"date"},"capacityAllocationConfirmDate":{"type":"string","format":"date"},"capacityRequestSubmissionDeadline":{"type":"string","format":"date"},"changeDates":{"type":"array","items":{"$ref":"#/components/schemas/TimeTablePeriodChangeDate"}}}},"TimeTablePeriodChangeDate":{"title":"TimeTablePeriodChangeDate","type":"object","properties":{"id":{"type":"integer","format":"int64"},"effectiveFrom":{"type":"string","format":"date"},"capacityRequestSubmissionDeadline":{"type":"string","format":"date"}}},"Station":{"title":"Station","type":"object","properties":{"passengerTraffic":{"type":"boolean","description":"Does this station have passenger traffic","example":true},"type":{"type":"string","description":"Type of station","example":"STATION,STOPPING_POINT","enum":["STATION","STOPPING_POINT","TURNOUT_IN_THE_OPEN_LINE"]},"stationName":{"type":"string","example":"Helsinki asema"},"stationShortCode":{"type":"string","example":"HKI"},"stationUICCode":{"type":"integer","format":"int32","example":1},"countryCode":{"type":"string","example":"FI"},"longitude":{"type":"number","example":24.941662},"latitude":{"type":"number","example":60.172133}}},"Operator":{"title":"Operator","type":"object","properties":{"id":{"type":"integer","format":"int64"},"operatorName":{"type":"string"},"operatorShortCode":{"type":"string"},"operatorUICCode":{"type":"integer","format":"int32"},"trainNumbers":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/OperatorTrainNumber"}}}},"OperatorTrainNumber":{"title":"OperatorTrainNumber","type":"object","properties":{"id":{"type":"integer","format":"int64"},"bottomLimit":{"type":"integer","description":"Where operator's train numbers start","format":"int32","example":76050},"topLimit":{"type":"integer","description":"Where operator's train numbers end","format":"int32","example":76219},"trainCategory":{"type":"string","example":"On-track machines"}},"description":"Operators own a range of train numbers"},"Composition":{"title":"Composition","required":["departureDate","trainCategory","trainNumber","trainType"],"type":"object","properties":{"trainNumber":{"type":"integer","description":"Identifies the train inside a single departure date","format":"int64","example":1},"departureDate":{"type":"string","description":"Date of the train's first departure","format":"date","example":"2017-12-01"},"operatorUICCode":{"type":"integer","description":"Official UIC code of the operator","format":"int32","example":10},"operatorShortCode":{"type":"string","description":"Short code of the operator","example":"vr"},"trainCategory":{"type":"string","example":"Long-distance"},"trainType":{"type":"string","example":"IC"},"version":{"type":"integer","description":"When was this data last modified","format":"int64","example":1728555686000},"journeySections":{"uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/JourneySection"}}},"description":"Describes train's locomotives and wagons"},"CompositionTimeTableRow":{"title":"CompositionTimeTableRow","type":"object","properties":{"stationShortCode":{"type":"string","example":"HKI"},"stationUICCode":{"type":"integer","format":"int32","example":1},"countryCode":{"type":"string","example":"FI"},"type":{"type":"string","enum":["ARRIVAL","DEPARTURE"]},"scheduledTime":{"type":"string","format":"date-time"}},"description":"Describes a point in a trains schedule where its composition changes"},"JourneySection":{"title":"JourneySection","type":"object","properties":{"beginTimeTableRow":{"$ref":"#/components/schemas/CompositionTimeTableRow"},"endTimeTableRow":{"$ref":"#/components/schemas/CompositionTimeTableRow"},"locomotives":{"uniqueItems":true,"type":"array","description":"List of locomotives used on this leg","items":{"$ref":"#/components/schemas/Locomotive"}},"wagons":{"uniqueItems":true,"type":"array","description":"List of wagons used on this leg","items":{"$ref":"#/components/schemas/Wagon"}},"totalLength":{"type":"integer","description":"Total length of the train with an accuracy of 1 m","format":"int32"},"maximumSpeed":{"type":"integer","description":"Maximum with an accuracy of 1 km/h","format":"int32"}},"description":"Describes a leg where train's composition is in effect"},"Locomotive":{"title":"Locomotive","type":"object","properties":{"location":{"type":"integer","description":"Location of the locomotive in the train. 1=start of the train","format":"int32","example":1},"locomotiveType":{"type":"string","example":"Sm3"},"powerType":{"type":"string","example":"S"},"vehicleNumber":{"type":"string","example":"94102081010-2"}},"description":"List of locomotives used on this leg"},"Wagon":{"title":"Wagon","type":"object","properties":{"wagonType":{"type":"string","example":"Ed"},"location":{"type":"integer","format":"int32","example":1},"salesNumber":{"type":"integer","description":"Wagon number in customer's ticket","format":"int32","example":1},"length":{"type":"integer","description":"Wagon length in centimeters","format":"int32","example":2640},"playground":{"type":"boolean"},"pet":{"type":"boolean"},"catering":{"type":"boolean"},"video":{"type":"boolean"},"luggage":{"type":"boolean"},"smoking":{"type":"boolean"},"disabled":{"type":"boolean"},"vehicleNumber":{"type":"string","example":"94102081010-2"}},"description":"List of wagons used on this leg"}}},"tags":[{"name":"siri","description":"Returns real-time data in SIRI Nordic format"},{"name":"train-tracking","description":"Returns detailed information about train's location"},{"name":"track-work-notifications","description":"Returns track work notifications"},{"name":"traffic-restriction-notifications","description":"Returns traffic restriction notifications"},{"name":"netex","description":"Returns data in NeTEx Nordic format"},{"name":"live-trains","description":"Returns trains that have been recently active"},{"name":"metadata","description":"Returns supporting metadata. For example list of stations"},{"name":"routesets","description":"Returns routesets"},{"name":"train-locations","description":"Train locations"},{"name":"compositions","description":"Returns compositions of trains"},{"name":"gtfs","description":"Returns trains as gtfs"}]}