Transaction Header Formats

This section provides details of the Header element, which is common to all request and response messages

Header element (Request Message)

Element Path

Attribute

Occ

Type

Notes

HotelML/Head/Process

1

DataPath

1

Char

This specifies to the XPath to the main ‘form’ in the request message. It will vary depending on the transaction. For example, "/HotelML/Form/MultiAvailability” (for Enhanced Shopping Transaction) or "/HotelML/Form/PreBook” (for Prebook Transaction) etc

Function

1

Char

This identifies the main function that will be called. It will vary depending on the transaction. For example - “TI_MultiAvailabilityV1_1” or “TI_PropertyInformationV1_1” etc.

Token

1

Char

Unique ID for the transaction generated by the system sending the transaction.

Timeout

0..1

Integer

Currently, this attribute is only applicable to the Enhanced Shopping transaction.

It specifies the maximum time (in milliseconds) that UltraDirect should wait for responses from the CRSs before returning a response to the affiliate.

If the timeout expires before the rates and availability has been obtained for all properties, then UltraDirect will only return details to the affiliate of all properties that have responded. UltraDirect will also return a second response for all remaining properties if requested (by using the AcceptMultipartResponse attribute)

If the attribute is omitted, the standard UltraDirect timeout value will be used.

If the requested timeout is greater than the UltraDirect standard timeout, the standard timeout will be used.

AcceptMultipart

Response

0..1

Boolean

Currently, this attribute is only applicable to Enhanced Shopping transactions.

This attribute specifies whether the requesting system will accept a response in multiple parts – i.e. the results for an initial set of properties after the affiliate-specified timeout expired, followed by the results for the remaining properties.

This is implemented as a ‘chunked’ transfer-encoded HTTP response. If multi-part responses are not requested (i.e. the value is false or the attribute is omitted) then only one response will be returned.

This attribute is only applicable when the Timeout attribute is supplied. Else, it will be ignored if Timeout is omitted.

HotelML/Head/Route

1

Source

1

Char 2-3

Identifies the organization sending the transaction. The value to use will be provided during the implementation project.

Destination

1

Char 2

Always set to “00” (i.e. zero zero). This value will be communicated during implementation if any change is required.

RequestedAccuracy

0..1

Enum

This attribute only applies to transactions that use the UltraDirect cache – i.e., Enhanced Shopping transactions.

This specifies whether the response can be generated from the UltraDirect transaction cache.

Note: This is a preference, since it can be overridden by the hotel chain. Valid values are:

“CacheOrSource” (default if the attribute is omitted) - First attempt to respond with data from the cache, but if data is not available, deliver the request to the source (hotel CRS) for processing.

“SourceOnly” - Bypass the cache and return availability from the source (hotel CRS) only.

“CacheOnly” - Only return data from the cache. If data is not available in the cache for the requested parameters, then an error will be returned

It is strongly recommended to set this to “CacheOrSource”

An example of a simple header is shown below:

<Head>
<Process DataPath="/HotelML/Form/PreBook" Function=" TI_PreBookV1_1"  Token="1307101856910"/>
<Route Destination="00" Source="01"/>
</Head>

A more complicated example, used by the Enhanced Shopping transaction, is as follows:

<Head>
<Process DataPath="/HotelML/Form/MultiAvailability" Function="TI_MultiAvailabilityV1_1" Token="1273480445698" Timeout="2000" AcceptMultipartResponse="true"/>
<Route Destination="00" Source="01" RequestedAccuracy="CacheOrSource"/>
</Head>

Header element (Response Message)

Element Path

Attribute

Occ

Type

Notes

HotelML/Head/Route

1

Source

1

Char 2-3

Same as Route/@Destination in the request message – i.e. will always be set to “00”.

Destination

1

Char 2

Same as Route/@Source in the request message

HotelML/Head/Operation

1

Action

0..1

Char

The action performed by the application (i.e. “Create”)

App

0..1

Char

The name of the application performing the operation – i.e. “TIDispatcher”

AppVer

0..1

Char

The version of the application performing the operation – e.g. “1.12.40.2.8.1”

DataPath

0..1

Char

The data path of the node on which the operation was performed – e.g. “/HotelML”.

StartTime

0..1

DateTime

The date and time the operation was started – e.g. ="2011-05-

20T24:03:18.119+00:00"

Success

0..1

Boolean

Status returned by the application performing the operation

TotalProcessTime

0..1

Integer

The total time required to perform the operation in milliseconds.

HotelML/Head/Warning

0..M

Returned if there is an error that did not prevent processing and the subsequent generation of a response, however, there are conditions associated with the error that should be looked at.

Code

1

Char 5

Error code. See XML UltraDirect v1.1 Error Codes document for a list.

Description

1

Char

Error description

FormDataPath

0..1

Char

This is the data path to the node that was being processed when the error occurred – e.g. "/HotelML/Form/PropertyInformation".

Normally returned when the XML request is invalid (i.e. does not validate against the XML schema.

ResponseDataPath

0..1

Char

This is the data path in the response message that incurred the error. This is currently used in the enhanced shopping transaction response to indicate the property that had the error/warning.

The format is ”Hotel/Property[@Code='UI;12345']” where UI;12345 is the property ID. See section 0 for an example of how this is used.

Type

1

Identifies the type of error. Values are:

“Validation” - XML instance document does not conform to grammar/syntax rules as dictated by the XML Schema.

“Malformed” - XML instance document does not conform to format as dictated by XML 1.0 specification.

“Security” - Requestor is not authorized to perform the requested function.

“Usage” - XML instance document does not conform to minimum data requirements defined by XSL Transform.

“SystemStatus” - Critical system is not available.

“Process” - The local or remote system that processed the request encountered an error.

HotelML/Head/Error

0..M

Returned if there is an error that prevented processing from occurring, but the system recovered and provided information about it. Same attributes as Warning.

HotelML/Head/Fatal

0..M

Returned if there is an error that resulted in the abortion of processing and the system did not recover. Same attributes as Warning.

Last updated