Web Integration
This documentation is about the webservice integration possibilities for classic SIHOT interfaces. SIHOT is designed as an SOA stack which has lead over to a wide number of different integration protocols on various bases, which include file im-/export, plain TCP/IP communications as well as SOAP webservices.
Since more and more integrations require an additional layer of security and maintainability for routing SIHOT provides on top of its existing interface specification the possibility to use secured HTTP(S) communications instead of the original implementation layer.
This implementation follows some rules that are described in this document. For details on the integration protocol please refer to the interface specification provided for the integration.
The Transport Protocol
Web Integration is a RESTful protocol between the external system and SIHOT. Some background reading on REST can be found at http://en.wikipedia.org/wiki/Representational_State_Transfer . Briefly, REST is a HTTP-based protocol that uses HTTP GETs, POSTs, PUTs and DELETEs to perform operations. The responses to the operation requests may contain a message body to indicate the result of the operation if the operation was successful, and if the operation was not successful the HTTP response will contain a non-200 HTTP error code.
All POSTs include a set of form parameters. These are not included in the URL, but in the body of the POST.
In the RESTful model, both positive and negative responses are defined using HTTP response codes. A positive response will be communicated with a HTTP 200, and the body of the message gives the response detail. There are a range of negative responses, depending on the operation being performed.
Successful responses may contain a payload which is formatted depending of the interface specification (XML or propriety). The structure of the body depends on the type of request.
Each and every request must be submitted to the integration server as a HTTP 1.1 request. This request must include a "x-api-key" HTTP header that will be unique to the custom endpoint of the interface.
Security
- All communication is secured via SSL/TLS using HTTPS.
- All incoming connections require an APIKEY.
- All incoming connections require a product ID (communication/productid)
Interface Protocol
SIHOT provides a wide range of interface protocols. This includes but is not limited to:
- SIHOT.PMS-RMS-Interface
- SIHOT.PMS-WEB-Interfaces
- SIHOT.PMS-XML-Interface
- SIHOT.PMS-XML BO Interface
- SIHOT.PMS-XML-Interface Accounting
- SIHOT.PMS-Kernel-XML-Interface Documentation
- SIHOT.OTA Interface
- SIHOT.PMS Interface
- SIHOT.XML Yield Interface
URL conventions
Even while the URLS for different locations may vary the below standard principals should apply.
https://{$DNS of service}/{$customerid}/API/{$protocol}/{$method}
This translates in example for the keepalive message (keepalivereq) of the SIHOT.PMS-RMS-Interface to:
https://api.sihot.com/X4711/API/RMS/keepalivereq
or for the link alive request of the SXMLIF interface
https://api.sihot.com/X4711/API/RMS/keepalivereq
to.
Example
A complete example of the HTTP POST message looks like this
POST /X4711/API/RMS/keepalivereq HTTP/1.1
Host: api.sihot.com
x-api-key: 2ays1dxf2gch3jvk4b5n6m7lk8l90
Cache-Control: no-cache
<?xml version="1.0" encoding="ISO-8859-1"?\>
<SIHOT-Document>
<OC>LA\</OC>
<TN>1\</TN>
<CDT>2017-08-11</CDT>
<status>1</status>
</SIHOT-Document>
POST /X4711/API/RMS/roomreq HTTP/1.1
Host: api.sihot.com
x-api-key: 2ays1dxf2gch3jvk4b5n6m7lk8l90
Cache-Control: no-cache
transno:60940580roomreq:06105extraInfo:board;drink;details;namelistmandator:4600