Max Interface v1

(Rev 0.5)

Deprecated. Not intended for new implementations.

Contents

Introduction

Max interface is based on the OpenTravel Alliance (OTA) standard, which is widely accepted by a large number of travel industry organizations and is de-facto a standard way of communication between different business partners. Our goal was to implement the interface without introducing any additional customizations to the OTA standard. However, the message handling and system behavior may not be consistent with other systems using the same standard. This document provides a brief overview of the basic messages and examples of their usage. For more information about the OTA specification please visit the OpenTravel Alliance website at http://www.opentravel.org .

Basic request structure and transmission

The selected protocol for message transmission is HTTPS.

All requests must be sent to the following URL:

https://maxif.maxbooking.com/maxif.php

Every request must also contain the credentials that you were assigned in the HTTP basic access authentication header.

The messages are sent using POST request method. You can choose to send the request in one of two different ways based on the content type:

  • application/x-www-form-urlencoded – The payload must be url encoded and placed in a variable named OTA_request.
  • application/xml – The payload is placed in the body of the request.

Example:

POST /maxif.php HTTP/1.1
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Host: maxif.maxbooking.com
Accept: application/xml
Content-Type: application/xml; charset=utf-8
Content-Length: 326

<?xml version="1.0" encoding="UTF-8"?>
<OTA_PingRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_PingRQ.xsd" Target="Test" Version="2.000" EchoToken="mytesttoken">
    <EchoData>myechodata</EchoData>
</OTA_PingRQ>

Common message attributes

  • Target – Used to indicate whether the request is for the Test or Production system. Supported values:
    • Test – Used for testing. The messages will not cause any changes in the database.
    • Production – Standard message. Default value.
  • EchoToken – A reference for additional message identification, assigned by the requesting host system. The response message includes an echo token with an identical value. Optional.

Authentication

Every message must contain an authentication part in the following format:

<POS>
    <Source>
        <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
    </Source>
</POS>

RequestorID element

This element contains the authentication credentials specified by these attributes:

  • Type - Reference to the type of the requester. Must be set to 10 ("Hotel" - according to the OpenTravel Unique Id Types)
  • ID – Your assigned property ID
  • MessagePassword – Your generated Max Interface password for the property (Max Admin Centre: Interfaces > Max Interface > Create new password )

OTA_ErrorRS

The standard OTA_ErrorRS message is designed to accommodate errors that result from processing a message.

<?xml version="1.0" encoding="UTF-8"?>
<OTA_ErrorRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_ErrorRS.xsd" Version="2.000" TimeStamp="2011-01-15T10:32:32+01:00" Status="NotProcessed"
ErrorCode="Validation"
ErrorMessage="Validation failed"></OTA_ErrorRS>

Attributes:

  • Status – An indication of the processing that was completed on the request message.
    • NotProcessed – The error occurred prior to processing of the request
    • Incomplete – The error occurred during processing of the request. The request was partially completed.
    • Complete – The error occurred after successful processing of the request. The requested process was completed.
    • Unknown – The status of the request is unknown.
  • ErrorCode
    • Unknown – Indicates an unknown error.
    • Malformed – The XML message was not well-formed.
    • Validation – The XML message did not pass the * validation check.
    • UnrecognizedRoot – An unrecognized payload root element was received.
    • Authentication – Authentication error.
    • Authorization – Authorization error.
    • Maintenance – The system is under maintenance.
  • ErrorMessage – A textual description to provide more information about the specific error.

List of supported requests and corresponding responses

OTA_PingRQ/RS

This message may be used for testing application connectivity. The specific text in the request message is to be echoed back in the response message. This message does not require authentication data to be included.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_PingRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_PingRQ.xsd" Target="Test" Version="2.000" EchoToken="test token">
    <EchoData>test data</EchoData>
</OTA_PingRQ>

EchoData

The free-text data that will be be echoed back in the response.

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_PingRS.xsd" Version="2.000" TimeStamp="2011-01-19T18:59:30+01:00" EchoToken="test token">
    <Success/>
    <EchoData>test data</EchoData>
</OTA_PingRS>

OTA_HotelDescriptiveInfoRQ/RS

