Skip to main content

Localities

Query Overviewโ€‹

The localities query returns a list of all the possible localities that a hotel can have assigned in Inventory. The returned fields include:

  • id
  • name
  • countryCode
  • unLocode

1. Criteriaโ€‹

When building your query, you can provide the following input fields:

Optional Inputโ€‹

  • countryCodes - A list of ISO 2-character country codes associated with the localities to retrieve.

2. Settingsโ€‹

This query offers versatility, allowing you to filter localities based on country codes. This customization ensures that you retrieve only relevant information, streamlining the data retrieval process.

note

The countryCodes value follows the ISO 3166-1 alpha-2 standard.

{
"input": {
"countryCodes": ["ES", "FR"]
}
}

Response Considerationsโ€‹

The query returns a collection of localities along with success status and possible advise messages.

LocalitiesRs (OBJECT)โ€‹

  • localities (InventoryLocality) - A collection of retrieved localities.
    • id (Int) - Unique identifier for the locality.
    • name (String) - Name of the locality.
    • countryCode (String) - ISO 2-character country code.
    • unLocode (String) - UN/LOCODE associated with the locality.
  • 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โ€‹

InventoryLocalitiesFilterInput (INPUT_OBJECT)
Localities filter input.

countryCodes(String)

Country codes of the localities to retrieve. https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

Returned Fieldsโ€‹

LocalitiesRs (OBJECT)
Represents response data for localities.

adviseMessages(AdviseMessage)

Collection of advise messages.

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.

localities(InventoryLocality)

Collection of localities.

idย  *ย  (Int)

Unique identifier for the locality.

name(String)

Name of the locality.

countryCode(String)

ISO 2-character country code associated with the locality.

unLocode(String)

UN/LOCODE associated with the locality.

successย  *ย  (Boolean)

Indicates whether the response was successful based on the absence of advise messages.

Examplesโ€‹

Retrieve the full list of localities availableโ€‹

Retrieve localities from specific countriesโ€‹

When utilizing the localities Query, for more personalized results, filter specific localities based on your interests. For example, to focus solely on Spanish localities, add the countryCodes field with "ES" in your input: