fbpx

Have any Question?

You can ask below or enter what you are looking for!

Retrieve Reservations

The connected PMS should retrieve reservations, modifications and cancellations from Effective Tours using the OTA_ReadRQ message.Effective Tours API will respond with aOTA_ResRetrieveRS that contain the reservations, modifications or cancellations that meet the request criteria in the read request.

The integrated PMS MUST return the reduced ‘Availability’ (BookingLimit) value via the ‘Inventory API’ immediately after a reservation has been delivered. It is expected that the integrated PMS will pass back ‘Availability’ changes (reduction or replenishment) once a reservation, modification or cancellation message has been processed to confirm availability.

OTA_ReadRQ

The message below will return all undelivered reservations, modifications and cancellations for the hotel with HotelCode ABC

Request all undelivered for a hotel

<OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+08:00" EchoToken="echo-abc123">
  <POS>
    <Source>
      <RequestorID Type="22" ID="PMS1"/>
    </Source>
  </POS>
  <ReadRequests>
    <HotelReadRequest HotelCode="ABC">
      <SelectionCriteria SelectionType="Undelivered"/>
    </HotelReadRequest>
  </ReadRequests>
</OTA_ReadRQ>

The message below will return all undelivered new reservation for the hotel with HotelCode ABC

Request undelivered reservations

<OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+08:00" EchoToken="echo-abc123">
  <POS>
    <Source>
      <RequestorID Type="22" ID="PMS1"/>
    </Source>
  </POS>
  <ReadRequests>
    <HotelReadRequest HotelCode="ABC">
      <SelectionCriteria SelectionType="Undelivered" ResStatus="Book"/>
    </HotelReadRequest>
  </ReadRequests>
</OTA_ReadRQ>

The message below will return all undelivered cancellations for the hotel with HotelCode ABC

Request undelivered cancellations

<OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+08:00" EchoToken="echo-abc123">
  <POS>
    <Source>
      <RequestorID Type="22" ID="PMS1"/>
    </Source>
  </POS>
  <ReadRequests>
    <HotelReadRequest HotelCode="ABC">
      <SelectionCriteria SelectionType="Undelivered" ResStatus="Cancel"/>
    </HotelReadRequest>
  </ReadRequests>
</OTA_ReadRQ>

The message below will return all undelivered modifications for the hotel with HotelCode ABC

Request undelivered modifications

<OTA_ReadRQ xmlns="http://www.opentravel.org/OTA/2003/05" Version="1.0" TimeStamp="2005-08-01T09:30:47+08:00" EchoToken="echo-abc123">
  <POS>
    <Source>
      <RequestorID Type="22" ID="PMS1"/>
    </Source>
  </POS>
  <ReadRequests>
    <HotelReadRequest HotelCode="ABC">
      <SelectionCriteria SelectionType="Undelivered" ResStatus="Modify"/>
    </HotelReadRequest>
  </ReadRequests>
</OTA_ReadRQ>

OTA_ReadRQ Specification

Element  NumberDescription
OTA_ReadRQ1Root element
@Version1Current Version 1.0
@EchoToken1Globally unique identifier for the request, value will be returned as an EchoToken in the response.
@TimeStamp1Time of the transaction in xml schema dateTime format
OTA_ReadRQ / POS / Source / RequestorID1This identifies the system which is sending the reservation. This element must appear in the first Source element.
@Type1Fixed at 22 (ESRP)
@ID1The ID used will be agreed by the trading partners and remain the same throughout the messages.
OTA_ReadRQ / ReadRequests1
ReadRequests / HotelReadRequest1
@HotelCode0..1Hotel code as recognised by pmsXchange. If omitted all reservations for the PMS will be returned.Note: This attribute is only optional for central property management systems. It is mandatory for on-site systems.
HotelReadRequest / SelectionCriteria1
@SelectionType1Must be “Undelivered”
@ResStatus0..1Allowed values are “Book”, “Modify” or “Cancel”. If omitted new, modified and cancelled reservations will be returned.

OTA_ResRetrieveRS

This message is returned by Effective Tours API in response to the OTA_ReadRQ. It’s primary payload is a list of HotelReservations which meet the request criteria in the OTA_ReadRQ.

Reservations that meet the request criteria are returned

