Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In order for third party software providers to make the integration with Hotel-Spider as easy as possible two distincts transmission protocols have been implemented. All the communications from the third party software client to the Hotel-Spider server should be sent using HTTPS over a TCP/IP connection

1. HTTP POST RAW

Every programming language has its proper solution for transmitting XML as payload, please check the documentation for the appropriate usage. Disregarding which programming platform has been opted for, the following HTTP headers MUST be used to send XML to the Hotel-Spider servers.

...

Warning
titleUser-Agent
Make sure to communicate the precise User-Agent your application will transmit when connecting to our server. Should this value NOT match with the value that is registered in our system, our Web-Application Firewall will BLOCK your request from reaching our servers.
Code Block
languagephp
titlePHP with CURL
// Define the proper Endpoint. Check the chapters on the endpoints to get the correct one for your usage
$endpoint = 'https://staging.hotel-spider.ch/ota/OTA_HotelAvailNotifRQ/2014A'
$Request = <<< XML
<?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" TimeStamp="2012-10-05T14:20:50" Target="Test" Version="1.005">
  <POS>
    <Source>
      <RequestorID Type="5" ID="*************" MessagePassword="*************"></RequestorID>
    </Source>
  </POS>
  <AvailStatusMessages>
    <AvailStatusMessage BookingLimit="25" LocatorID="1">
      <StatusApplicationControl Start="2015-09-24" End="2015-09-24" InvTypeCode="*************"/>
    </AvailStatusMessage>
  </AvailStatusMessages>
</OTA_HotelAvailNotifRQ>
XML;

//open connection and set endpoint
$ch = curl_init($endpoint);

//set the url, number of POST vars, POST data
curl_setopt($ch,CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS, $Request);

//execute post
$Response= curl_exec($ch);

//close connection
curl_close($ch);

2. SOAP

Most programming languages have a solution for building a SOAP client, please check the documentation for the appropriate usage. It is essential that a recognised SOAP client is used and NOT a homemade solution. Namespacing might evolve and this should not break your implementation.Disregarding which programming platform has been opted for, the following HTTP headers MUST be used to send XML to the Hotel-Spider servers.

...