This message allows you to query for specific property descriptive data.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelDescriptiveInfoRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelDescriptiveInfoRQ.xsd" Target="Test" Version="2.000">
    <POS>
        <Source>
            <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
        </Source>
    </POS>
    <HotelDescriptiveInfos>
        <HotelDescriptiveInfo HotelCode="215">
            <HotelInfo SendData="true"/>
            <FacilityInfo SendGuestRooms="true"/>
            <ContactInfo SendData="true"/>
        </HotelDescriptiveInfo>
    </HotelDescriptiveInfos>
</OTA_HotelDescriptiveInfoRQ>

HotelDescriptiveInfo

Indicates which specific information is requested.

Attributes:

  • HotelCode – Property ID

HotelInfo

Is used to indicate whether property information is being requested.

FacilityInfo

Is used to indicate whether rooms information is being requested.

ContactInfo

Is used to the indicate whether contact information is being requested.

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelDescriptiveInfoRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelDescriptiveInfoRS.xsd" Version="2.000"
TimeStamp="2011-01-15T14:28:45+01:00">
    <Success/>
    <HotelDescriptiveContents HotelCode="215" HotelName="Small Hostel">
        <HotelDescriptiveContent CurrencyCode="GBP" LanguageCode="en">
            <HotelInfo>
                <HotelName>Small Hostel</HotelName>
                <Services>
                    <Service Code="180" InvCode="2087">
                        <DescriptiveText>Bike Tour</DescriptiveText>
                    </Service>
                    <Service Code="180" InvCode="AI124">
                        <DescriptiveText>Cancellation Cover</DescriptiveText>
                    </Service>
                </Services>
            </HotelInfo>
            <FacilityInfo>
                <GuestRooms>
                    <GuestRoom Composite="true" MaxOccupancy="4">
                        <TypeRoom RoomTypeCode="274" StandardNumBeds="1" Count="4"/>
                        <DescriptiveText>Small shared dorm</DescriptiveText>
                    </GuestRoom>
                    <GuestRoom Composite="false" MaxOccupancy="5">
                        <TypeRoom RoomTypeCode="386" StandardNumBeds="5" Count="1"/>
                        <DescriptiveText>Private room</DescriptiveText>
                    </GuestRoom>
                </GuestRooms>
            </FacilityInfo>
            <ContactInfos>
                <ContactInfo ContactProfileType="Property info">
                    <Addresses>
                        <Address UseType="7">
                            <AddressLine>Main Street 25</AddressLine>
                            <CityName>Prague</CityName>
                            <PostalCode>11000</PostalCode>
                            <CountryName>Czech Republic</CountryName>
                        </Address>
                    </Addresses>
                    <Phones>
                        <Phone PhoneLocationType="7" PhoneTechType="1" PhoneNumber="123456789"/>
                    </Phones>
                    <Emails>
                        <Email>smallhostel@example.com</Email>
                    </Emails>
                    <URLs>
                        <URL>www.example.com</URL>
                    </URLs>
                </ContactInfo>
                <ContactInfo ContactProfileType="Property Personnel">
                    <Names>
                        <Name>
                            <GivenName>John</GivenName>
                            <Surname>Smith</Surname>
                        </Name>
                    </Names>
                </ContactInfo>
            </ContactInfos>
        </HotelDescriptiveContent>
    </HotelDescriptiveContents>
</OTA_HotelDescriptiveInfoRS>

HotelInfo

Contains general information about the property.

Service

This element represents represents a non-room product provided to guests.

Attributes:

  • InvCode - Identification code of the service for booking purposes

GuestRoom

This element represents the accommodation occupied by a guest

Attributes:

  • Composite – Indicates that the room type contains multiple rooms sold as a single unit. Allowed values: true, false
  • MaxOccupancy – Maximum number of guests allowed in a room type.

TypeRoom

Describes the guest room type. In composite types there can be multiple occurrences.

Attributes:

  • StandardNumBeds – Indicates the usual number of beds for this room type.
  • Count – Number of rooms of this room type that makes up a larger unit

Amenities

Collection of room amenity items available to the guest.

Amenity

Tangible room item(s) (e.g., bathroom) available to the guest.

Attributes:

  • RoomAmenityCode – OpenTravel Room Amenity Type Code. Currently supported values:
    • 85 – Private bathroom

