Skip to main content

Configuration

The Configuration method returns your connection configuration template as Seller in our platform. With this response we build a form, known as activation or connection form, where the Buyers fill the configuration parameters for the requests to you. In order to expedite the connections to your system through our platform it is important that all data in the configuration response is clear and explanatory as possible.

Configuration Request Example

<soapenv:Envelope xmlns:soapenv = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns = "http://schemas.xmltravelgate.com/hub/2012/06" xmlns:wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<soapenv:Header>
<wsse:Security>
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<ns:Configuration>
<ns:ConfigurationRQ>
<ns:timeoutMilliseconds>20000</ns:timeoutMilliseconds>
<ns:version>1</ns:version>
<ns:providerRQ>
<ns:code>suppliercode</ns:code>
<ns:id>1</ns:id>
<ns:rqXML>
<ConfigurationRQ xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
<timeoutMilliseconds>19700</timeoutMilliseconds>
<source>
<languageCode>en</languageCode>
</source>
<filterAuditData>
<registerTransactions>true</registerTransactions>
</filterAuditData>
<Configuration>
<User>user</User>
<Password>password</Password>
<UrlAvail>www.supplier.com/avail</UrlAvail>
<UrlReservation>www.supplier.com/reservation</UrlReservation>
<UrlValuation>www.supplier.com/valuation</UrlValuation>
<UrlGeneric>www.supplier.com/generic</UrlGeneric>
<Parameters>
<Parameter key = "UrlListHotels" value = "http://www.supplier.com/ListHotels"></Parameter>
<Parameter key = "Access" value = "22334"></Parameter>
</Parameters>
</Configuration>
</ConfigurationRQ>
</ns:rqXML>
</ns:providerRQ>
</ns:ConfigurationRQ>
</ns:Configuration>
</soapenv:Body>
</soapenv:Envelope>

Request Data Breakdown

Configuration request does not require any elements.

Configuration Response Example

After each request, the Seller will have to process the data and provide a response. Upon receiving a RuntimeConfiguration request, the Seller will send you a corresponding RuntimeConfiguration response.

