Search Localities
Query Overview
The searchLocalities
query allows you to search for localities created in Inventory based on their names. The returned fields include:
id
name
countryCode
unLocode
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.
note
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.
Returned Fields
LocalitiesRs (OBJECT)
Represents response data for localities.
Represents response data for localities.
Examples
Let's try to search for localities that contain "Washington" in their name and are located in the United States.