Use this method to get the location object with the specified hierarchical location code.
Output / Response
Returns the entity that matches the specified hierarchical location code. If no entity is found, returns an empty APIEntity. For a list of supported properties, refer to Location.
API Call:
APIEntity getLocationByCode( String code )
Parameter | Description |
---|---|
code | The hierarchical location code consists of a set of 1 to 3 alpha-numeric strings
separated by a space. The first two characters indicate a country, followed by next
three characters which indicate a city in UN/LOCODE. New custom locations created
under a UN/LOCODE city are appended to the end of the hierarchy. For example, CA
TOR OF1 indicates:
Note: The code is case-sensitive. It must be all UPPER CASE letters.
The county code and child location code should be alphanumeric strings. |