POST api/locations/search/{filter}?take={take} Authentication required

Use this method to search for any type of location for multiple (or all) countries, using a term-based filter. This will return any type of location matching the input filter in the specified countries

Request

URI Parameters

NameDescriptionTypeAdditional information
filter

Term used to search locations in the specified countries (min. 3 chars long)

string

Required

take

[Optional] By default the search will return the first 100 locations of each type

integer

Default value is 100

Body Parameters

[Optional] Countries represented by their ISO 3166-1 alpha-2 Codes (2 chars long), if no country is provided, the search will be run on all countries available

Input : array of String

Input Sample

  • application/json, text/json :
  • [ "sample string 1", "sample string 2" ]
  • application/xml, text/xml :
  • <ArrayOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <string>sample string 1</string> <string>sample string 2</string> </ArrayOfstring>

    Response

    Returns any type of location matching the specified filter for the specified countries

    Output : object (See Model)

    Ouput Sample

  • application/json, text/json :
  • { "cities": [ { "countryCode": "BE", "code": "21004", "name": "Brussels", "type": "City", "level": 0 } ], "provinces": [ { "countryCode": "BE", "code": "99999990001", "name": "Brussels", "type": "Province", "level": 0 } ], "regions": [ { "countryCode": "BE", "code": "04000", "name": "Brussels", "type": "Region", "level": 0 } ] }
  • application/xml, text/xml :
  • <LocationSearchResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <Cities> <Location> <Code>21004</Code> <CountryCode>BE</CountryCode> <FullName i:nil="true" /> <LanguageCode i:nil="true" /> <Level>0</Level> <Name>Brussels</Name> <ParentCode i:nil="true" /> <ParentName i:nil="true" /> <Type>City</Type> </Location> </Cities> <PostCodes i:nil="true" /> <Provinces> <Location> <Code>99999990001</Code> <CountryCode>BE</CountryCode> <FullName i:nil="true" /> <LanguageCode i:nil="true" /> <Level>0</Level> <Name>Brussels</Name> <ParentCode i:nil="true" /> <ParentName i:nil="true" /> <Type>Province</Type> </Location> </Provinces> <Regions> <Location> <Code>04000</Code> <CountryCode>BE</CountryCode> <FullName i:nil="true" /> <LanguageCode i:nil="true" /> <Level>0</Level> <Name>Brussels</Name> <ParentCode i:nil="true" /> <ParentName i:nil="true" /> <Type>Region</Type> </Location> </Regions> </LocationSearchResult>