OTA_HotelAvailRQ/RS

Requests availability of the property.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelAvailRQ.xsd" Target="Test" Version="2.000">
    <POS>
        <Source>
            <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
        </Source>
    </POS>
    <AvailRequestSegments>
        <AvailRequestSegment>
            <HotelSearchCriteria>
                <Criterion>
                    <HotelRef HotelCode="215"/>
                    <StayDateRange Start="2011-01-20" End="2011-01-21"/>
                </Criterion>
            </HotelSearchCriteria>
        </AvailRequestSegment>
    </AvailRequestSegments>
</OTA_HotelAvailRQ>

AvailRequestSegments

To accommodate the ability to perform multiple requests within one message, the availability request contains the repeating element, AvailRequestSegment. Each segment includes a collection of criteria that requests a bookable entity. Current AvailRequestSegment limit is 1.

HotelSearchCriteria

A collection of single search criterion items.

Criterion

Indicates the detail of Property reference information. Current Criterion limit is 1.

HotelRef

Indicates the property reference

Attributes:

  • HotelCode – property ID

StayDateRange

Range of dates for Availability Request. Current StayDateRange length limit is 31 days.

Attributes:

  • Start – Starting value of the time span
  • End – The ending value of the time span

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelAvailRS.xsd" Version="2.000" TimeStamp="2011-01-15T02:29:39+01:00">
    <Success/>
    <RoomStays>
        <RoomStay>
            <RoomTypes>
                <RoomType RoomTypeCode="274" NumberOfUnits="10"/>
            </RoomTypes>
            <RoomRates>
                <RoomRate>
                    <Rates>
                        <Rate>
                            <Base AmountBeforeTax="110.00" CurrencyCode="GBP"/>
                        </Rate>
                    </Rates>
                </RoomRate>
            </RoomRates>
            <TimeSpan Start="2011-01-20" Duration="P1N"/>
        </RoomStay>
        <RoomStay>
            <RoomTypes>
                <RoomType RoomTypeCode="274" NumberOfUnits="10"/>
            </RoomTypes>
            <RoomRates>
                <RoomRate>
                    <Rates>
                        <Rate>
                            <Base AmountBeforeTax="110.00" CurrencyCode="GBP"/>
                        </Rate>
                    </Rates>
                </RoomRate>
            </RoomRates>
            <TimeSpan Start="2011-01-21" Duration="P1N"/>
        </RoomStay>
        <RoomStay>
            <RoomTypes>
                <RoomType RoomTypeCode="386" NumberOfUnits="12"/>
            </RoomTypes>
            <RoomRates>
                <RoomRate>
                    <Rates>
                        <Rate>
                            <Base AmountBeforeTax="14.00" CurrencyCode="GBP"/>
                        </Rate>
                    </Rates>
                </RoomRate>
            </RoomRates>
            <TimeSpan Start="2011-01-20" Duration="P1N"/>
        </RoomStay>
        <RoomStay>
            <RoomTypes>
                <RoomType RoomTypeCode="386" NumberOfUnits="12"/>
            </RoomTypes>
            <RoomRates>
                <RoomRate>
                    <Rates>
                        <Rate>
                            <Base AmountBeforeTax="14.00" CurrencyCode="GBP"/>
                        </Rate>
                    </Rates>
                </RoomRate>
            </RoomRates>
            <TimeSpan Start="2011-01-21" Duration="P1N"/>
        </RoomStay>
    </RoomStays>
    <Services>
        <Service ServiceInventoryCode="2078" Quantity="20">
            <Price>
                <Base AmountBeforeTax="12.00" CurrencyCode="GBP"/>
            </Price>
            <ServiceDetails>
                <TimeSpan Start="2011-01-20" Duration="P1N"/>
            </ServiceDetails>
        </Service>
        <Service ServiceInventoryCode="2078" Quantity="20">
            <Price>
                <Base AmountBeforeTax="12.00" CurrencyCode="GBP"/>
            </Price>
            <ServiceDetails>
                <TimeSpan Start="2011-01-21" Duration="P1N"/>
            </ServiceDetails>
        </Service>
    </Services>
</OTA_HotelAvailRS>

