Hotel Categories
Query Overview
The hotelCategories query returns a list of the categories that a hotel can have assigned in Inventory. The returned fields include:
idname
1. Criteria
When building your query, you can provide the following input field:
Optional Input
categoryIds- A list of category IDs to retrieve specific hotel categories.
2. Settings
This query allows retrieving all hotel categories or filtering specific ones by providing category IDs.
The categoryIds field can be used to filter categories based on specific requirements.
{
"input": {
"categoryIds": [1, 2, 3]
}
}
Response Considerations
The query returns a collection of hotel categories along with success status and possible advise messages.
CategoriesRs (OBJECT)
categories(InventoryCategory) - A collection of retrieved hotel categories.id(Int) - Unique identifier for the category.name(String) - Name of the category.
success(Boolean) - Indicates whether the operation was successful.adviseMessages(AdviseMessage) - Messages related to the operation.code(ID) - AM code.type(String) - Error type.description(String) - Error description.level(Enum of AdviseMessageLevel) - Importance level (ERROR, WARN, INFO).external(ExternalMessage) - External message details.correlationID(ID) - Identifier for debugging.
Query Inputs
InventoryHotelCategoriesFilterInput (INPUT_OBJECT)
Hotel categories filter input.
Hotel categories filter input.
categoryIds(Int)
Category ids of the categories to retrieve.
Returned Fields
CategoriesRs (OBJECT)
Represents a response object for categories.
Represents a response object for categories.
adviseMessages(AdviseMessage)
List of advise messages.
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)
categories(InventoryCategory)
List of categories.
Category id * (Int) Category Id. Category Name.name(String)
success * (Boolean)
Indicates whether the operation was successful.
Examples
Retrieve full list of Hotel Categories
Retrieve a specific list of Hotel Categories
When utilizing the hotelCategories query, for more personalized results, filter specific categories based on your interests. For example, to retrieve only the Hotel Categories stars-related, add the categoryIds field with the following codes in your input: