Message Flow

 

In order to carry out any interaction with the platform, it is necessary to have previously opened a session (view Sesión Abrir). Once opened, the operations are performed, the session is closed (view Sesión Cerrar) and the process is finalized. 

 

Basic booking flow: 

 

After opening the session, a request for hotel availability with the desired parameters should be made. The search can be performed as many times as needed. Once a hotel is selected from the availability response, it can be blocked. Blocking is always performed on the latest availability..

 

Once the hotel is blocked, we can proceed to close the booking. The platform supports a "shopping cart," so blocks can be removed or new blocks can be added to the cart (view Bloqueo Servicio). 

Once the booking is closed, the session can be closed, and the process is finalized.


 

Message Definition

 

The following nomenclature is used for definig XML messages. 

 

Element name: description of the element.

 

Element

M

Type

Values/format

Description

@elementAttribute

Y

Integer 

minimum value: 0 

Description of the simple element

elementSimple 

Y

String 

length: 10 

Description of the simple element

elementGroup 

N

elementGroup(Group)

View definition 

View definition

elementComplex 

Y

elementComplex 

View definition 

View definition

 


 

Used in:

elementComplex1 

elementComplex2 

elementComplex3


Example of XML message: 


<elementNameelementAttribute="1">  

<elementSimple>Example1</elementSimple> 

<elementSimple>Example2</elementSimple>  

</elementName> 

 

The messages have been defined using the official standard XSD definition from W3C.


You can refer to the official definitions at: 

 

XML Schema: http://www.w3.org/XML/Schema

W3C Recommendation: http://www.w3.org/TR/xmlschema-1/ 

 

The W3Schools website can also be helpful as it contains many examples.

 

Column Element:  XML field name or group name. Group elements and complex elements will be marked in italics.

 

Columna Mindicates if the element is mandatory (Y) or not (N). The value CHOICE (C) indicates a choice. That means it can be mandatory or not depending on another element. In such cases, an additional comment will be added in the Comments section. 

 

Column Values/Formatindicates the type of the element. 

  • It can be a primitive type: String, Boolean, Integer, etc. 
  • An enumeration: a predefined list of values in a closed domain. For example 'tiperr' only admits valid values E, W or I. 
  • An elementGroup consisting of several simple or complex elements. For example, all response messages may contain certain elements with error information in case an error occurs (tiperr, coderr, txterr). To avoid duplicating these fields in all messages, an errorGroup has been created, which contains the definition of these fields.

 

Additional notes about groups: 

The element group  used in the XSD detinition is not reflecte in the XML. It is used to have a more manageable structure in the XSD definition. 

 

For example, in the case of SesionAbrirRespuesta (SessionOpenResponse) message that encountered an error, the XML message returned by the server would have the following structure:

 

<SesionAbrirRespuesta> 

<tiperr>E</tiperr> 

<coderr>SAN-121</coderr> 

<txterr>Usuario incorrecto</coderr> 

</SesionAbrirRespuesta> 

 

  • elementComplex: An element defined separately. 
  • Element list []: Indicated with brackets when the element can be repeated. 

 

Column Values/format:These are application restrictions for the element. Different options include maximum and/or minimum length, values from a closed domain, regular expressions, etc. For complex elements, a  “View definition”

link will be provided, redirecting to the information of the specific type.

 

In general, the values of maximum and/or minimum length, and maximum and/or minimum values have the following meaning: 

 

  • For String values, they are always inclusive, meaning that if the restriction is a maximum of 100, the value of 100 is included.
  • For numeric values such as Integer or Short, they are inclusive for the minimum values and exclusive for the maximum values. For example, a minimum value restriction of 0 and a maximum value restriction of 1000 means that the possible values are from 0 to 999. 

 

 

Column Description: Brief description of the element, as well as a list of possible values it can have. Similar to the restrictions column, for complex elements, a "View definition" link will be provided, redirecting to the information of the specific type.

 

Used in: A list with the names of the complex elements that use the current element. Each name will be a link to the definition of the specific type.

 


Common elements in Messages

 

There are certain XML elements and element groups that are used in multiple messages.

 

Group Error

 

All response messages may contain information about errors that may have ocurred. 

 

Error (Group): a group of elements with error data. 

 

Element

M

Type

Values/Format

Description

tiperr

Enumeration 

E

W

I

Error type: 

E: error. it will stop the system.

W: warning. It will stop the system.

I: information. It will not stop the system.

coderr

String 

Maximum length: 10

Error code

txterr

String 

Maximum length: 1000

Error description

 

Used in:

 

Example of an error in the SesionAbrir response: 

 

<SesionAbrirRespuesta> 

<tiperr>E</tiperr>  

<coderr>SAN-121</coderr>  

<txterr>Usuario incorrecto</txterr>  

</SesionAbrirRespuesta> 

 


Check dominium


A series of fields have been defined in various elements that can only have values of "YES" or "NO". For these fields, a closed domain has been created with the values "S" and "N". 

In general, these are all the fields that start with the letters CHK.