Effective Tours API is channeling reservations from multiple different booking sources. The OTA_ResRetrieveRS Specification below has a number listed next to the node name to indicate if the node is mandatory or not. The OTA_ResRetrieveRS spec below is not designed to appear exactly in the order presented below. Coding to Effective Tours API should be flexible and allow for order variations to nodes/elements.

  • The <Success/> element indicates a successful response
  • In this example 2 new reservations are returned. As covered in Retrieve & Confirm Use Cases documents, the Effective Tours API reservation identifiers are “WTF-001” and “HTL-002” and the message ids for these reservations are “1243132” and “1243133”.
<tns:OTA_ResRetrieveRS Version="1.0" TimeStamp="2005-08-01T09:32:47+0000" EchoToken="echo-abc123">
  <tns:Success></tns:Success>
  <tns:ReservationsList>
    <tns:HotelReservation CreateDateTime="2007-12-09T08:51:45+00:00" ResStatus="Book">
      <tns:UniqueID Type="14" ID="WTF-001"/>
      <tns:UniqueID Type="16" ID="ETR-442570-1565094220-237891" ID_Context="MESSAGE_UNIQUE_ID"/>
      <!-- HOTEL RESERVATION DETAILS OMITTED -->
    </tns:HotelReservation>
    <tns:HotelReservation CreateDateTime="2007-12-09T08:51:45+00:00" ResStatus="Book">
      <tns:UniqueID Type="14" ID="HTL-002"/>
      <tns:UniqueID Type="16" ID="ETR-441670-1565160285-2102652" ID_Context="MESSAGE_UNIQUE_ID"/>
      <!-- HOTEL RESERVATION DETAILS OMITTED -->
    </tns:HotelReservation>
  </tns:ReservationsList>
</tns:OTA_ResRetrieveRS>
No reservations are found that meet the request criteria
  • The presence of the <Success/> element indicates successful processing but the lack of the ReservationsList element shows no reservations were available.
<tns:OTA_ResRetrieveRS Version="1.0" TimeStamp="2005-08-01T09:31:00+0000" EchoToken="echo-abc123">
  <tns:Success></tns:Success>
</tns:OTA_ResRetreiveRS>
An error occurred processing the request
  • The presence of the <Errors/> element indicates an error in business logic occurred.
<tns:OTA_ResRetrieveRS Version="1.0" TimeStamp="2005-08-01T09:31:00+08:00" EchoToken="echo-abc123">
  <tns:Errors>
    <tns:Error Type="3" Code="392">Invalid Hotel Code</Error>
  </tns:Errors>
</tns:OTA_ResRetreiveRS>

OTA_ResRetrieveRS Specification

The main payload of the OTA_ResRetrieveRS message is a list of HotelReservation elements. The content will vary because Effective Tours API is delivering reservations from many different upstream sources (Booking Channels), many of which have vastly different reservation formats and data structures. 

In general, the following can be said about HotelReservations:

  • HotelReservation represents a single reservation made with an upstream system.
  • HotelReservation can have one or more RoomStays, one for each room type booked.
  • RoomStay represents a stay in one room type over a continuous timespan, non-continuous timespan stays (split stays) will result in multiple RoomStays.
  • HotelReservation can have zero, one or many ResGuests linked to either the RoomStay the guest stay in or the reservation.

Elements and attributes marked with Number=1 or more are mandatory and will always be sent. 0..n means that the element or attribute is optional.

Element    NumberDescription
OTA_ResRetrieveRS1Root element
@Version1Current Version 1.0
@EchoToken1Globally unique identifier for the request, value will be returned as an EchoToken in the response.
@TimeStamp1Time of the transaction in xml schema dateTime format
OTA_ResRetrieveRS / Success0..1Should only be present if the request processed successfully. The Errors node will not be present if the Success node is present.
OTA_ResRetrieveRS / Errors0..1Contains a list of errors if the request failed to process.
Errors / Error1..nShould be at least one node if there is an Errors Node.
@Type1Mandatory if Error present. Any type from the OTA code table for ‘Error Warning Type (EWT)’ can be used. In particular, the following types are used
3: Biz rule (The business rules for the request message were not met)
4: Authentication error (If username and password are not authenticated)
6: Authorization error (If authenticated username is not authorized to alter hotel data)
10: Required field missing (If xml does not meet the schema, i.e missing request fields or invalid data types.)
@Code0..1Any code from the OTA code table for ‘Error Codes (ERR)’ can be used.
OTA_ResRetrieveRS / ReservationsList0..1ReservationList is only present if there are HotelReservation elements. 
ReservationsList / HotelReservation1..nAt least one reservation element if ReservationList exists.

HotelReservationType

