Skip to main content

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:

  • id
  • name

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.

note

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.

categoryIds(Int)

Category ids of the categories to retrieve.

Returned Fieldsโ€‹

CategoriesRs (OBJECT)
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:

  • WARN: Warning message.
  • ERROR: Error message.
  • INFO: Info message.
external(ExternalMessage)

Specify the external message.

code(String)

External code.

messageย  *ย  (String)

External message.

correlationIDย  *ย  (ID)

Identifier to investigate the cause of the error.

categories(InventoryCategory)

List of categories. Category

idย  *ย  (Int)

Category Id.

name(String)

Category Name.

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: