Anatomy of Request

The request is basically made up of two parts: the hub structure and then the XML request.

The hub structure is a generic structure wrapping the XML request which will indicate the following information:

  • Hub credentials.
  • Connection time out measured in Milliseconds.
  • XML Travelgate’s API version - usually indicated with a 1.
  • Code for the Supplier you wish to connect to.
  • Id to correlate providerRQ in Request with Response


For each request or call there will be only one supplier per request, i.e. the example below is a cancellation request where we use the supplier TEST with the supplier code TST (<ns:code>TST/ns:code>). The response of this call will be exclusively for the supplier TST.

    xmlns:soapenv = ""
    xmlns:ns = ""
    xmlns:wsse = "">
                <wsse:Username>xxxxxxxxxx</wsse:Username> <!--Hub Credentials-->
                <ns:timeoutMilliseconds>xxxxxx</ns:timeoutMilliseconds> <!--Hub timeoutMillisecond-->
                <ns:version>x</ns:version> <!--request version-->
                   <ns:code>xxx/ns:code> <!--Supplier's code-->
                   <ns:id>x/ns:id> <!--Id-->
                      <!--XML request, for example, the cancellation of a hotel reservation-->

The only exception where there is a possibility of using one or more providerRQs in the same request is when using the call Avail. To identify which providerRQ is used in the Avail call use the field id. For example, for TST the id will be 1 (ns:id1/ns:id) and for the supplier TST2 the id will be 2 (ns:id2/ns:id), then in the response for the supplier TST the refId will be 1 (1) and for the second supplier TST2 the refID will be 2 (2). This will be visually shown in the Soap Example.