Element  NumberDescription
@CreateDateTime1This is the date when the reservation was first made. Mandatory if ResStatus is “Book”.
@LastModifyDateTime0..1This indicates the last date and time when the reservation was last modified. Mandatory if ResStatus is “Modify” or “Cancel”.
@ResStatus1Status is “Book”, “Modify” or “Cancel”
HotelReservation / UniqueID1..2The reservation reference in Effective Tours. The first UniqueID element will contain the unique identifier for the entire reservation. This identifier will identify the reservation through any subsequent modifications or cancellations. The second UniqueID element with ID_Context=”MESSAGE_UNIQUE_ID” is the unique id for this message.This identifier should be used to confirm the message once processed
@Type1Value ’14’ is the unique id for the reservation in Effective Tours. Value ’16’ is the unique id for the message transferring the reservation.
@ID1Identifier of the reservation according to Effective Tours. Note, this is NOT the reservation id according to the upstream system. This is located in the HotelReservationID element.There is the possiblility that this ID will contain special characters such as ‘/’.
@ID_Context0..1Only present for the second UniqueID element and when present it will always be “MESSAGE_UNIQUE_ID”
HotelReservation / POS1Point of sale
POS / Source1..2Source of the reservation. A second POS / Source node can be present to define a secondary channel source.
Source / RequestorID0..1This identifies the system which is sending the reservation. This element will only appear in the first Source element.
@Type1Fixed at 22 (ESRP)
@ID1Value is always ‘EFFECTIVETOURS’
Source / BookingChannel1Contains booking channel information
@Primary1Indicates the primary booking source
@Type1Always ‘7’ for ‘Internet’.
BookingChannel / CompanyName1Name of the Booking Channel.NOTE: This name is subject to change/variation by the Booking Channel. Please use the @Code attribute below to identify Booking Channels on incoming reservations.
@Code0..1Effective Tours’s code to identify the Booking Channel. See the [OTA Booking Channel Type (BCT)]table for reference. For secondary channels this code may not be available, when present it will be the secondary channel code as provided by the source channel.
HotelReservation / RoomStays / RoomStay0..nOne instance of RoomStay per room booked. A RoomStay element will always exist if ResStatus is “Book” or “Modify”. If ResStatus is “Cancel” it is possible that no RoomStay element exists.
Reservation / ResGuests / ResGuest0..nOne instance of ResGuest per reservation guests. This guest information is dependent on the sometimes limited information retrieved from the booking agents. ResGuests might not always be directly linkable to the RoomStays. Either all ResGuests are linked to RoomStays or none are.
HotelReservation / ResGlobalInfo1Contains general information about the Reservation

ResGlobalInfo

Element  NumberDescription
HotelReservationIDs / HotelReservationID0..2Reference number/string or PNR as supplied by the Booking agent will be supplied here. If this reservation is linked under an itinerary, the itinerary id given by the source booking agent will be supplied in a second.
@ResID_Type1Will be sent as 14 or 26.14: OTA code for ‘Travel Agent PNR’. If this type is used the @ResID_Value will be the reservation identifier as provided by the source booking channel.26: OTA code for ‘Associated itinerary reservation’. If this type is used the @ResID_Value will be the itinerary identifier for one or more bookings in an itinerary as provided by the source booking channel.
@ResID_Value1Reference number/string supplied by the Booking agent. ResID_Value could potentially contain special characters such ‘/’.
Total0..1The total amount for the Reservation. Will add up to the sum of the RoomStay totals PLUS any additional fees sent by the BookingAgent.NOTE: It is possible that some OTAs do not provide any form of Rate information. As such we cannot guarantee Rate information will be provided.
Fees / Fee0..nA container for added fees
@Type1Always ‘Inclusive’
@Amount0..1Commission amount
Comments / Comment / Text0..nReservation comments
BasicPropertyInfo1Holds information about the Hotelier which this reservation is for.
@HotelCode1The code for the Hotel for which the booking was made.

ResGuestType

Element  NumberDescription
@PrimaryIndicator0..1When true indicates this is the primary guest
ResGuest / Profiles1Contains the guest profile information

RoomStayType

