Common to all API methods

There are some things that are common to all API methods. These are described here, rather than repeating them for every individual method.

SOAP requests and responses

For readability, all of the sample request and response messages described in the API METHODS section are all 'body only'. This means they illustrate the body only of the SOAP message, but not the enclosing SOAP envelope nor the SOAP header. For an example of complete SOAP messages, see Quick start.

MoreSOAP (Wikipedia)
MoreSOAP (W3C)

Authenticaton and Session ID

For the vast majority of API methods, authentication is achieved using account credentials passed in the LogIn method. If successful, this method returns a Session ID which is used in all subsequent method calls, until either LogOut is called or the session expires through inactivity. Therefore, apart from LogIn, all API methods have Session ID as a parameter.

Note All CNB methods and some newer PMS methods are an exception to this. All these methods contain a SOAP header and include the account credentials in the SOAP header of the message, rather than using a Session ID.

CNB request (including full SOAP envelope)

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <AuthenticationContext xmlns="http://tempuri.org/RLXSOAP19/RLXSOAP19">
      <SiteId>HEADLAMT</SiteId>
      <InterfaceId>355</InterfaceId>
      <OperatorCode>CUSTALLIANCE</OperatorCode>
      <Password>w%/HUxl0M%xS7Qfv@tTOeX+@f</Password>
    </AuthenticationContext>
  </soap:Header>
  <soap:Body>
    <cnb_GetAllCancellationReasons xmlns="http://tempuri.org/RLXSOAP19/RLXSOAP19" />
  </soap:Body>
</soap:Envelope>

Error responses

All response messages include a 'result' tag, containing an ExceptionCode and corresponding ExceptionDescription, e.g. as follows:

    <pmscfg_AnalListResult>
        <ExceptionCode>0</ExceptionCode>
        <ExceptionDescription>No error</ExceptionDescription>
    </pmscfg_AnalListResult>

If the request is well-formed with valid request data and there are no server-side errors, then the response will have ExceptionCode '0' and ExceptionDescription 'No error', indicating success. Otherwise, the result tag will include a non-zero error code and a corresponding text description to indicate the nature of the error.

MoreList of error codes
NextFor further assistance