OTA_HotelAvailNotifRQ/RS

This message is used to send the notification of the availability status of a property.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelAvailNotifRQ.xsd" Target="Test" Version="2.000">
    <POS>
        <Source>
            <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
        </Source>
    </POS>
    <AvailStatusMessages HotelCode="215">
        <AvailStatusMessage BookingLimit="2" BookingLimitMessageType="SetLimit">
            <StatusApplicationControl Start="2017-12-20" End="2017-12-21" InvCode="274"/>
            <LengthsOfStay>
                <LengthOfStay MinMaxMessageType="SetMinLOS" Time="3" />
            </LengthsOfStay>
        </AvailStatusMessage>
    </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>

AvailStatusMessages

Container for the individual AvailStatusMessage(s).

Attributes:

  • HotelCode – Property ID

AvailStatusMessage

Contains the information about availability for a bookable entity. Current AvailStatusMessage limit is 1000.

Attributes:

  • BookingLimit – Number of units
  • BookingLimitMessageType - An enumerated type defining the function of the booking limit message. Supported values:
    • RemoveLimit – Restores availability to the original value
    • SetLimit – Sets availability to the desired number of units

StatusApplicationControl

Information on what the AvailStatus Message applies to.

Attributes:

  • InvCode – Unique ID of the selected entity
  • Start – Starting value of the time span
  • End – The ending value of the time span

LengthsOfStay

Collection of Length of Stay elements. These elements indicate what restrictions are to be added or removed.

LengthOfStay

Defines the allowable length of stay.

Attributes:

  • MinMaxMessageType – Defines how the requirement is applied. Supported values:
    • SetMinLOS - Used to set the minimum length of stay
    • RemoveMinLOS - Used to remove the minimum length of stay
  • Time – Defines the length of stay requirement in days

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelAvailNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelAvailNotifRS.xsd" Version="2.000"
TimeStamp="2017-12-20T02:04:38+08:00">
    <Success/>
</OTA_HotelAvailNotifRS>

OTA_HotelRateAmountNotifRQ/RS

This message is used to provide a notification of new rates created for a property.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRQ
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelRateAmountNotifRQ.xsd" Target="Test" Version="2.000">
    <POS>
        <Source>
            <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
        </Source>
    </POS>
    <RateAmountMessages HotelCode="215">
        <RateAmountMessage>
        <StatusApplicationControl Start="2011-01-20" End="2011-01-21" InvCode="386"/>
            <Rates>
                <Rate>
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountBeforeTax="15"/>
                    </BaseByGuestAmts>
                </Rate>
            </Rates>
        </RateAmountMessage>
    </RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>

RateAmountMessages

A collection of RateAmount Message(s).

Attributes:

  • HotelCode – Property ID

RateAmountMessage

Defines the rate changes to be made. Current RateAmountMessage limit is 1000.

StatusApplicationControl

Information on what the RateAmount Message applies to.

Attributes:

  • InvCode – Unique ID of the selected entity
  • Start – Starting value of the time span
  • End – The ending value of the time span

Rates

A collection of rate changes to be synchronized between systems.

Rate

An individual rate, which is a collection of amounts by guest. Current Rate limit is 1.

BaseByGuestAmts

A collection of Base charges.

BaseByGuestAmt

Specifies the base charge. Current BaseByGuestAmt limit is 1.

Attributes:

  • AmountBeforeTax – The total amount not including any associated tax. Value 0 resets the amount to the original state.

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelRateAmountNotifRS.xsd" Version="2.000"
TimeStamp="2011-01-15T02:57:09+01:00">
    <Success/>
</OTA_HotelRateAmountNotifRS>

OTA_ReadRQ / OTA_HotelResRS

This message pair is used to request a single booking.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_ReadRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_ReadRQ.xsd" Target="Test" Version="2.000">
    <POS>
        <Source>
            <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
        </Source>
    </POS>
    <ReadRequests>
        <ReadRequest>
            <UniqueID Type="14" ID="215-516-M-2011"/>
        </ReadRequest>
    </ReadRequests>
</OTA_ReadRQ>

ReadRequest

A request to read a reservation when the booking reference is known.

UniqueID

Specifies the booking that is being requested.

