Skip to main content

Quote

Quote operation evaluates the rate before booking, providing the same information as the Search response for a hotel rate, including up-to-date pricing and cancellation policies. The returned fields include:

  • status
  • price
  • cancelPolicy
  • rooms
  • surcharges
Important

The information retrieved in Quote, such as pricing and policies, is always the most up-to-date and takes precedence over the data from Search.

Availability, prices, and conditions may change between Search and Quote, so make sure to always rely on Quote for the latest details.

Query Overview

When creating your quote query, you have two different inputs to fill based on your specific needs:

  1. Criteria
  2. Settings
query {
hotelX {
quote
criteria: {}
settings: {}
}
}
Remember
It's important to note that even if certain fields in the "criteria" or "settings" inputs are labeled as optional, we still need to use some value internally. This value will either come from your query/mutation request or your default settings. You have the ability to manage your default API settings by visiting the API Settings section on our website.

1. Criteria

This query offers versatility in quote options, with certain fields marked as mandatory (optionRefId) and others as optional (language). This flexibility empowers you to create a personalized Quote Query, tailoring the requested fields to your specific needs.

To specify your quote criteria you need to use the input HotelCriteriaQuoteInput in your query variables:

{
"optionRefId": "13[%!03!~|3[%@241028!~|241029!~|1!~|1!~|0!~|ES!~|ES!~|es!~|EUR!~|0!~|2!~|1!~|1!~|1!~|0!~|15091141!~|BAR[%@BAR!~|146[%@0[%@false[%@EUR[%@[%@0[%@!~|1|30#30|1|2024-10-28|1|4132467|4132468|1|11|0!~|2269[%!2269!~|30[%@30!~|!~|Double Standard!~|1!~|!~|mercado[%@ES[%!ExpireDate[%@29/10/2024[%!tarifaNRF[%@true[%!RateRule[%@tarifaNoRefundablePorHabitacion!~|OK!~|Sith!~|0!~|"
}

Mandatory criteria:

  • optionRefId (Identifier of the option chosen in Search)

Optional criteria:

  • language

2. Settings

Settings are the common configurations used to construct requests to the supplier/s. By default, we apply the same configuration to all Hotel-X clients.

To specify your quote settings you need to use the HotelSettingsInput input in your query variables:

{
"settings": {
"client": "client_demo",
"context": "HOTELTEST",
"testMode": true,
"auditTransactions": false,
"timeout": 10000
}
}

