Brushing up on SOAP

SOAP stands for Simple Object Access Protocol and is basically a format (based on XML ) for sending and receiving messages over HTTP.

Those of you picking up a SOAP API after working with restful json APIs will find the whole thing a little bit clunky, but SOAP remains a decent way to send messages around the internet to applications built with different programming languages and technologies.

The Payload

Each payload is a SOAP Envelope wrapping a Header (used for authentication) and Body (specifying which operations should be performed).

We'll be expecting you to send messages in the following format:

<?xml version="1.0"?>
<soapenv:Envelope
  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:ns="http://www.opentravel.org/OTA/2003/05">
  <soapenv:Header>
    {header}
  </soapenv:Header>
  <soapenv:Body>
    {body}
  </soapenv:Body>
</soapenv:Envelope>

Header

This is required for authentication. Our server isn't going to a thing if can't be sure the message is coming from Channel Manager or PMS we know and love.

Body

This is the meat and gravy of the request. You'll tell us about rates, availability, booking rules and such like. The requests in the body will have a root element of OTA_HotelSomethingOrOther.