Element  NumberDescription
RoomStay / UniqueID1The room reference inside reservation.
@Type1Value ’17’ is the unique id for the room inside reservation in Effective Tours.
@ID1Identifier of the room inside reservation according to Effective Tours.
RoomStay / RoomTypes / RoomType0..1Container for room information, will be omitted if none was provided by the source channel. There will only ever be one RoomType per RoomStay
@RoomType0..1The name of the RoomType as provided by source channel
@RoomTypeCode0..1Room code, identifier for the room in Effective Tours
@ChannelRoomTypeCode0..1Room code, identifier for the room in the source channel
RoomType / RoomDescription / Text0..1A text description of the room
RoomStay / RatePlans0..1Container for room information, will be omitted if none was provided by the source channel
RatePlans / RatePlan0..nContains information for the Rate Plan(s) used for the RoomStay.
@RatePlanCode0..1Rate code, identifier for the rate plan in Effective Tours
@ChannelRatePlanCode0..1Rate code, identifier for the rate plan in the source channel
@RatePlanName0..1Name of the rate plan as provided the source channel
RatePlan / RateDescription / Text0..1A text description of the rate
RoomStay / RoomRates / RoomRate1..nMultiple RoomRates per RoomStay. Multiple rates are listed under each RoomRate. This can happen when there is a single room booked but more than one rate plan applies during the stay.
RoomStay / GuestCounts / GuestCount0..3How many guests will be staying in the room. The count is split over potentially three GuestCount elements under GuestCounts, one for each type of guest: adult, child or infant.
@AgeQualifyingCode1Specifies the guest type for this GuestCount – uses OTA Spec for identifiers, will be one of three values 10 – Adult, 8 – Child, 7 – Infant
@Count1The actual count for this type of guest
RoomStay / RoomGuests0..1Contains guest names for this room
RoomGuests / RoomGuest0..nContains guest name
@Name1Full guest name
RoomStay / TimeSpan1Contains the timespan which this RoomStay covers
@Start1Check in date
@End1Check out date
RoomStay / Total0..1The total amount of the RoomStay.
RoomStay / Total / Taxes 0..1 The total tax amount for the RoomStay
@Amount      0..1 The tax amount
RoomStay / BasicPropertyInfo1Holds information about the Hotelier which this reservation is for.NOTE: If you are requesting reservations for all your hotels, using a single OTA_ReadRQ (centralised) we recommend using [ResGlobal / BasicPropertyInfo / @HotelCode]
@HotelCode1The code for the Hotel for which the booking was made.

RoomRateType

Element  NumberDescription
RoomStay / RoomRates / RoomRate1..nMultiple RoomRates per RoomStay. Multiple rates are listed under each RoomRate. This can happen when there is a single room booked but more than one rate plan applies during the stay.
@RoomTypeCode1The code of the room booked
@NumberOfUnits1Always 1. Each room will be listed in it’s own RoomStay element.
@RatePlanCode1This is the rate booked for the room type code listed in the RoomTypeCode attribute.
RoomRate / Rates0..1Container for the daily rate breakdown information, if none was provided by the channel this will be omitted
Rates / Rate1..nThe Rate element contains a timespan with daily rate information. The dates covered in the Rates will cover all the dates in the RoomStay/TimeSpan element.
@RateTimeUnit1Always “Day”
@EffectiveDate1The date of the rate in the form yyyy-MM-dd.
@Amount1The amount charged for the Rate.

ProfilesType

Element  NumberDescription
Profiles / ProfileInfo1..nProfile information
ProfileInfo / UniqueID0..nContains profile ids provided by the source channel. There can 0 to many identifiers passed through here
@Type1This will always be “16” to represent ‘Reference’ from the OTA code table Unique Id Type (UIT)
@ID1The reference identifier for the profile as provided by the source channel
@ID_Context1This can be one of 2 values: CHANNEL: To specify that this is a channel reference id. IATA: To specify that this is an IATA identifier for a travel agent
ProfileInfo / Profile1Contains the profile information
@ProfileType1The type of profile
Profile / Customer
Customer / PersonName0..1Profile name details. Always present for type Customer.
PersonName / GivenName0..1The name of the profile. Always present for type Customer.
PersonName / Surname0..1The last name of the profile. Always present for type Customer.
Customer / Telephone0..1Contact telephone number for the profile if available
@PhoneNumber0..1The actual number, will be there if the Telephone element is there
Customer / Email0..1The email address of the profile if available
Customer / Address0..1Address information for the profile if available
Address / AddressLine0..nOne or more address lines for the profile
Address / CityName0..1Customer city of residence if available
Address / PostalCode0..1Post code for profile if available
Address / CountryName0..1Country name

TotalType

Element  NumberDescription
@CurrencyCode   0..1 The ISO currency code for the total
@AmountAfterTax  0..1 The total amount after tax
@AmountBeforeTax 0..1 The total amount before tax
Taxes       0..1 The total tax amount for the TotalType
@Amount      0..1 The total tax amount

Last Updated: Nov 26, 2019

—- —- —- —- —- —- —- — — — — —
Back to API Documentation