Zum Inhalt

OTA_PingRQ

Diese Methode kann zum Testen der Verbindung per GET oder POST aufgerufen werden.

OTA_PingRQ - Anfrage per GET - REST-API

Diese Anfrage kann ohne Parameter gesendet werden.

GET /ota/api/Ping

oder alternativ mit Parameter, um die Verbindung bszw. den Status eines bestimmten Hotels zu testen.

Verwendete Parameter:

  • AgentDutyCode (optional, sofern IP WhiteList oder HTTP Basic Auth verwendet wird)
  • HotelCode (mandatory)

Beispiel:

GET /Ping?AgentDutyCode=1&HotelCode=4

OTA_PingRQ - Anfrage per POST

Beispiel 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>

Beispiel OTA_PingRQ (Request) mit Authenfifizierung und Hotel-Id

Verwendete Attribute:

  • @AgentDutyCode (optional, sofern IP WhiteList oder HTTP Basic Auth verwendet wird)
  • 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 - Antwort

Es sollte immer ein <Success/> in der Antwort enthalten sein.

Beispiel 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>

Beispiel OTA_PingRS (Response) - Fehler in der Authenfifizierung

(siehe Attribute @ErrorCode und @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)"/>

Beispiel OTA_PingRS (Response) - Fehler im besonderen XML Format

(siehe <Errors> und Attribute Error@Code, Error@Type und 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>