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.
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.
Localities filter input.
Returned Fields
LocalitiesRs (OBJECT)
Represents response data for localities.
Represents response data for localities.
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: