This operation is designed to
book a hotel or add a hotel reservation to an existing booking.
Following is simple example of an book
hotel request. Click the active line numbers to read further details.
1 <OTA_HotelResRQ
xmlns="http://www.opentravel.org/OTA" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opentravel.org/OTA
../../../html/OTASchemas/OTA_HotelResRQ.xsd" EchoToken="echo"
TimeStamp="2008-03-03T11:31:09Z" Target="Production"
Version="1" SequenceNmbr="1" LanguageId="EN"
ResStatusType="Commit">
2 <POS>
3 <Source>
4 <UniqueId URL=""
Type="ParsysOperatorCode" Id="db:usercode:password"/>
5 </Source>
6 </POS>
7 <HotelReservations>
8 <HotelReservation
xmlns="http://www.opentravel.org/OTA">
9
<ResComments>
10 <ResComment ResCommentRPH="1"
CommentOriginatorCode="" GuestViewable="true">
11 <Comment>Arriving late!</Comment>
12 </ResComment>
13 <ResComment ResCommentRPH="2"
CommentOriginatorCode="" GuestViewable="true">
14 <Comment>Paid with credit card</Comment>
15 </ResComment>
16 </ResComments>
17 <ResCommentRPHs>
18 <ResCommentRPH>1</ResCommentRPH>
19 <ResCommentRPH>2</ResCommentRPH>
20 </ResCommentRPHs>
21 <StayDateRange
StartDate="2008-04-03T00:00:00Z"
EndDate="2008-04-04T00:00:00Z"/>
22 <ResGuests>
23 <ResGuest
xmlns="http://www.opentravel.org/OTA" ResGuestRPH="0">
24 <ProfileRPHs>
25 <ProfileRPH>0</ProfileRPH>
26 </ProfileRPHs>
27 </ResGuest>
28 <ResGuest
xmlns="http://www.opentravel.org/OTA" ResGuestRPH="1">
29 <ProfileRPHs>
30 <ProfileRPH>1</ProfileRPH>
31 </ProfileRPHs>
32 </ResGuest>
33 </ResGuests>
34 <ResProfiles>
35 <ResProfile
xmlns="http://www.opentravel.org/OTA"
ResProfileRPH="0"><Profile ProfileType="Customer">
36 <Customer
BirthDate="1990-03-05T12:00:00Z">
37 <PersonName>
38 <NamePrefix>Mr.</NamePrefix>
39 <GivenName>Angel</GivenName>
40 <Surname>Martinez</Surname>
41 </PersonName>
42 </Customer>
43 </Profile>
44 </ResProfile>
45 <ResProfile
xmlns="http://www.opentravel.org/OTA" ResProfileRPH="1">
46 <Profile
ProfileType="Customer">
47 <Customer
BirthDate="1990-03-05T12:00:00Z">
48 <PersonName>
49 <NamePrefix>Mr.</NamePrefix>
50 <GivenName>Pablo</GivenName>
51 <Surname>Gonzalez</Surname>
52 </PersonName>
53 </Customer>
54 </Profile>
55 </ResProfile>
56 </ResProfiles>
57 <RoomStays>
58 <RoomStay
xmlns="http://www.opentravel.org/OTA" RoomType=""
RoomTypeCode="89379" InvBlockCode="0"
NumberOfRooms="1" RoomUseCode="2">
59 <GuestCounts>
60 <GuestCount Count="2"
AgeQualifyingCode="A"
xmlns="http://www.opentravel.org/OTA"/>
61 </GuestCounts>
62 <HotelReference HotelCode="67526"/>
63 <TimeSpan>
64
<DateTimeSpan StartInstant="2008-04-03T00:00:00Z"
EndInstant="2008-04-04T00:00:00Z"/>
65 </TimeSpan>
66 <ResGuestRPHs>
67<ResGuestRPH
xmlns="http://www.opentravel.org/OTA">0
68 </ResGuestRPH>
69 <ResGuestRPH
xmlns="http://www.opentravel.org/OTA">1
70 </ResGuestRPH>
71 </ResGuestRPHs>
72 </RoomStay>
73 </RoomStays>
74 <HotelReservationIDs>
75 <HotelReservationID
ResIDSource="" ResIDType="Reservation"
ResIDValue=""/>
76 <HotelReservationID
ResIDSource="" ResIDType="Locator"
ResIDValue=""/>
77 <HotelReservationID ResIDSource=""
ResIDType="YourRef" ResIDValue="ref"/>
78 </HotelReservationIDs>
79 <TPA_Extensions>
80 <PartyName>Mark Jameson</PartyName>
81 <ConfirmationStatus
Code="C"/>
82 <Board
Id="BB"/>
83 </TPA_Extensions>
84 </HotelReservation>
85 </HotelReservations>
86 </OTA_HotelResRQ>
This is the Hotel Availability Requests main tag. Note
all the attributes that must be included:
-
TimeStamp : Time in YYYY-MM-DD’T’HH-MM-SS’Z’ format.
-
Target : Always “Production”.
-
Version: By now, “1”.
-
LanguageId=Always ”EN”
-
SequenceNmbr=Always
“1"
-
AvailRatesOnly=
Always "true"
-
BestOnly=
Always "true"
-
RateRangeOnly=
Always "false"
-
ExactMatchOnly=
Always "true"
-
ResStatusType=Always "Commit"
Inside the request header, database, user code and
password have to be set. Otherwise the system will return an authentication
error.
This tag should include a “Source” subtag, and this,
another subtag “UniqueURL” containing the following attribute values:
-
URL: Should be set as empty value “”.
-
Type: Should be set as "ParsysOperatorCode"
-
ID: Should be set as “database:usercode:password”
Here
comes all the information about Hotel Booking.
Here comes guest
commentaries for the hotel and booking office, for example ‘guests will arrive
late’, ‘no-skoming room’ and so on.
Important: Although the tags are mandatory, the information could not be properly
delivered to hotel or booking office in some cases or could not be properly
checked.
This tag block is mandatory. Must look like as it does.
If you don’t want to leave any information, just leave tag Comment empy (see
below)
The reservation must include two ResComment tags (two
ResComments mandatory):
Attribute ResCommentRPH accepts values:
-
1 : Commentary for Hotel
-
2: Commentary for Booking Office.
CommentOriginatorcode must be always “” and GuestViewable
code must be set to “true”.
Here comes the commentary text. Mandatory tag. If you
don’t want to leave commentaries, just leave the text here after Comment tag
empty.
It is mandatory to have in all cases:
<ResCommentRPHs>
<ResCommentRPH>1</ResCommentRPH>
<ResCommentRPH>2</ResCommentRPH>
</ResCommentRPHs>
Must include the attributes “StartDateRange” and
“EndDateRange” for check-in and check-out dates. This dates must be in format
YYYY-MM-DD’T’HH-MM-SS’Z’
Here comes a mandatory enumeration of guests. Should look
like as follows:
<ResGuest
xmlns="http://www.opentravel.org/OTA" ResGuestRPH="0">
ResGuestRPH attribute should be a numeric value, representing the order of
guests in enumeration (0=first, 1=second…). This line should appears as many
times as number of guests in reservation.
After this, must inmediately follow the block for each guest:
<ProfileRPHs>
<ProfileRPH>0</ProfileRPH>
</ProfileRPHs>
ProfileRPH text should contain THE SAME VALUE than ResGuestRPH.
Here comes all the guests information. This tag block is also mandatory for
each of the guests in hotel reservation request.
The information that must be sent related to passengers is the following:
<Profile ProfileType="Customer">: This
tag is mandatory.
<Customer
BirthDate="1990-03-05T12:00:00Z">: Customer’s Birthday. BirthDate
accepts values in format YYYY-MM-DD’T’HH-MM-SS’Z’ . NOTE: This value IS
MANDATORY, AND THE PRICE CAN VARY DEPENDING ON WHAT YOU HAVE SET HERE (because
a child might become an adult!)
Also must include Prefix, Name and Surname.
<PersonName>
<NamePrefix>Mr.</NamePrefix>
<GivenName>Angel</GivenName>
<Surname>Martinez</Surname>
</PersonName>
Available prefixes are (NOTE: don’t miss the final ‘.’!)
-
Mr.
-
Mrs.
-
Ms.
Here comes all the room information. This tag block is also mandatory for
each of the rooms in booking request.
This tag and all the subtags must be include one time for
each room requested. The possible attribute values are:
RoomTypeCode: Room ID obtained fromavailability request
or from database
RoomUseCode:
-
0 : SINGLE ROOM
-
1: DOUBLE ROOM
-
2: TWIN BED ROOM
-
3: TRIPLE ROOM
-
4: 2ADULTS, 1 CHILD ROOM
-
5: QUADRUPLE ROOM
-
6: 2 ADULTS, 2 CHILDREN ROOM
NumberOfRooms: The value is allways 1 ( so you have to send one RoomStay for each requested room)
RoomType: Always set “”
InvBlockCode: Always set 0
Here comes the information about which guests are
associated with which room. This information is mandatory inside the RoomStay
tag.
This tag includes subtags indicating guests quantity and
code:
<GuestCount Count="2"
AgeQualifyingCode="A"
xmlns="http://www.opentravel.org/OTA"/>
-
Count accepts values: 1, 2…
-
AgeQualifyingCode: A for adult or C for children.
This tag is mandatory and must include the attribute
HotelCode with hotel code value obtained from availability.
Must include the attributes “StartDateRange” and
“EndDateRange” for check-in and check-out dates. This dates must be in format
YYYY-MM-DD’T’HH-MM-SS’Z’
This tags are mandatory and and should cointain the
guests order in total guests enumeration (see above) as following, for example:
<ResGuestRPHs>
<ResGuestRPH xmlns="http://www.opentravel.org/OTA">0
</ResGuestRPH>
<HotelReservationID ResIDSource=""
ResIDType="Reservation" ResIDValue=""/>
In case of ResIDType=”Reservation”, the values of
ResIDValue can be:
-
The travel file ID if you want to add this movement to a new travelfile.
-
“” if the travel file is new.
<HotelReservationID ResIDSource=""
ResIDType="Locator" ResIDValue=""/>
Locator must be “”, because in response you will get the
movement id of the booking.
<HotelReservationID ResIDSource=""
ResIDType="YourRef" ResIDValue="ref"/>
Ref: the agent reference of this movement.
This tag block is also mandatory and includes 2 sub-tags:
<PartyName>Mark Jameson</PartyName> : Lead
Name (person who books, can be a guests or not)
<ConfirmationStatus Code="C"/>: Code
attribute accepts values:
-
“C”: If in availability we got “C” as book status (Confirmed after Pending)
-
“P”: If in availability we got “P” as book status (Pending)
-
“N”: If in availability we got “N” as book status (Confirmed without
passing through Pending)
<Board Id="BB"/> This tag indicate the Meal plan requested.
If you do not send it the system applies the meal plan included in the tariff returned in availability response
-
“BB”: Bed and Breakfast
-
“HB”: Half board
-
“FB”: Full Board
-
“AI”: All Inclused
-
“RO”: Room Only