Types
Below are all the available GraphQL types and fields. Please refer to the getting started guide for detailed information and examples on how to use the API.
Try it out
Explore the GraphQL Schema and start making requests with the interactive API console. Visit the console
Query
getLocations
Get location matching given query string
getAllLocations
Get all available locations
- Returns:
[Location!]!
getJourneys
Get journeys between origin and destination on given date
- Returns:
[Journey!]!
- Arguments:
- origin:
ID!
Origin location uid
- destination:
ID!
Destination location uid
- date:
Date!
Date of departure
- filter:
JourneyFilterInput
Optional filter for journey search
- via:
[ViaInput!]
Optional via stopovers
- passengers:
[PassengerPlaceholderInput!]
Passenger details required for availability
- origin:
getJourneyOffer
Get fares for given journey, prefer socket
- Returns:
JourneyOffer!
- Arguments:
- journey:
ID!
Id of Journey to get fares for
- passengers:
[PassengerPlaceholderInput!]!
Passenger details
- currency:
String
(default: "EUR")Currency to display prices in
- isPassholder:
Boolean
(default: false)Whether the passenger is a passholder
- journey:
getJourneyForBlueprint
Get journey for given blueprint
- Returns:
Journey
- Arguments:
- blueprint:
ID!
Blueprint id to get journey for
- date:
Date!
Date of departure
- passengers:
[PassengerPlaceholderInput!]
Passenger details required for availability
- blueprint:
getPassBundles
Get applicable pass bundles for given passengers
- Returns:
[PassBundle!]!
- Arguments:
- passengers:
[PassPassengerInput!]!
Passenger details
- filter:
PassBundleFilterInput
Optional filter for pass bundles
- currency:
String
(default: "EUR")Currency to display prices in
- passengers:
getPassBundlesForJourneyOffer
Get applicable pass bundles for given journey offer
- Returns:
[PassBundle!]!
- Arguments:
- journeyOffer:
ID!
Id of journey offer to get pass bundles for
- passengers:
[PassPassengerInput!]
Passenger details
- filter:
PassBundleFilterInput
Optional filter for pass bundles
- currency:
String
(default: "EUR")Currency to display prices in
- journeyOffer:
getJourneyRatings
Get comparative rating for journeys
getTicketingFee
Get fee for issuing tickets
- Returns:
Money
- Arguments:
node
Get anything with an ID
getSalesAgent
Get sales agent details
- Returns:
SalesAgent
Mutation
createBooking
Create a booking
- Returns:
Booking!
- Arguments:
updateBooking
Update an existing booking
- Returns:
Booking!
- Arguments:
- id:
ID!
Id of booking to update
- passengers:
[FullPassengerInput!]
Passenger details to update
- selections:
[BookingSelectionInput!]
Booking selections to update
- id:
createPayment
Create a payment which, once fulfilled, will create and finalize the order
- Returns:
Payment!
- Arguments:
createOrder
Confirm booking selections and prebook fares
- Returns:
Order!
- Arguments:
finalizeOrder
Finalize order and fetch tickets
Subscription
getJourneys
Get journeys between origin and destination on given date
- Returns:
[Journey!]!
- Arguments:
- origin:
ID!
Origin location uid
- destination:
ID!
Destination location uid
- date:
Date!
Date of departure
- filter:
JourneyFilterInput
Optional filter for journey search
- via:
[ViaInput!]
Optional via stopovers
- passengers:
[PassengerPlaceholderInput!]
Passenger details required for availability
- origin:
getJourneyOffer
Get fares for given journey
- Returns:
JourneyOffer!
- Arguments:
- journey:
ID!
Id of Journey to get fares for
- passengers:
[PassengerPlaceholderInput!]!
Passenger details
- currency:
String
(default: "EUR")Currency to display prices in
- isPassholder:
Boolean
(default: false)Whether the passenger is a passholder
- journey:
getJourneyForBlueprint
Get journey for given blueprint
- Returns:
Journey
- Arguments:
- blueprint:
ID!
Blueprint id to get journey for
- date:
Date!
Date of departure
- passengers:
[PassengerPlaceholderInput!]
Passenger details required for availability
- blueprint:
Objects
AnonymousLocation
A station where stops may be made but journeys cannot be planned from/to
Fields
- name:
String!
Availability
Ticket availablility
Fields
- status:
AvailabilityStatus!
- accommodations:
[Accommodation!]
- ticketClasses:
[TicketClass!]
- priceFrom:
Money
Accommodation
Accommodation
Fields
- category:
AccommodationCategory!
- description:
String
AdmissionPart
The part of an offer that covers admission, i.e. being allowed to board the train
Fields
- conditions:
[ReturnCondition!]!
- flexibility:
FlexibilityCategory!
- serviceClass:
ServiceClass!
- segments:
[Segment!]!
- price:
Money
AdmissionAndReservationPart
The part of an offer that covers reservations, i.e. a seat or bed
Fields
- conditions:
[ReturnCondition!]!
- flexibility:
FlexibilityCategory!
- serviceClass:
ServiceClass!
- segments:
[Segment!]!
- price:
Money
BlueprintJourney
The journey is planned according to a Itinerary Blueprint
Fields
- id:
ID!
- status:
JourneyStatus!
- itinerary:
[ItineraryItem!]
BookingFare
A bookable fare offer for a journey
Fields
- id:
ID!
- name:
String!
- price:
Money!
- description:
String
- placePreferences:
[PlacePreference!]
- compartmentTypes:
[CompartmentType!]
- flexibility:
Flexibility
Booking
Non-finalized offer for collection order details
Fields
- id:
ID!
- expiresAt:
DateTime
- ticketingFee:
Money
- totalPrice:
Money
- passengers:
[Passenger!]
- selections:
[BookingSelection!]
- requirements:
PassengerRequirements
- termsAndConditions:
[String!]
CompartmentType
A compartment type for a fare, e.g. Sleeper or Couchette
Fields
CheckInResource
Resource that can be accessed for check-in and ticket issuing
Fields
- url:
String!
ExpertJourney
The journey is planned according to a predefined route
Fields
- id:
ID!
- status:
JourneyStatus!
- itinerary:
[ItineraryItem!]
Flexibility
Flexibility of a fare
Fields
- category:
FlexibilityCategory
- returnPolicies:
[ReturnPolicy!]!
The return policies are only available once the fare is part of a booking
FareReturnCondition
The conditions for returning a part of the fare
Fields
- description:
String!
- part:
FarePart!
- type:
ReturnType!
- price:
Money
FullPassenger
All passenger details
Fields
- type:
PassengerType!
- id:
ID!
- firstName:
String
- lastName:
String
- age:
Int
- tel:
String
- email:
String
- birthDate:
Date
- title:
PassengerTitle
- countryResidence:
String
- isContactPerson:
Boolean
- nationality:
String
- passportNumber:
String
- placeOfBirthCity:
String
- placeOfBirthCountry:
String
FileResource
File resource
Fields
GeoJsonPoint
Coordinates of a given location
Fields
GenericOrderItem
An inspecified item in an order
Fields
JourneyOffer
Fare result produced by a given journey
Fields
- id:
ID!
- status:
JourneyStatus!
- itinerary:
[ItineraryItem!]
JourneySelection
The journey selected for an offer
Fields
- itinerary:
[ItineraryItem!]!
JourneyFare
A fare offer for a journey
Fields
- id:
ID!
- name:
String!
- price:
Money!
- flexibility:
Flexibility
JourneyOfferSelection
Selected fare offers
Fields
- journey:
JourneySelection!
- fares:
[SelectedFare!]!
JourneyOrderItem
Journey fare of placed order
Fields
- segments:
[Segment!]!
- fare:
SelectedFare!
- resources:
[OrderResource!]
Location
Known location from and to which journeys can be planned
Fields
- uid:
ID!
- name:
String!
- countryCode:
String!
- coordinates:
GeoJsonPoint!
Money
Monetary sum (in cent) of specified currency
Fields
NonStopJourney
The journey is the optimal route without any stopovers
Fields
- id:
ID!
- status:
JourneyStatus!
- itinerary:
[ItineraryItem!]
NoChargeRedirect
No charge required
Fields
Operator
Operator details
Fields
- name:
String!
- image:
FileResource
Offer
An offer for a journey
Fields
- accommodation:
Accommodation!
- comfortClass:
String!
Comfort class name, e.g. Estandár, Standard Premium, Business etc.
- flexibility:
FlexibilityCategory!
- parts:
[OfferPart!]!
- price:
Money!
Order
Finalized order
Fields
- id:
ID!
- status:
OrderStatus!
- reference:
String!
- items:
[OrderItem!]
- passengers:
[FullPassenger!]
PlanningPeriod
Period for which a serivce is scheduled to run
Fields
- startDate:
Date!
- endDate:
Date!
- bitfield:
String!
A bitfield string representation of the days of service. Each bit in the bitfield corresponds to a specific day, starting from the
startDate
and ending on theendDate
. The bitfield is encoded as a hexadecimal string, where each hexadecimal character represents 4 days (bits).
PiggybackJourney
The journey is partially based on a predefined route
Fields
- id:
ID!
- status:
JourneyStatus!
- itinerary:
[ItineraryItem!]
PlacePreference
Possible place preferences
Fields
PassengerBundle
Passengers grouped by type
Fields
- count:
Int!
- type:
PassengerBundleType!
PassBundle
Bundle of Interrail passes
Fields
- id:
ID!
- class:
String
- product:
String!
- price:
Money!
- passengers:
[PassengerBundle!]!
- travelDayCount:
Int
- validityPeriod:
Duration
PassengerPlaceholder
The minium passenger details
Fields
- type:
PassengerType!
- id:
ID!
- age:
Int
PassengerRequirements
Details required for all passengers
Fields
- countryResidence:
Boolean!
- dateOfBirth:
Boolean!
- email:
Boolean!
- nationality:
Boolean!
- passportNumber:
Boolean!
- placeOfBirthCity:
Boolean!
- placeOfBirthCountry:
Boolean!
- title:
Boolean!
- tel:
Boolean!
- firstName:
Boolean!
- lastName:
Boolean!
PassBundleSelection
Selected Interrail bundle
Fields
- product:
String!
- class:
String
- price:
Money!
- passengers:
[PassengerBundle!]!
- travelDayCount:
Int
- validityPeriod:
Duration
PdfTicket
Ticket issued in PDF format for download
Fields
- url:
String!
PassBundleOrderItem
Interrail pass of placed order
Fields
- passenger:
FullPassenger!
- code:
String
- class:
String
- product:
String!
- price:
Money!
- travelDayCount:
Int
- validityPeriod:
Duration
ReservationPart
The part of an offer that covers reservations, i.e. a seat or bed
Fields
- conditions:
[ReturnCondition!]!
- flexibility:
FlexibilityCategory!
- serviceClass:
ServiceClass!
- segments:
[Segment!]!
- price:
Money
ReturnCondition
The conditions for returning
Fields
- description:
String!
- type:
ReturnType!
ReturnPolicy
A part of the fare that can be returned
Fields
- segments:
[Segment!]!
- conditions:
[FareReturnCondition!]!
RateLimit
Rate limit imposed for an agent
Fields
- limit:
Int!
- remaining:
Int!
- resetAt:
DateTime!
- resource:
String!
- unit:
RateLimitUnit!
ServiceBrand
The brand of the service
Fields
- name:
String!
- image:
FileResource
Segment
Individual train segment (physical train)
Fields
- origin:
Stop!
- destination:
Stop!
- departureAt:
DateTime!
- arrivalAt:
DateTime!
- duration:
Int!
- transport:
Transport!
- operator:
Operator!
- serviceBrand:
ServiceBrand
- identifier:
String
- direction:
String
- services:
[String!]!
Stopover
Location for an overnight stopover
Fields
SegmentCollection
Set of segments that make up a journey leg
Fields
- status:
SegmentCollectionStatus!
- segments:
[Segment!]
- fares:
[Fare!]
- availability:
Availability
- planningPeriod:
PlanningPeriod
- polylines:
[String!]
Strings representing series of Positions encoded using the Google Maps Polyline algorithm, may require decoding. See https://
developers.google.com/ maps/ documentation/ utilities/ polylinealgorithm
SmartJourney
The journey has been segmented into several travel days for comfort
Fields
- id:
ID!
- status:
JourneyStatus!
- itinerary:
[ItineraryItem!]
SelectedFare
The selected fare of a journey offer
Fields
- id:
ID!
- name:
String!
- price:
Money!
- description:
String
- placePreference:
PlacePreference
- compartmentType:
String
- flexibility:
Flexibility
StripePayment
Payment using Stripe
Fields
SalesAgent
An authorized agent interacting with the API
Fields
- uid:
String!
- email:
String
- tel:
String
- paymentMethod:
PaymentMethod!
- rateLimits:
[RateLimit!]!
TicketClass
The class of an available ticket
Fields
- comfortClass:
String!
- serviceClass:
ServiceClass!
TicketOnDeparture
Ticket which can be retrieved on departure
Fields
- reference:
String!
Ticket collection reference
- description:
String!
Instructions on how to retrieve the ticket
Interfaces
Node
Any unique resource with an ID
Fields
- id:
ID!
Stop
Generic train stop
Fields
- name:
String!
OfferPart
One part that makes up an offer
Fields
Journey
Journey result produced by any given search algorithm
Fields
- id:
ID!
- status:
JourneyStatus!
- itinerary:
[ItineraryItem!]
Fare
Fare offer for given itinerary item
Fields
- id:
ID!
- name:
String!
- price:
Money!
- flexibility:
Flexibility
Passenger
A passenger with minimal details
Fields
- type:
PassengerType!
- id:
ID!
- age:
Int
Payment
Payment to be settled for an order
Fields
Resource
Generic resource
Fields
Enums
Transport
The mode of transport
Values
- NIGHT_TRAIN
- TRAIN
- BUS
- FERRY
- NIGHT_BUS
JourneyStatus
The current status for a fare search result
Values
- LOADING
- SUCCESS
- ERROR
SegmentCollectionStatus
The current status of a leg of a fare search result
Values
- LOADING
The request is loading
- SUCCESS
The request was successful
- INDETERMINATE
Could not determine status
- UNKNOWN
An unexpected error occurred
- ONE_DAY
Allow at least one day from todays date
- NO_FARES
No fares available
- NO_TIMETABLE
No timetable available
- UNABLE_TO_SELL
No availability
- OUTSIDE_TIMETABLE
No availability for the requested date
PassengerType
The type of passenger
Values
- ADULT
Ages 28-59
- YOUTH
Ages 0-27
- SENIOR
Ages 60+
PassengerBundleType
The resulting product type definition for a passenger
Values
- ADULT
- SENIOR
- YOUTH
- CHILD
PassengerTitle
The perferred title of a passenger (required by carriers)
Values
- MR
- MS
- MX
OrderStatus
Current status of an order
Values
- CONFIRMED
Order is confirmed
- PENDING_CONFIRMATION
Order is partially confirmed
- PENDING_PRE_BOOK
Order has not yet been pre booked or confirmed
- PRE_BOOKED
Order has been pre booked, but not yet confirmed
- REFUNDED
The order has been refunded
- UNKNOWN
Unknown state
JourneyType
Type of journey
Values
- BLUEPRINT
- NON_STOP
- SMART
AvailabilityStatus
The current availability of a journey
Values
- LOADING
The request is loading
- AVAILABLE
The request was successful
- UNKNOWN
An unexpected error occurred
- SOLD_OUT
Fares are sold out
AccommodationCategory
The type of accommodation available
Values
- SEAT
A seat in a shared compartment or open-plan coach
- BERTH
A couchette berth in a shared compartment
- BED
A comfortable bed in a shared or private compartment
- UNKNOWN
Accommodation is unknown
FlexibilityCategory
Flexibility of a fare
Values
- NON_FLEX
No refunds or exchanges
- SEMI_FLEX
Partly refundable or exchangeable
- FULL_FLEX
Fully refundable or exchangeable
- UNKNOWN
Flexibility is unknown
ReturnType
Type of return covered by a return policy
Values
- EXCHANGE
- REFUND
- UNKNOWN
FarePart
Part of fare covered by a return policy
Values
- ADMISSION
- RESERVATION
ServiceClass
Normalized class of service
Values
- BEST
Best class available, premium comfort with top-tier amenities and exclusive services
- HIGH
Standard first class, high comfort with enhanced seating and additional perks
- STANDARD
Standard second class, balanced service with essential comfort and amenities
- BASIC
Most economical class available, minimal service focused on affordability and essential needs
- UNKNOWN
Service class is not known
PaymentMethod
Valid agent payment method
Values
- INVOICE
- WALLET
- STRIPE
RateLimitUnit
The unit for a given rate limit
Values
- HOUR
- DAY
Unions
ItineraryItem
Items that can make up the itinerary of a Journey
Possible types
BookingSelection
Selections that can be part of a booking
Possible types
OrderItem
Items that can be part of an order
Possible types
OrderResource
A resource associated with an order
Possible types
Scalars
Date
Date string (ISO 8601 – YYYY-MM-DD
)
DateTime
Naive date and time string, seconds omitted (ISO 8601 – YYYY-MM-DDThh:mm
)
Duration
ISO 8601 formatted string, e.g. PT2H15M, P2D, P1M
ID
The ID
scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4"
) or integer (such as 4
) input value will be accepted as an ID.
String
The String
scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Float
The Float
scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://
Int
The Int
scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Boolean
The Boolean
scalar type represents true
or false
.
Inputs
ViaInput
Via stopover for a journey
Fields
PassPassengerInput
Passenger details for passholder
Fields
- type:
PassengerType!
- age:
Int
- countryResidence:
String
- nationality:
String
PassengerPlaceholderInput
Placeholder for passenger details
Fields
- type:
PassengerType!
- age:
Int
FullPassengerInput
Full passenger details
Fields
- id:
ID!
- email:
String
- tel:
String
- birthDate:
Date
- firstName:
String
- lastName:
String
- isContactPerson:
Boolean
- title:
PassengerTitle
- countryResidence:
String
- nationality:
String
- passportNumber:
String
- placeOfBirthCity:
String
- placeOfBirthCountry:
String
FareSelectionInput
Selection of fare for a journey offer
Fields
BookingSelectionInput
Selection for a booking
Fields
- fare:
FareSelectionInput
JourneyFilterInput
Filter for journey search
Fields
- types:
[JourneyType!]
PassBundleFilterInput
Filter for pass bundles
Fields