Hotels Master
Query Overview
The hotelsMaster query returns a list of all the hotel masters created in Inventory. The returned fields include:
idnameemailphonesfaxaddresspostalCodelatitudelongitudeexternalCodecategoryidname
localityidnamecountryCode
hotelCodecontextCode
1. Criteria
This query offers three alternative ways of retrieving hotel masters:
- By Hotel code and context
- By country
- By locality
Optional Input
countryCodes
2. Settings
When building your hotelsMaster query, you can use one of the provided filtering methods based on your needs.
The localityId value from the desired locality can be retrieved using the queries Localities or Search Localities.
The possible values for contextCode can be retrieved using the query Inventory Contexts.
Response Considerations
The query returns a collection of hotels along with success status and possible advise messages.
HotelsRs (OBJECT)
hotels(InventoryHotelMaster) - A collection of retrieved hotels.id(Int) - Unique identifier.name(String) - Hotel name.email(String) - Contact email.phones(String) - Phone numbers.fax(String) - Fax number.address(String) - Physical address.postalCode(String) - Postal code.latitude(Decimal) - Geographic latitude.longitude(Decimal) - Geographic longitude.category(InventoryCategory)id(Int) - Category ID.name(String) - Category name.
locality(InventoryLocality)id(Int) - Locality ID.name(String) - Locality name.countryCode(String) - ISO country code.
hotelCode(String) - Supplier's hotel code.contextCode(String) - Context code associated.
success(Boolean) - Indicates if the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.
Query Inputs
InventoryHotelsMasterSearchFilterInput (INPUT_OBJECT)
Hotel master filter input.
Hotel master filter input.
geoCoordinates(GeoFiltersInput)
The geographical coordinates to use in the search. latitude * (Decimal) The latitude of the location. longitude * (Decimal) The longitude of the location. radiusKm * (Decimal) The radius, in kilometers, within which to search. Value must be greater than 0 and lowetr than 100.
hotelName(String)
The name of the hotel to search for.
Returned Fields
HotelsRs (OBJECT)
The HotelsRs class represents the response object for hotel-related operations.
The HotelsRs class represents the response object for hotel-related operations.
adviseMessages(AdviseMessage)
A collection of advise messages related to the operation. See AdviseMessage. code * (ID) AM code: The following codes can be returned: description * (String) Error description level * (AdviseMessageLevel) Indicates the level of importance of the message.
Possible values: ERROR, WARN, INFO.
Possible values: Specify the external message. External code. message * (String) External message. correlationID * (ID) Identifier to investigate the cause of the error.WARN: Warning message.ERROR: Error message.INFO: Info message.external(ExternalMessage)
code(String)
hotels(InventoryHotelMaster)
A collection of hotels. See Hotel. id * (Int) The unique identifier of the hotel. The name of the hotel. The email address of the hotel. The list of phone numbers of the hotel. The fax number of the hotel. The physical address of the hotel. The postal code of the hotel's location. The latitude of the hotel's location. The longitude of the hotel's location. The external code of the hotel. The category of the hotel. id * (Int) Category Id. Category Name. The locality of the hotel. id * (Int) Unique identifier for the locality. Name of the locality. ISO 2-character country code associated with the locality. UN/LOCODE associated with the locality. The code of the hotel. The context code of the hotel.name(String)
email(String)
phones(String)
fax(String)
address(String)
postalCode(String)
latitude(Decimal)
longitude(Decimal)
externalCode(String)
category(InventoryCategory)
name(String)
locality(InventoryLocality)
name(String)
countryCode(String)
unLocode(String)
hotelCode(String)
contextCode(String)
success * (Boolean)
Indicates whether the operation was successful.
Examples
Search for Hotel masters by their code
When searching by hotel code, it is important to know that the default value of the field contextCode will be "TGX_PUSH", so if the hotels to retrieve
are from a supplier that works with native codes, their respective Inventory Context must be passed in the field contextCode.
The possible values for contextCode can be retrieved using the query Inventory Contexts.
Search for the full list of Hotel masters linked to a specific Inventory Context
Another possibility is to retrieve directly all the hotels linked to a specific Inventory Context. For that, fill in your input just the Inventory Context in the field contextCode.
Search for Hotel masters by country
When utilizing the Hotels Query, for more personalized results, filter specific hotels based on your interests. For example, to focus solely on hotels located in Spain, add the countryCode field with "ES" in your input:
Search for Hotel masters by locality
Similarly to the previous query, to filter the results and retrieve only hotels from a specific Locality, for example, Palma de Mallorca, set your query variables as follows:
The localityId value from the desired Locality, can be retrieved using the queries Localities or Search Localities.