<ConfigurationRS xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd = "http://www.w3.org/2001/XMLSchema">
<operationImplemented>true</operationImplemented>
<Parameters>
<Parameter>
<TagRunTime>UrlGeneric</TagRunTime>
<ProviderTagName>Endpoint Supplier</ProviderTagName>
<Show>true</Show>
<Mandatory>true</Mandatory>
<Pattern>^(?:(http(s)?|ftp|file):\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&amp;'\(\)\*\+,;=.]+$</Pattern>
<DescriptionPattern>Please, this field expects the value of a url.</DescriptionPattern>
<Description>Endpoint Supplier Restel</Description>
<Type>uri</Type>
<DefaultValue>http://xml.hotelresb2b.com/xml/listen_xml.jsp</DefaultValue>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<ProviderTagName>codigousu</ProviderTagName>
<Show>true</Show>
<Mandatory>true</Mandatory>
<Description>User code, credentials</Description>
<Type>string</Type>
<Key>Usuario</Key>
<ExampleValue>TravelgateTest</ExampleValue>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<ProviderTagName>clausu</ProviderTagName>
<Show>true</Show>
<Mandatory>true</Mandatory>
<Description>User Password, credentials</Description>
<Type>string</Type>
<Key>Password</Key>
<ExampleValue>travelgate123</ExampleValue>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<ProviderTagName>afiliacio</ProviderTagName>
<Show>true</Show>
<Mandatory>true</Mandatory>
<Pattern>[A-Z]{2}</Pattern>
<DescriptionPattern>Please, this field expects a 2 digit uppercase character value.</DescriptionPattern>
<Description>Affiliation of the user, affiliation of the XML account created. Two digit code, exactly as it is supplied by HOTUSA.This code refers to which brand it belongs to</Description>
<Type>string</Type>
<Key>Afiliacion</Key>
<ExampleValue>TS</ExampleValue>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<ProviderTagName>codusu</ProviderTagName>
<Show>true</Show>
<Mandatory>true</Mandatory>
<Pattern>[A-Z,0-9]{6}</Pattern>
<DescriptionPattern>Please, this field expects a value of 6 digits, uppercase or numeric characters.</DescriptionPattern>
<Description>User code</Description>
<Type>string</Type>
<Key>CodigoUsuario</Key>
<ExampleValue>D65934</ExampleValue>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<ProviderTagName>secacc</ProviderTagName>
<Show>true</Show>
<Mandatory>true</Mandatory>
<Pattern>[0-9]{5,6}</Pattern>
<DescriptionPattern>Please, this field expects a value of 5 or 6 numeric digits.</DescriptionPattern>
<Description>Access code, access sequence</Description>
<Type>string</Type>
<Key>SecAcc</Key>
<ExampleValue>245698</ExampleValue>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<Show>true</Show>
<Mandatory>false</Mandatory>
<Pattern>true|false</Pattern>
<DescriptionPattern>Please, this field expects a boolean value, 'true' or 'false'</DescriptionPattern>
<Description>If the value is true, we show only the non-refundable options.</Description>
<Type>boolean</Type>
<Key>ShowRateNonRefundable</Key>
<DefaultValue>false</DefaultValue>
<PossibleValues>
<PossibleValue>true</PossibleValue>
<PossibleValue>false</PossibleValue>
</PossibleValues>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<ProviderTagName>duplicidad</ProviderTagName>
<Show>false</Show>
<Mandatory>false</Mandatory>
<Description>Duplicity will serve to filter duplicates, that is, on some occasions,a hotel can offer us different offers, if we want them to appear all of them in the list, just do not include this tag or leave it to zero, if you want the list to appear of better offers, label in value 1 (thebest offer criterion is based on this order: better availability / better price of the. first room / regime find).</Description>
<Type>numeric</Type>
<Key>duplicity</Key>
<DefaultValue>0</DefaultValue>
<PossibleValues>
<PossibleValue>0</PossibleValue>
<PossibleValue>1</PossibleValue>
</PossibleValues>
</Parameter>
<Parameter>
<TagRunTime>Parameter</TagRunTime>
<Show>false</Show>
<Mandatory>true</Mandatory>
<Pattern>^(?:(http(s)?|ftp|file):\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&amp;'\(\)\*\+,;=.]+$</Pattern>
<DescriptionPattern>Please, this field expects the value of a url.</DescriptionPattern>
<Description>Url Room List</Description>
<Type>uri</Type>
<Key>urlListRooms</Key>
<DefaultValue>http://xtghubstatic.blob.core.windows.net/int-static-hotel/HOT-RoomTypes.csv</DefaultValue>
</Parameter>
</Parameters>
</ConfigurationRS>
Example of how the connection form would be displayed with the previous xml response:

Connection Form

Response Data Breakdown

ElementRelTypeDescription
ConfigurationRS1Root node.
ConfigurationRS/Parameters1
Parameters/Parameter1..n
Parameter/TagRunTime1EnumThis is the tag of the configuration node in the requests that you want to contextualize in the activation form. Possible values: User, Password, UrlAvail, UrlReservation, UrlValuation, UrlGeneric, Parameter.
Parameter/ProviderTagName1StringName of the parameter in the activation form, as you use our PULL Seller API, it is recomendable to put similar names used on it in a human readbility format. For example: Availability Url or Valuation Url. If it is an extra parameter, you should put a name similar to the key used, and preferly with a human readbility format too.
Parameter/Show1BooleanIndicates if you want to show the parameter in the connection form or not. May be you want that some parameter to be filled internally and you do not want the Buyer fill it in.
Parameter/Mandatory1BooleanIndicates if the parameter is compulsory or not in order to make a connection without any problem.
Parameter/Type1EnumThe parameter value data type. Posible types are: eString, eBoolean, eUri.
Parameter/Pattern0..1StringRegular expression to validate the parameter value. If the parameter type is eUri or eBoolean the pattern is mandatory, and has a specific regular expresion. You can find more information about patterns here. If the type is eString or you add the tag PossibleValues, the pattern is not mandatory.
Parameter/DescriptionPattern0..1StringThis is the error that the Buyer see if the parameter value do not validate the pattern. Please, fill this node if you want to expedite your connections and avoid future issues.
Parameter/Description0..1StringValue of the tooltip that explains the parameter. Avoid use an only word, avoid use the same value than ProviderTagName, and if it is an aditional parameter, avoid use the same value than Key. Please, fill this information to help the Buyer to connect you.
Parameter/Key0..1StringValue of the key attribute as you accept in the xml requests in Configuration node.
Parameter/DefaultValue0..1StringValue by the default, if the Buyer do not change it, all connections to you are set up with this value.
Parameter/ExampleValue0..1StringValue of the placeholder for this parameter in the form. If the Buyer do not fill the parameter, the value is empty
Parameter/PossibleValues0..1
PossibleValues/PossibleValue1..nStringIf you return a list of possible parameter values, in the connection form the Buyer only can choose one of this values.

Patterns for eUri and eBoolean

All the patterns must work with Golang and ECMAScript (javaScript). You can validate your regular expressions by this two laguanges at regex101

eUri: ^(?:(http(s)?|ftp|file):\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&’\(\)\*\+,;=.]+$

eBoolean: true|false

Here you have an example of the regex for an email: ^(\D)+(\w)*((\.(\w)+)?)+@(\D)+(\w)*((\.(\D)+(\w)*)+)?(\.)[a-z]{2,}$