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.

BookingAction

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.

RailPricingSolution

These required RailPricingSolution attributes are returned in the Rail Availability results:

  • RailJourney, which contains the RailSegment.

  • RailJourneyRef.

  • RailPricingInfo, which provides a pricing breakdown.

    • /RailFare @RailFareComponent:
      • Allows a customer to pass in a discount card per passenger that applies individually.
      • Returns Fare Component and Discount Information in the Rail Fare Information as part of the LowFareSearchRsp/AsynchRsp, RailAvailabilitySearchRsp, and RailCreateReservationReq/Rsp.

Email

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:

  • If the Agency email ID sent in second or any subsequent booking traveler, then the email ID is saved in Universal Record, but is NOT sent in RCS request.
  • Thus, the customer should send the Agency email ID ONLY in the first booking traveler element.

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.

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.

Errors and Warnings

See SNCF Exceptions for details.

 

Exceptions