Attributes:

  • ID – The booking number

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelResRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelResRS.xsd" Version="2.000" TimeStamp="2011-01-15T03:40:24+01:00">
    <Success/>
    <HotelReservations>
        <HotelReservation ResStatus="Requested"    CreateDateTime="2011-01-02T14:08:43+01:00">
            <RoomStays>
                <RoomStay>
                    <RoomTypes>
                        <RoomType RoomTypeCode="386" NumberOfUnits="1">
                        </RoomType>
                    </RoomTypes>
                    <TimeSpan Start="2011-02-09" Duration="P1N"/>
                    <Total AmountBeforeTax="14.00" CurrencyCode="GBP"/>
                    <BasicPropertyInfo HotelCode="215"/>
                </RoomStay>
                <RoomStay>
                    <RoomTypes>
                        <RoomType RoomTypeCode="386" NumberOfUnits="1">
                        </RoomType>
                    </RoomTypes>
                    <TimeSpan Start="2011-02-10" Duration="P1N"/>
                    <Total AmountBeforeTax="14.00" CurrencyCode="GBP"/>
                    <BasicPropertyInfo HotelCode="215"/>
                </RoomStay>
            </RoomStays>
            <ResGuests>
                <ResGuest ArrivalTime="09:15:00">
                    <Profiles>
                        <ProfileInfo>
                            <Profile>
                                <Customer>
                                    <PersonName>
                                        <GivenName>Michael</GivenName>
                                        <Surname>Horton</Surname>
                                    </PersonName>
                                    <Telephone PhoneNumber="12345789"/>
                                    <Email>michael@example.com</Email>
                                    <Address>
                                        <CityName>Escondido</CityName>
                                    </Address>
                                    <CitizenCountryName Code="US"/>
                                </Customer>
                            </Profile>
                        </ProfileInfo>
                    </Profiles>
                </ResGuest>
            </ResGuests>
            <ResGlobalInfo>
                <TimeSpan Start="2011-02-09" End="2010-09-11"/>
                <Comments>
                    <Comment Name="Customer Comment">
                        <Text>This is some customer comment.</Text>
                    </Comment>
                </Comments>
                <DepositPayments>
                    <GuaranteePayment GuaranteeType="Deposit">
                        <AmountPercent Percent="10.00" Amount="2.80" CurrencyCode="GBP"/>
                    </GuaranteePayment>
                </DepositPayments>
                <Fees>
                    <Fee Amount="1.50" CurrencyCode="GBP" />
                </Fees>
                <Total AmountBeforeTax="28.00" CurrencyCode="GBP"/>
                <HotelReservationIDs>
                    <HotelReservationID ResID_Type="14"    ResID_Value="215-516-M-2011"/>
                </HotelReservationIDs>
            </ResGlobalInfo>
            <TPA_Extensions>
                <HotelPayment Amount="810.24" CurrencyCode="CZK"/>
            </TPA_Extensions>
        </HotelReservation>
    </HotelReservations>
</OTA_HotelResRS>

RoomStay

Details on the Room Stay including Room Type, Time Span of this Room Stay, etc.

RoomTypes

A collection of Room Types associated with a particular Room Stay.

RoomType

The RoomType element is used to contain all the room type information

ResGuest

Information about the guest associated with the reservation.

Atrributes:

  • ArrivalTime – Date and time of the guest's arrival.

Comment

Customer comment.

TimeSpan

The Time Span which covers the booking.

Attributes:

  • Start – Arrival date
  • Duration – The duration of the stay (number of nights)

Discount

Identifies and provides details about the discount.

Attributes:

  • AmountBeforeTax – Discount amount.
  • CurrencyCode – The code specifying a monetary unit (ISO 4217 three alpha code).

Total

The total amount charged for the Room Stay.

Attributes:

  • AmountBeforeTax – The total amount charged for the RoomStay.
  • CurrencyCode – The code specifying a monetary unit (ISO 4217 three alpha code).

BasicPropertyInfo

Attributes:

  • HotelCode – Property ID

ResGuest

Contains information about the guest associated with the booking.

ResGlobalInfo

Contains various information that affects the booking as a whole. These include global comments, counts, booking number, etc.

GuaranteePayment

