Skip to content

Roadmap - First steps to use OTA REST-API

Preparation and Process

  • Channelmanager had been created and an ID exists (AgentDutyCode)
  • TestHotel had been created / Channelmanager linked with account (HotelCode)
  • Entry for HTTP Basic Auth for Agent is set
  • IPs entered in IP-WhiteList, if necessary linked

please check Wiki: Roadmap to connect a new integration partner > Phase 2 – Development & certification > Step 1: Create Account

Test of Authentication and Connection

fastes possibility for the test of the authentication and connection would be the OTA Service via REST-API and a Ping

  • Endpoint for all POST Requests: https://www.kurzurlaub.de/ota/api/
  • Endpoint for GET Requests: https://www.kurzurlaub.de/ota/api/<MessageName>?<ParamName>=<ParamValue>
  • Endpoint for Ping https://www.kurzurlaub.de/ota/api/Ping?HotelCode=1 (HotelCode anpassen)

Test for connection with Ping (GET Request)

Ping - GET Request (OTA_PingRQ)

The request to the service via GET Request (Message: OTA_PingRQ)

Exampel Endpoint:

GET https://www.kurzurlaub.de/ota/api/Ping?HotelCode=1 (adapt HotelCode)

should deliver the Response (Message: OTA_PingRS) <Success/>, if everything ok.

Ping - Response (OTA_PingRS)

As Response (Message: OTA_PingRS) <Success/> is expected.

Example:

<OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    EchoToken="22150049012a2c4118ad45713703189f" PrimaryLangID="de" 
    TimeStamp="2021-12-01T12:12:25+01:00" Target="Production" Version="1.000">
    <Success/>
    <EchoData>online</EchoData>
</OTA_PingRS>

Possible error with ErrorCode and ErrorMessage:

Agent not online or activated

  • ErrorCode: 400
  • ErrorMessage: AuthenticationError - Authentication failed - Agent is not online (AgentDutyCode xx)
<OTA_ErrorRS xmlns="http://www.opentravel.org/OTA/2003/05" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    EchoToken="fedfab716458725ea20a67944e583b1f" 
    PrimaryLangID="de" 
    TimeStamp="2021-12-01T12:03:41+01:00" 
    Target="Production" Version="1.000" 
    ErrorCode="400" 
    ErrorMessage="AuthenticationError - Authentication failed - Agent is not online"/>

False or missing GET Parameter

  • ErrorCode: 104
  • ErrorMessage: InternalError - Empty HotelCode (HotelCode) in accepted params (agentdutycode, hotelcode, hotelreservationid, uniqueid)

Example: https://www.kurzurlaub.de/ota/api/Ping (no Parameter)

Example: https://www.kurzurlaub.de/ota/api/Ping?HotelCodeParam=1 (false Parameter)

<OTA_ErrorRS xmlns="http://www.opentravel.org/OTA/2003/05" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    EchoToken="f3f89dac94f77065a5d32eb840a00a95" 
    PrimaryLangID="de" TimeStamp="2021-12-01T12:06:55+01:00" 
    Target="Production" Version="1.000" 
    ErrorCode="104" 
    ErrorMessage="InternalError - Empty HotelCode (HotelCode) in accepted params 
        (agentdutycode, hotelcode, hotelreservationid, uniqueid)"/>

False HotelCode / HotelCode not found

Example: https://www.kurzurlaub.de/ota/api/Ping?HotelCode=1000000 (no Parameter)

  • ErrorCode: 211
  • ErrorMessage: HotelNotActivated - Hotel not found (HotelCode 1000000 / AgentDutyCode 1)

Example: https://www.kurzurlaub.de/ota/api/Ping?HotelCode=2 (false HotelCode)

  • ErrorCode: 210
  • ErrorMessage: HotelNotLinked - Hotel (HotelCode xxxx) linked to another channel manager (your AgentDutyCode is xx)
<OTA_ErrorRS xmlns="http://www.opentravel.org/OTA/2003/05" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    EchoToken="e20b6ab9e9a6dedb0fc7a70fd2453327" PrimaryLangID="de" 
    TimeStamp="2021-12-01T12:10:57+01:00" Target="Production" Version="1.000" 
    ErrorCode="210" 
    ErrorMessage="HotelNotLinked - Hotel (HotelCode xxxx) linked to another channel manager 
        (your AgentDutyCode is xx)"/>

Test of connection with Ping (POST Request)

Ping - POST Request (OTA_PingRQ)

The request to the service via POST Request (Message: OTA_PingRQ)

Example: Endpoint (only accepted for Ping):

POST https://www.kurzurlaub.de/ota/api/Ping

Example: general endpoint (for all messages accepted):

POST https://www.kurzurlaub.de/ota/api

Example XML Request: (please AgentDutyCode, RequestorID and HotelCode need to be adapted)

<?xml version="1.0" encoding="UTF-8"?>
<OTA_PingRQ EchoToken="1" PrimaryLangID="de" Target="Production" TimeStamp="" Version="1.0">
    <POS>
        <Source AgentDutyCode="1">
            <RequestorID ID="1" Type="4"/>
        </Source>
    </POS>
    <EchoData>Are you there</EchoData>
</OTA_PingRQ>

Ping - Response (OTA_PingRS)

<Success/> is expected.

Example:

<OTA_PingRS xmlns="http://www.opentravel.org/OTA/2003/05" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    EchoToken="22150049012a2c4118ad45713703189f" 
    PrimaryLangID="de" TimeStamp="2021-12-01T12:12:25+01:00" Target="Production" Version="1.000">
    <Success/>
    <EchoData>online</EchoData>
</OTA_PingRS>

Possible sources of error:

It is not possible to send false requests to REST-API endpoint (please use general endpoint).

Example:

<?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"
    EchoToken="ed1e968d6ef00892b3b08fda80e54dab" PrimaryLangID="de" 
    TimeStamp="2021-12-01T11:51:11+00:00"
    Target="Production" Version="1.000" 
ErrorCode="550"
ErrorMessage="CustomError - RequestMessage (OTA_PingRQ) and Endpoint (OTA_ErrorRQ) not match."/>

Further REST-API Methods

HotelRatePlan

Endpoint HotelRatePlan delivers a list of available rooms and offers in combination.

HotelRatePlan - GET Request (OTA_HotelRatePlanRQ)

Example endpoint: https://www.kurzurlaub.de/ota/api/HotelRatePlan?HotelCode=1

HotelRatePlan - POST Request

The request to the service via POST Request (Message: OTA_HotelRatePlanRQ)

Example: Endppoint (only accepted for HotelRatePlan):

POST https://www.kurzurlaub.de/ota/api/HotelRatePlan

Example: general endpoint (accepted for all Messages):

POST https://www.kurzurlaub.de/ota/api

Example XML Request: (please adjust AgentDutyCode, RequestorID and HotelCode)

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRatePlanRQ xsi:schemaLocation="http://opentravel.org/2010A/OTA_HotelRatePlanRQ.xsd" 
    EchoToken="938a6a32-c526-485b-b641-f69d635cda41" 
    TimeStamp="2011-11-23T09:44:06" Version="1.001" 
    xmlns="http://www.opentravel.org/OTA/2003/05" 
    xmlns:xsi="http://www.w3.org/2001/XMLXSchema-instance">
    <POS>
        <Source AgentDutyCode="1">
            <RequestorID ID="1" Type="4"/>
        </Source>
    </POS>
    <RatePlans>
        <RatePlan>
            <HotelRef HotelCode="1"/>
        </RatePlan>
    </RatePlans>
</OTA_HotelRatePlanRQ>

HotelRatePlan - Response (OTA_HotelRatePlanRS)

The endpoint HotelRatePlan delivers a list of available rooms and offers in combination

  • available rooms (SellableProduct + InvCode) <SellableProduct InvCode="50931" InvType="ROOM">
  • available offers (RatePlan) <RatePlan RatePlanID="404915" RatePlanCode="TEST-BAR">
  • Combination RatePlan + Room <Rate Start="2021-12-01" End="2024-12-01" InvCode="50931">

Example

<OTA_HotelRatePlanRS xmlns="http://www.opentravel.org/OTA/2003/05" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
EchoToken="1b8636022223b53117efb6c9a0b51afb" 
PrimaryLangID="de" TimeStamp="2021-12-01T12:21:33+01:00" Target="Production" Version="1.000">
    <Success/>
    <RatePlans HotelCode="1">
        <RatePlan RatePlanID="404915" RatePlanCode="TEST-BAR">
            <DestinationSystemsCode/>
                <Description Name="Testangebot 2 Nächte RezExchange OTA - bitte nicht buchen!">
                <Text>Kurzurlaub Angebot 2 ÜN gültig bis 01.12.2024</Text>
            </Description>
            <Rates>
                <Rate Start="2021-12-01" End="2024-12-01" InvCode="50931">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountAfterTax="119.00" CurrencyCode="EUR"/>
                    </BaseByGuestAmts>
                </Rate>
                <Rate Start="2021-12-01" End="2024-12-01" InvCode="50932">
                    <BaseByGuestAmts>
                        <BaseByGuestAmt AmountAfterTax="115.00" CurrencyCode="EUR"/>
                    </BaseByGuestAmts>
                </Rate>
            </Rates>
            <SellableProducts>
                <SellableProduct InvCode="50931" InvType="ROOM">
                    <GuestRoom Code="50931" RoomTypeName="Doppelzimmer (18m², ID:50931, 2E/2K)" 
                        Quantity="10"/>
                </SellableProduct>
                <SellableProduct InvCode="50932" InvType="ROOM">
                    <GuestRoom Code="50932" RoomTypeName="Einzelzimmer (16m², ID:50932, 1E/0K)" 
                        Quantity="4"/>
                </SellableProduct>
            </SellableProducts>
        </RatePlan>
    </RatePlans>
</OTA_HotelRatePlanRS>

Possible sources of error with ErrorCode and ErrorMessage:

A list of possible errors you will find at Overview of ErrorCodes

Possible general errors for the hotel are:

  • Hotel is not active
  • Hotel is not linked to this Channel Manager
  • Hotel is not activated for Channel Manager
  • Hotel is not online (account deactivated)

Possible errors for this request concernint rooms and offers:

  • Hotel does not have rooms created or configured
  • Hotel does not have rates created or configured

Next steps

We are currently revising our online documentation as a wiki for all methods and endpoints, the ErrorCodes and the roadmaps, please be patient for a few more days.