Mandatory Settings:

  • client
  • context (You have the flexibility to choose between using the supplier's context or your own, depending on which codes you want to see in the response. If you prefer to receive responses with your custom codes, please ensure that your context code is linked to the mapping files that you've previously uploaded to your FTP account.)
  • timeout (Timeout in milliseconds for the supplier connection. Won't close client connection if exceeded.)

Optional Settings:

  • group
  • auditTransactions
  • suppliers (Each one contains its own code, settings and accesses.)
  • plugins
  • testMode (This flag allows only the accesses checked as test.)
  • clientTokens (Used to identify the origin of the request, this is only used with some plugins.)
  • businessRules
Key Recommendations
  • Customize the timeout according to your needs, taking into consideration the maximum values in Quote is 180,000ms.

  • Set the audiTransaction to "true" in Quote when investigating errors.

Response Considerations

As mentioned earlier, the quote response will provide you with updated information about the option you selected during the search step. In this quote response, there are some essential details that you should carefully review and consider when providing information to your final customers:

  • Cancellation Policies: Within the cancelPolicy structure response, you will find a refundable field. If this field is marked as "false," it means that the room has a 100% cancellation cost, making it non-refundable.

  • Remarks: Pay attention to any remarks or additional notes provided in the response.

  • Surcharges (taxes): Ensure you are aware of any applicable surcharges or taxes associated with the selected option.

Query Inputs

HotelSettingsInput (INPUT_OBJECT)
Settings are the common configurations used to construct requests to the supplier/s. By default, we apply the same configuration to all Hotel-X clients in our back system.

context (String)
Indicates the context of the I/O codes (hotel, board, room and rates)

client (ID)
Client name set in TGX, present only if the authorization header is of the JWT type. It is used to modify the user initially set in the preload.

timeout (Int)
Specifies the time limit, in milliseconds, for connecting with suppliers. If multiple suppliers are involved, this timeout applies to all of them. If a supplier exceeds this time limit, the connection to that supplier will be cut. However, Travelgate will keep the connection with the client even if this timeout is exceeded. If not set, the value saved in your Hotel-X API default settings will be used.

operationTimeout (Int)
Defines the maximum time, in milliseconds, before an operation is cancelled by our system. Once this time is reached, the operation will be aborted and an error will be returned. This timeout is for the Hotel-X layer and should be set to a higher value than the timeout for suppliers. For example, you could specify timeout as 20000ms and operationTimeout as 22000ms. This means that we will send a timeout of 20000ms to the suppliers and will close the connection at 22000ms if the operationTimeout is exceeded. Optional. @deprecated(reason: "deprecated from 2024-11-11.")

auditTransactions (Boolean)
Returns all the transactions exchanged with the supplier.

businessRules (BusinessRulesInput)
Business rules

optionsQuota (Int)
The maximum number of options returned per board in the search query. If not set, the value saved in your Hotel-X API default settings will be used.

businessRulesType (Enum of BusinessRulesType)
Different business rules to filter the returned options.
Possible values:
CHEAPER_AMOUNT
ROOM_TYPE

suppliers  *  (HotelXSupplierInput)
Array of suppliers. Each one contains its own code, settings and accesses.

settings (SettingsBaseInput)
You can configure an special settings for any supplier. This level overwrites the avail settings level but not the access settings level.

timeout (Int)
Milliseconds before the connection is closed.

auditTransactions (Boolean)
Specifies if the exachanged transactions with the supplier have to be logged or not.

currency (Currency)
Currency in ISO 4217 standard

commitRequired (Boolean)
Indicates if the book will be confirmed in 1 or 2 steps

code  *  (String)
Code that represents a supplier in our system. This information is mandatory.

accesses  *  (HotelXAccessInput)
Array of accesses that can overwrite an existing access information or include a new access for this avail.

accessId  *  (ID)
The accessID used to identify the existing access in our Back Office in order to overwrite it. Acts as an identifier in this search. It can either exist or not.

configuration (ConfigurationInput)
Information required to access the supplier s system.

username (String)
User name for the connection.

password (String)
Password for the connection

urls  *  (UrlsInput)
URL or endpoint for the connection.

search (URI)
Specific URL for Availability method.

quote (URI)
Specific URL for Reservation method.

book (URI)
Specific URL for Valuation method.

generic (URI)
Supplier URL used for multiple methods.

parameters  *  (ParameterInput)
List of parameters with additional required information.

key  *  (String)
Contains the keyword/Id to identify a parameter. This information is mandatory.

value  *  (String)
Contains the parameter values. This information is mandatory.

markets  *  (String)
Source Markets allowed for the Access (use ISO3166_1_alfa_2).

rateRules  *  (Enum of RateRulesType)
RateRules allowed for the access.
Possible values:
NORMAL
PACKAGE
OLDER55
OLDER60
OLDER65
CANARY_RESIDENT
BALEARIC_RESIDENT
LARGE_FAMILY
HONEYMOON
PUBLIC_SERVANT
UNEMPLOYED
NON_REFUNDABLE
MOBILE
WARRANTY
ESSENTIAL_WORKER
NEGOTIATED
CUSTOM

plugins  *  (PluginStepInput)
Array of plugins to execute.

step  *  (Enum of PluginStepType)
Indicates where the plugin will be executed.
Possible values:
REQUEST
REQUEST_ACCESS
RESPONSE_OPTION
RESPONSE_ACCESS
RESPONSE

pluginsType  *  (PluginsInput)
Indicates the plugin that will be executed.

type  *  (Enum of PluginType)
Type of the plugin to execute
Possible values:
PRE_STEP
HOTEL_MAP
BOARD_MAP
ROOM_MAP
CURRENCY_CONVERSION
MARKUP
AGGREGATION
POST_STEP
COMMISSION
MARKETS_GROUP
AMENITY_MAP
PROMOTION_MAP

name  *  (String)
Name of the plugin to execute

parameters  *  (undefined)
Parameters of the plugin

testMode (Boolean)
This flag is only allowed to be used for the access checked as 'TEST.' By default, it is set to 'LIVE.'

clientTokens  *  (String)
Used to identify the origin of the request. This is solely used in plugins.

commitRequired (Boolean)
Indicates if the book will be confirmed in 1 or 2 steps. It only should be used in Book.

HotelCriteriaQuoteInput (INPUT_OBJECT)
The quote criteria contains the unique option reference id and language.

optionRefId  *  (String)
Identifier of the chosen option in the search.

language (Language)
Language to be used in the request.

HotelXFilterInput (INPUT_OBJECT)

plugin (HotelXPluginFilterInput)
Only is possible to specify one of this filters, it allows to filter which plugins have to be executed or excluded

includes  *  (HotelXFilterPluginTypeInput)
Plugins to be only executed

step  *  (Enum of PluginStepType)
The Step of the plugin to filter
Possible values:
REQUEST
REQUEST_ACCESS
RESPONSE_OPTION
RESPONSE_ACCESS
RESPONSE

type  *  (String)
The Type of the plugin to filter

name  *  (String)
The Name of the plugin to filter

excludes  *  (undefined)
Plugins to exclude

Returned Fields

HotelQuote (OBJECT)

stats (StatsRequest)
Application stats in string format

total  *  (Stat)
Total transaction time

start  *  (DateTime)
Start UTC

end  *  (DateTime)
End UTC

duration (Float)
Difference between start and end in miliseconds

validation  *  (undefined)
Request validation time

process  *  (undefined)
Process time. Contains communication time, parse time and plugin time.

configuration  *  (undefined)
Build access time

request  *  (undefined)
Request time

response  *  (undefined)
Response time

requestPlugin (StatPlugin)
Plugin execution time

name  *  (String)
Plugin name

total  *  (undefined)
total plugin time

hotels  *  (Int)
Number of hotels

zones  *  (Int)
Number of zones

cities  *  (Int)
Number of cities

dockerID  *  (String)
Docker Id

Accesses  *  (StatAccess)
Detail access time

name  *  (String)
Access name

total  *  (undefined)
Total access time

hotels  *  (Int)
Number of hotels

zones  *  (Int)
Number of zones

cities  *  (Int)
Number of cities

transactions  *  (StatTransaction)
Detail transaction time

reference  *  (String)
Extra information about transaction.

total  *  (undefined)
Total transaction time

buildRequest  *  (undefined)
Build request time

workerCommunication  *  (undefined)
Worker connection time

parseResponse  *  (undefined)
Parse response time

plugins  *  (undefined)
Plugin execution time

auditData (AuditData)
Data sent and received in the supplier's native format.

transactions  *  (Transactions)
List of the transactions data.

request  *  (String)
Transaction Request.

response  *  (String)
Transaction Response.

timeStamp  *  (DateTime)
Time when the request has been processed.

timeStamp  *  (DateTime)
Timestamp.

processTime  *  (Float)
Process time of the transaction data in milliseconds (ms).

optionQuote (HotelOptionQuote)
Information about quote response.

optionRefId  *  (String)
It is an unique identifier for the option created by HotelX system. The ID is used to make the quote query, so it is important not to modify it by any reason.

status  *  (Enum of StatusType)
The possible values in the response's status are Available (OK) or On Request (RQ).
Possible values:
OK
RQ

price  *  (Price)
Specifies the prices (Gross and Net) of the returned option.

currency  *  (Currency)
Currency code indicating which currency should be paid.

binding  *  (Boolean)
It indicates whether the gross price must be honored, meaning the customer cannot sell the room/option at a price lower than the supplier's established rate.

net  *  (Float)
It indicates the net price that the customer must pay to the supplier. The net price is calculated by substrating the included surcharges from the gross price. (For calculation purposes only)

gross  *  (Float)
Indicates the retail price that the supplier sells to the customer.

exchange  *  (Exchange)
Provides currency information and the applicable rate for the results returned by the Supplier

currency  *  (Currency)
Provide information about the currency of origin

rate  *  (Float)
Provides information about the rate applied over results

markups  *  (Markup)
Informs markup applied over supplier price.

channel (String)
channel of markup application.

currency  *  (Currency)
Currency code indicating which currency should be paid. This information is mandatory.

binding  *  (Boolean)
It indicates if the price indicated in the gross must be respected. In case minimumSellingPrice is not empty, the binding indicates instead that the minimumSellingPrice must be respected. That is, the customer can not sell the room / option at a price lower than that established by the supplier. This information is mandatory.

net  *  (Float)
Indicates the net price that the customer must pay to the supplier plus the markup. This information is mandatory.

gross (Float)
Indicates the retail price that the supplier sells to the customer plus the markup.

exchange  *  (undefined)
Informs about the currency of origin, and the rate applied over result. This information is mandatory.

rules  *  (Rule)
Breakdown of the applied rules for a markup

id  *  (String)
rule identifier

name (String)
rule name

type  *  (Enum of MarkupRuleType)
type of the value
Possible values:
PERCENT
IMPORT

value  *  (Float)
value applied by this rule

minimumSellingPrice (Float)
Indicates the minimum selling price it can be sold (determined by the Seller). Is is specified (not null), that field takes preference to Gross and Binding.

searchPrice (PriceChange)
Specifies the price of the previous Search option, returned only if it has changed. If not, this field will be returned as Null.

currency  *  (String)
The currency of previous option.

net  *  (Float)
The net value of previous option.

gross  *  (Float)
The gross value of previous option.

binding  *  (Boolean)
Indicates if previous option price was binding or not

cancelPolicy  *  (CancelPolicy)
Specifies cancel policies of the returned option.

refundable  *  (Boolean)
Indicates if the option is refundable or non-refundable

cancelPenalties  *  (CancelPenalty)
List of cancellation penalties

deadline (DateTime)
Cancellation fees will be applicable between this date and check-in date

isCalculatedDeadline  *  (Boolean)
Specifies if the deadline has been taken from the seller’s response (false) or has been calculated by TravelgateX (true)

penaltyType  *  (Enum of CancelPenaltyType)
Type of penalty; this can be Nights, Percent or Import
Possible values:
NIGHTS
PERCENT
IMPORT

currency  *  (Currency)
Currency used in the cancellation policy

value  *  (Float)
Value of the cancellation policy

description (String)
Extra details and information about supplier's cancel policies to give a further insight. This information is not supported for all the suppliers.

remarks (String)
Additional information about the option.

surcharges  *  (Surcharge)
List of surcharges of the returned option.

code (String)
Indicates the surcharge code

chargeType  *  (Enum of ChargeType)
Indicates the charge type. We need to know whether the supplements have to be paid when the consumer gets to the hotel or beforehand. Possible charge types: INCLUDE or EXCLUDE. when INCLUDE : this surcharge is mandatory and included in the option s price when EXCLUDE : this surcharge is not included in the option s price
Possible values:
INCLUDE
EXCLUDE

mandatory  *  (Boolean)
Indicates if the surcharge is mandatory or not. If mandatory, this surcharge will be applied to this option. If the chargeType is EXCLUDE the customer will have to pay it directly at the hotel.

price  *  (undefined)
Indicates the surcharge price.

description (String)
Specifies the surcharge description.

cardTypes  *  (Enum of PaymentCardType)
List of credit cards allowed for this option
Possible values:
VI
AX
BC
CA
CB
CU
DS
DC
T
R
N
L
E
JC
TO
S
EC
EU
TP
OP
ER
XS
O

addOns (AddOns)
Additional information about the option.

distribution  *  (AddOn)
Extra information from the Distribution layer.

key  *  (String)
Contains keyword/ID to identify the AddOn.

value  *  (JSON)
Contains AddOn values.

supplier  *  (undefined)
Extra information from the Supplier layer.

rooms  *  (RoomOptionQuote)
List of rooms of the selected option.

occupancyRefId  *  (ID)
ID reference to the occupancy.

legacyRoomId  *  (ID)
Identifies the legacy room ID.

code  *  (String)
Indicates the room code.

supplierCode  *  (String)
Supplier's room code.

description (String)
Description about the room. This field can be mapped.

descriptionSupplier (String)
Description about the room in supplier's context.

features  *  (Feature)
Room features.

code  *  (String)
Feature code.

amenities  *  (Amenity)
Room level amenities provide information about features intended to enhance comfort and enjoyment. Examples include swimming pools, shopping centers, etc.

code  *  (String)
Code

amenityCodeSupplier  *  (String)
Code in supplier context

type  *  (Enum of ApplicationAreaType)
Indicates the type of Amenity.
Possible values:
HOTEL
ROOM
SERVICE
GENERAL

value  *  (String)
Contains the value of amenity.

texts  *  (String)
Contains the descriptive of amenity.

paymentType  *  (Enum of PaymentType)
Indicates the payment type of the option returned. Possible options: MERCHANT, DIRECT, CARD_BOOKING and CARD_CHECK_IN.
Possible values:
MERCHANT
DIRECT
CARD_BOOKING
CARD_CHECK_IN

boardCode (String)
Indicates the board code mapped.

boardCodeSupplier (String)
Indicates the board code in supplier's context.

hotelCode (String)
Code of the hotel in the context selected. If the supplier does not provide the hotel code, then the hotel code will be the same as the hotel code in the search request.

hotelCodeSupplier (String)
Supplier's hotel code. If the supplier does not provide the hotel code, then the hotel code will be the same as the hotel code in the search request.

occupancies  *  (Occupancy)
List of occupancies for the request. If the supplier does not provide the occupancies, then the occupancies will be the same as the occupancies in the search request.

id  *  (Int)
Unique ID room in this option.

paxes  *  (Pax)
List of pax of this occupancy.

age  *  (Int)
Passenger age on the day of check-in, which can vary for adults, infants, or babies depending on each supplier's particular age range.

name (String)
Specifies the pax name.

surname (String)
Specifies the pax surname.

title (Enum of PersonalTitleType)
Specifies the pax title.
Possible values:
MR
MRS
MISS
MS
NOT_SPECIFIED

rateRules  *  (Enum of RateRulesType)
Specifies rate rules of the option returned. Note: If the option does not have any rate rule, then the option is NORMAL rate. If the supplier does not provide the rate rules, then the rate rules will be the same as the rate rules in the search request.
Possible values:
NORMAL
PACKAGE
OLDER55
OLDER60
OLDER65
CANARY_RESIDENT
BALEARIC_RESIDENT
LARGE_FAMILY
HONEYMOON
PUBLIC_SERVANT
UNEMPLOYED
NON_REFUNDABLE
MOBILE
WARRANTY
ESSENTIAL_WORKER
NEGOTIATED
CUSTOM

errors  *  (Error)
Errors that abort services

code  *  (String)
Error code.

type  *  (String)
Error type.

description  *  (String)
Error description.

warnings  *  (Warning)
Potentially harmful situations or errors that won't force the service to abort. To identify if it is blocked one, you can check our documentation regards this matter.

code  *  (String)
Warning code

type  *  (String)
Warning type

description  *  (String)
Warning description

Examples

Frequently Asked Questions

Do I have to perform a Quote Query in order to Book an option?
Yes, in order to confirm a reservation, it is necessary to complete all three Booking Flow methods: Search, Quote, and Book.
Are there any limitations on the number of Hotel-X Quote requests allowed per minute?
Not from Travelgate side, we don't have any limitations on the RPM ("Requests for Minute") in any of our methods. However, some Sellers may have some limitations so we suggest you contact directly with them in order to discuss this information.
Do options get blocked in Hotel-X Quote Query?
Some Sellers may block the options when performing a Quote Query so we strongly recommend to contact them directly regarding this topic in order to prevent future issues.
Is there any possibility to obtain RoomCodes in Quote?
If the Seller provides this information, you can obtain the room code by including the rooms node in the HotelOptionQuote node.
What should I do if I receive a status RQ in Quote response?
You may receive a status On Request (status RQ) in Quote response in those cases the availability of the option previously selected is pending to be confirmed by the Seller. If you receive status RQ in Quote response, you should run a new Search request and restart the Booking Flow.