Skip to content

OTA_PingRQ

This method can be called to test the connection via GET or POST.

OTA_PingRQ - Request via GET - REST API

This request can be sent without parameters.

GET /ota/api/Ping

or alternatively with parameters to connect or test the status of a particular hotel.

Parameters used:

  • AgentDutyCode (optional if IP WhiteList or HTTP Basic Auth is used)
  • HotelCode (mandatory)

Example:

GET /Ping?AgentDutyCode=1&HotelCode=4

OTA_PingRQ - Request per POST

Example OTA_PingRQ (Request)

<?xml version="1.0" encoding="UTF-8"?>
<OTA_PingRQ EchoToken="1" PrimaryLangID="de" Target="Production" TimeStamp="" Version="1.0">
    <EchoData>Are you there</EchoData>
</OTA_PingRQ>

Example OTA_PingRQ (Request) with authentication and Hotel-ID

Attributes used:

  • @AgentDutyCode (optional if IP WhiteList or HTTP Basic Auth is used)
  • RequestorID@ID (mandatory)
<?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="4" Type="4"/>
        </Source>
    </POS>
    <EchoData>Are you there</EchoData>
</OTA_PingRQ>

OTA_PingRS - Response

There should always be a <Success/> in the response.

Example OTA_PingRS (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"   EchoToken="6bb71a0e321ade5d132faa742ffb871d"
            PrimaryLangID="de"
            TimeStamp="2022-01-26T12:04:20+01:00"
            Target="Production"
            Version="1.000">
    <Success/>
    <EchoData>online</EchoData>
</OTA_PingRS>

Example OTA_PingRS (Response) - Fehler in der Authenfifizierung

(see Attributes @ErrorCode and @ErrorMessage)

<?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="188d04c25fb620a05c7d2416f208e9ee"
             PrimaryLangID="de"
             TimeStamp="2022-01-26T13:28:53+01:00"
             Target="Production"
             Version="1.000"
             ErrorCode="400"
             ErrorMessage="AuthenticationError - Authentication failed - Agent not found (AgentDutyCode 1234)"/>

Example OTA_PingRS (Response) - Error in special XML format

(see <Errors> and Attributes Error@Code, Error@Type and Error@ShortText)

<?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"   EchoToken="b1e7755fe1557e71acfa1297b8899f38"
            PrimaryLangID="de"
            TimeStamp="2022-01-26T12:05:16+01:00"
            Target="Production"
            Version="2.0">
    <Errors>
        <Error
                Code="507"
                Type="Authentication error"
                ShortText="Hotel not found (HotelCode 12345 / AgentDutyCode 1)"/>
    </Errors>
</OTA_PingRS>