Search Localities
Query Overviewโ
The searchLocalities query allows you to search for localities created in Inventory based on their names. The returned fields include:
idnamecountryCodeunLocode
1. Criteriaโ
When building your query, you need to provide the following input fields:
Mandatory Inputโ
localityName- The name of the locality to search for.
Optional Inputโ
countryCode- The ISO 2-character country code to filter localities by country.
2. Settingsโ
This query allows searching for localities by name and optionally filtering by country code to get more precise results.
The countryCode value follows the ISO 3166-1 alpha-2 standard.
{
  "input": {
    "localityName": "Washington",
    "countryCode": "US"
  }
}
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โ
InventoryLocalitiesSearchFilterInput (INPUT_OBJECT)
Localities filter input.
Localities filter input.
countryCode(String)
Country code of the localities to retrieve. https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
localityName(String)
Locality name
Returned Fieldsโ
LocalitiesRs (OBJECT)
Represents response data for localities.
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: 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)
localities(InventoryLocality)
Collection of localities. 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.name(String)
countryCode(String)
unLocode(String)
successย  *ย  (Boolean)
Indicates whether the response was successful based on the absence of advise messages.
Examplesโ
Let's try to search for localities that contain "Washington" in their name and are located in the United States.