Creating Rail Bookings
Rail booking creates a rail reservation based on the available options from a Rail Availability or Low Fare Shopping response.
Request
Rail reservations are booked using RailCreateReservationReq.
Minimum Data
Data required for the Rail Booking can be taken from the Rail Availability or Low Fare Shopping response. If a reference to an existing Universal Record is indicated, the rail segment is added to the PNR. If no Universal Record exists for this booking, a new PNR is created.
In addition to the baseline data required for a PNR, additional data is required specifically for a rail reservation. Unless otherwise noted, all of the elements are direct children of RailCreateReservationReq.
Note: All required data includes a Key attribute which uniquely identifies that chunk of data across multiple transactions in a stateless (sessionless) environment.
Element/Attribute |
Description |
---|---|
BookingTraveler |
If a new Universal Record and PNR must be created for the rail booking, Booking Traveler information must be included. If the rail booking is being added to an existing Universal Record, the UR must be retrieved and modified to add a rail booking. Each infant in a booking is associated with an adult. If there are more infants then adults, an error message is returned in the response. |
LoyaltyCard |
Required if a loyalty membership number is used. Requires the supplier (vendor) code and member number. See the Discount and Loyalty Cards section in Optional Data. |
Indicates the Booking Action Type required for the Booking request: Initiate (for provisional/hold bookings), Final FinalTicket, and Ticket. Included or excluded data in the request varies by Booking Action Type, and supported Booking Action Types vary by supplier. |
|
These required RailPricingSolution attributes are returned in the Rail Availability results:
|
|
Prior to Universal v48.0, when there were two email addresses sent in the BookingTraveler request, only the first email address is considered as a passenger email address, and the rest of the email address were ignored. The enhancements in Universal v48.0 and later allows the ability to include both the passenger email address, and the agency email address to manage fulfillment, in a Rail book request. Both email addresses are recognized in rail vendor's system. For example, the agent can send a RailCreateReservationReq for vendor type 2C with BookingActionType as "FinalTicket", and have the Passenger Email Id and FulfillmentType as "Ticket By Email," and Agency EmailId under RailCreateReservationReq/BookingTraveler/Email with the Type as "Agency" IMPORTANT: The Agency email from first booking traveler is only sent to RCS:
Two email addresses can be entered in RailCreateReservationReq/BookingTraveler/Email The Passenger and Agency emails displays in RailCreateReservationRsp/UniversalRecord/BookingTraveler/Email |
Optional Data
In RailJourney, the optional RailLocOrigin and RailLocDestination attributes can be sent to request a specific train station. If the UCode value sent in the attribute is not found, an error is returned: "Unknown rail location: #", where # is the RailLocOrigin or RaiLocDestination value.
At least one IATA or UCode must be sent in the book request in the attributes: Origin, Destination, RailLocOrigin, or RailLocDestination in the RailJourney, RailJourney/RailSegment, or RailPricingInfo/RailFare elements or an error is returned in the response and the request fails.
Note: Earlier schemas only support FareReference with "StringLength1to8". If the FareReference value that is returned is larger than eight characters, it is truncated, and a warning message is returned: "The RailFare @ FareReference value has been truncated. The complete FareReference value is #.", where # is the complete FareReference value. The booking does not fail.
Universal API provides the ability to request an actual seat number or a seat that is near to another seat. A seat number must be known by the customer in order to request it or a seat near to it. The optional element, RailSpecificSeatAssignmet, is used in the RailCreateReservationReq to Request an actual seat number or a seat near-to an actual seat number. The coach number and seat number returned in the Rail Create Reservation Response is saved and stored in the Universal Record History.
- Customers booking SNCF must have a role in their SNCF profile to allow a request for an actual seat. The customer must contact SNCF for this authorization.
- This request is not a part of Rail Seat Map or Rail Modify.
- Various warnings may return depending on vendor.
Discount and/or Loyalty cards may be sent in a RailAvailability request, and in the RailCreateReservation request. If the vendor does not support discount or loyalty cards, a warning is returned. The list of valid codes is obtained using the TypeCode="RailDiscountLoyalty" in the ReferenceDataRetrieve utility. For example: util:ReferenceDataRetrieveReq/@TypeCode. See the Exceptions section below for supplier-specific information.
The Loyalty Card is required if a loyalty membership number is used. Requires the supplier (vendor) code and member number.
Note: When a RailCreateReservationReq is sent with an existing Universal Record locator code and the BookingTraveler name in the new booking is the same as the BookingTraveler name in the UR, the MembershipProgram and CardNumber attributes in LoyaltyCard are added to the BookingTraveler in the UR. A new BookingTraveler element is not created. If the BookingTraveler LoyaltyCard information is the same as the information in the UR, the MembershipProgram and CardNumber are not added to the BookingTraveler in the UR.
A Special Service Request (SSR) is a message sent directly to suppliers to communicate traveler preferences, special services needed by a traveller such as wheelchair assistance, or of a procedural requirement necessary of the supplier. Because action must be taken by the supplier, there is usually a reply from the supplier in the form of the status code on the SSR (HK, UN, etc.)
filters any SSR data that will not be accepted by a specific rail supplier.
RetrieveProviderReservationDetails is a Boolean attribute.
- When set to false (default), the response displays provider details using UniversalRecord/ProviderReservationInfo/ProviderReservationDetails.
- When set to true, ProviderReservationDisplayDetailsList displays in the response in UniversalRecord/ProviderReservationInfo. This element displays some details of the PNR elements that are not otherwise returned in the Universal Record.
Universal versions prior to v29.0 will not return the ProviderReservationDisplayDetailsList element.
Response
The Universal Record History captures data from the booking, in case of exchange or refund. When RailPricingInfo is written to UR History, the ApproximateTotalPrice is captured if it is available and different than the TotalPrice.
If the credit card number is returned in the CardNumber attribute of the PaymentCard element, it is mapped to the Number attribute in the CreditCard element. If CardNumber is not returned, but a masked credit card number is returned in the MaskedCardNumber attribute of the PaymentCard element, the MaskedCardNumber is mapped to CreditCard/Number.
If there is a DiscountCode in the response, it is referenced with the Booking Traveler, and the association is saved in the Universal Record database.
Locators may be returned for the supplier and the provider in RailReservation/SupplierLocator.
If RCS does not return FareClass in the response, CabinClass="Economy" will be mapped. In older schemas, CabinClass= "Standard" is mapped.
The Loyalty Card information in the response (BookingTraveler/LoyaltyCard @ MembershipProgram and CardNumber) is saved in the Universal Record database. Loyalty card information is not taken from the request and added to the response.
Universal API compares the corporate DiscountCode values in a RailAvailabiltySearchReq with the DiscountCode values returned in RCS:
- With Rail v35.0 and later, this logic is replicated in additional services to return the DiscountCode values at the passenger level in the Rail Create Reservation Response, Rail Exchange Quote Response, and Rail Exchange Response.
- The /DiscountCard @Code @Description @Number is mapped in the RailCreateReservationRsp/UniversalRecord/BookingTraveler path.
@BookingStatusIn Universal 2.0, a Booking Status was added for booked or modified Rail segments. @BookingStatus is mandatory but the string value is not validated. Common values are: Final, Ticketed, Initiate, Exchanged, Cancel, Refunded, and Unknown.
There can be only one @BookingStatus value per booking. If there are multiple train segments in the booking, they must all have the same value.
/RailTicketInfoWith Rail.xsd, Universal API provides additional ticket information, such as journey reference, ticket type, traffic type (international or domestic), traveler reference, ticket advisory, and issue date.
Rail.xsd returns statuses:
- The attribute type is string to accommodate new statuses.
- The schema description has also been updated to reflect new status options: Status of Ticket. Example - Not Print Ready, Can Be Printed, Queued (sent to print module), Printed, Ticket issued, Ticket refunded, Ticket exchanged, Ticket cancelled by phone, Immediate cancellation, Ticket cancelled at station, Internal cancellation, Cancellation in progress, etc.
RailSegment@TransportCodeA TransportCode of "TER" for SNCF segments on a short route typically indicates a local train. SNCF does not confirm space on local trains. For local trains, a ticket can be purchased for travel on a local train, but no time of day and no seating accommodation is returned.
Errors and Warnings
- If the values for the Rail Segment attributes TrainTypeCode and TrainType sent by RCS are not found in Universal API, a value of "UNKNOWN" is returned in the TrainType attribute.
- If a passive segment is required, a PassiveCreateReservationReq is sent as a follow-on to RailCreateReservationReq. When RailCreateReservationRsp is successful, but PassiveCreateReservationRsp is not returned, the rail booking is made and the creation of the passive booking fails and returns a warning. However, the passive booking may have been successful in the rail distributor’s system. When the Universal Record is retrieved, both the RailReservation and the PassiveReservation are synchronized.
- If a split booking occurs in an SNCF (2C) booking, a warning is returned: Booking contains supplementary booking ids [SupplementaryID1, SupplementaryID2]. All subsequent transactions must be done directly with SNCF.
See SNCF Exceptions for details.
Exceptions
-
SSRs are not supported by Amtrak.
-
If multiple valid loyalty card numbers are sent in the book request, Amtrak only accepts the last loyalty number sent.
-
Discounts
-
Previously, Discount Codes sent for Amtrak in the Rail Booking request were ignored and booked without the discount code applied.
- With Rail v32.0, the Discount Code can be applied to the booking. The response returns the discounted fare.
- Only one Discount Code is supported for the Rail Booking request. If there are multiple Discount Codes in the Rail Booking request, Amtrak processes only the first code.
- Support for discount codes varies supplier.
-
ReferenceDataRetrieveService can be used to pull all the discount codes available for Amtrak. With Rail v33.0, six new DiscountCodes are added to the existing table. Most discounts require a number. The two military discount codes do not require a member number as the traveler will be asked for an active-duty ID card by the train conductor:
-
Code="162.DIS" for Amtrak Corporate Discount. Requires a number.
- Code="163.DIS" for Amtrak Promotion Code
- Code="164.DIS" for Amtrak Guest Rewards (AGR)
- Code="291.DIS" for Military traveller
-
Code="292.DIS" for Military Child
-
Code="293.DIS" for AAA Adult and requires AAA membership number
-
Code="295.DIS" for AAA Child and requires AAA membership number
-
Code="296.DIS" for NARP and requires National Association of Railroad Passengers membership number
-
Code="297.DIS" for Veterans Advantage and requires a membership number
-
- The
Corporate Discount or Promotion Code is associated with the Booking Traveler
in the RailCreateReservationReq. The Corporate Discount or Promotion Code
returned by Amtrak in the second shop response (see Amtrak
Exceptions in Rail Availability) should be sent for one passenger in a single-
or multi-passenger book request.
- If multiple Corporate Discount or Promotion Codes with: different Reference values are sent for one passenger in a single- or multi-passenger booking, each will be mapped to RCS at booking level.
- If multiple Corporate Discount or Promotion Codes with the same Reference values are sent for one passenger in a single- or multi-passenger booking, the Corporate Discount or Promotion Code is mapped once at booking level.
- If multiple Corporate Discount or Promotion Codes with different Reference values are sent for multiple Booking Travelers, all of them are mapped to RCS at booking level.
- If multiple Corporate Discount or Promotion Codes with the same Reference values are sent for multiple Booking Travelers, the Corporate Discount or Promotion Code is mapped once at booking level.
- Amtrak requires that the Corporate Discount or Promotion Code card number is sent in the request. Other rail distributors do not require the card number.
-
-
For Origin and Destination, Amtrak uses proprietary Amtrak station codes, rather than IATA city/airport codes.
-
Passive Amtrak segments are imported as rail segments, and Amtrak station codes, and corresponding time zone data, were added as a Reference Data table. As a result, passive segments from Amtrak can now be correctly imported as rail segments.
-
- Amtrak Station codes are supported in AirCreateReservationReq.
- For Amtrak (2V) bookings, Universal API checks the Rail Code table to identify location and time zone for the rail stations. If a match is not found, then Universal API uses the standard flow for Air, which checks for the city codes if an airport is not found.
-
-
FulfillmentType
-
@FulfillmentType=”Ticketless” indicates an Amtrak E-Ticket . An email address is required in the RailCreateReservation request. A delivery address should not be included. Up to three email addresses can be specified, and an E-Ticket will be sent to each one.
-
@FulfillmentType=”Ticket on Departure” indicates a pick up at the rail station . An email address is required in the RailCreateReservation request. A delivery address should not be included.
-
@FulfillmentType=”Standard Mail” indicates ticket by mail (TBM) . An email address is required and a delivery address must be in the RailCreateReservation request.
-
@FulfillmentType=”Express Mail” indicates ticket by courier. An email address is required and a delivery address must be in the RailCreateReservation request.
-
Eurostar does not use Rail Seat Map and Rail Booking for rail segments. Rather, Eurostar uses Air Seat Map and Air Booking to manage seating and reservations for rail segments.
-
SNCF does not confirm space on local trains. A train is considered to be local if RailSegment @TransportCode="TER" and the train is used on short routes. A ticket can be purchased for travel on a local train, but no time of day and no seating accommodation is returned.
-
SNCF accepts requests for wheelchairs. However, only 1 traveler per booking can request a wheelchair. The name of the traveler requesting a wheelchair should always be the 1st name in the booking.
-
@FulfillmentType="Ticketless" indicates a Ticketless Thalys train.
- Agency Email Addresses (RailCreateReservationReq/BookingTraveler/Email)
If the booking is being handled by a travel agency, the email address of the travel agency should always be the first email address in the Rail Booking request. This setting is especially necessary if FulfillmentType="TravelAgency".
- Form of Payment (RailCreateReservationReq/FormOfPayment/AgencyPayment)
SNCF Supports only Agency Payment, however, both AgencyPayment and Cash values are allowed as FormOfPayment in the Rail Booking request. Cash payment allows the agency to track that they have been paid in cash.
Note The response may show Cash, however, SNCF assumes AgencyPayment.
- Last Hold Dates for Tickets (RailCreateReservationRsp/UniversalRecord/ActionStatus Type="TTL" and corresponding @TicketDate value)
SNCF supports BookingStatus="Final" (travel documents are not issued) and BookingStatus="FinalTicket" (travel documents are issued). If BookingStatus="Final" a ticket time limit may optionally be returned in the RailCreateReservationRsp/UniversalRecord/ActionStatus Type="TTL" with a corresponding @TicketDate value.
- Split Bookings
SNCF splits a reservation into multiple bookings if:
- A single booking request is sent to SNCF for multiple passengers with different classes of service.
- A change is made directly with SNCF for individuals in an existing multi-passenger booking.
To reduce the probability of a booking being split, RCS implements logic to build fare offers only with fares in the same class of service for all requested passengers types. In some situations this logic may result in “no offers available” if the same class of service is not available for all of the segments requested for a journey.
However, if SNCF splits a booking, Universal API returns a warning to indicate that multiple Supplementary Booking IDs are present. In this case, the passenger or agent must contact SNCF directly to manage the bookings:
<ResponseMessage Type="Warning">Booking contains supplementary booking ids [SupplementaryID1, SupplementaryID2]. All subsequent transactions must be done directly with SNCF.</ResponseMessage>
The warning is returned in RailCreateReservationRsp if:
- The initial booking was split by SNCF, even though the fares in the requested offer were for the same class of service.
- There is a requested update to the Booking Status for an existing booking that has been split.
The warning is also returned when a booked segment is retrieved if a change was made directly with SNCF that resulted in the booking being split, or any other reason why SNCF found it necessary to split a booking.
The Supplementary Booking ID is processed by RCS, but is not returned in Universal API as discrete data. The Supplementary Booking ID is noted only in the warning response.