Used to define the deposit policy.

Fee

Booking fee

Total

The total amount charged for the booking.

HotelReservationID

Attributes:

  • ResID_Value – Booking number

TPA_Extensions

Additional elements that are not part of the standard OpenTravel specification.

HotelPayment

The amount to be payed upon arrival. The currency can differ from the booking currency.

OTA_ReadRQ / OTA_ResRetrieveRS

This message pair is used to request a list of bookings.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_ReadRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_ReadRQ.xsd" Target="Test" Version="2.000">
    <POS>
        <Source>
            <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
        </Source>
    </POS>
    <ReadRequests>
        <HotelReadRequest HotelCode="215">
            <SelectionCriteria ResStatus="Requested" Start="2011-01-01" End="2011-01-05" DateType="CreateDate"/>
        </HotelReadRequest>
    </ReadRequests>
</OTA_ReadRQ>

SelectionCriteria

Specifies the time span criteria for the bookings.

Attrubues:

  • ResStatus – Specifies the status of the reservations to be delivered. Currently supported values:
    • Reserved – The booking has been reserved.
    • Canceled – The reservation has been canceled.
  • Start – Starting value of the time span
  • End – The ending value of the time span
  • Duration – The duration of time
  • DateType – Specifies the type of date provided in the date time span attributes. Currently supported values:
    • ArrivalDate – The arrival date of the reservation
    • DepartureDate – The departure date of the reservation
    • CreateDate – The date the reservation was created

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_ResRetrieveRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_ResRetrieveRS.xsd" Version="2.000" TimeStamp="2011-01-09T04:09:13+01:00">
    <Success/>
    <ReservationsList>
        <HotelReservation ResStatus="Requested" 
CreateDateTime="2011-01-02T12:30:15+01:00">
            <RoomStays>
                <RoomStay>
                    <BasicPropertyInfo HotelCode="215"/>
                </RoomStay>
            </RoomStays>
            <ResGlobalInfo>
                <TimeSpan Start="2011-02-20" End="2011-02-24" Duration="P4N"/>
                <HotelReservationIDs>
                    <HotelReservationID ResID_Type="14" ResID_Value="215-525-M-2011"/>
                </HotelReservationIDs>
            </ResGlobalInfo>
        </HotelReservation>
        <HotelReservation ResStatus="Requested" 
CreateDateTime="2011-01-04T14:08:43+01:00">
            <RoomStays>
                <RoomStay>
                    <BasicPropertyInfo HotelCode="215"/>
                </RoomStay>
            </RoomStays>
            <ResGlobalInfo>
                <TimeSpan Start="2011-03-09" End="2011-03-11" Duration="P2N"/>
                <HotelReservationIDs>
                    <HotelReservationID ResID_Type="14" ResID_Value="215-527-M-2011"/>
                </HotelReservationIDs>
            </ResGlobalInfo>
        </HotelReservation>
    </ReservationsList>
</OTA_ResRetrieveRS>

OTA_HotelResModifyRQ/RS

This message is used to change a state of an existing booking.

Request

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelResModifyRQ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opentravel.org/OTA/2003/05" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelResModifyRQ.xsd" Target="Test" Version="2.000">
    <POS>
        <Source>
            <RequestorID Type="10" ID="215" MessagePassword="abcdefghijk"/>
        </Source>
    </POS>
    <HotelResModifies>
        <HotelResModify ResStatus="Reserved">
            <ResGlobalInfo>
                <HotelReservationIDs>
                    <HotelReservationID ResID_Type="14" ResID_Value="215-522-M-2011"></HotelReservationID>
                </HotelReservationIDs>
            </ResGlobalInfo>
        </HotelResModify>
    </HotelResModifies>
</OTA_HotelResModifyRQ>

Response

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelResModifyRS xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_HotelResModifyRS.xsd" Version="2.000" TimeStamp="2011-01-16T17:21:39+01:00">
    <Success/>
</OTA_HotelResModifyRS>

Troubleshooting

HTTP/1.1 417 Expectation Failed

If you receive HTTP/1.1 417 Expectation Failed error please make sure that you are not using Expect HTTP header in your requests.

If you use PHP with cURL you can resolve the issue by setting an empty Expect header:

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));