DoSearch2

This method will return a list of locations, given search criteria. This call wraps the returned list in a structure that includes the total number of results. Default sorting and search type are configured in the admin under search rules.

Return Value: RestSearchResults

📘

Usage Tip

Results should be retrieved one page at a time. To retrieve the first 25 results, specify StartIndex = 0 and PageSize = 25. To retrieve the next 25 results, specify StartIndex=25, PageSize=25

SearchTypeOverride

The optional parameter SearchTypeOverride can be used to change the inherent search type for a particular country. The inherent Search Type refers to the Search Rules configured for a country on the Bullseye admin site. For example, if the search type for Australia is set to Radius Search, setting the SearchTypeOverride to the value for Country Search will result in all Australian locations being returned. The defined search types are:

Radius: 1 - Retrieves all locations that fall within the distance defined by the Radius parameter. For the US, the value of the Radius parameter is interpreted in miles; in all other countries it is considered kilometers. A starting point needs to be defined through a combination of the City, State, PostalCode, Latitude and Longitude parameters.

Territory: 2 - Based on the inputted starting point, retrieves all locations that belong to defined territories that include the starting point.

Literal: 3 - Retrieves all locations within a country that have the value in the Keyword parameter in their name.

Country: 4 - Retrieves all locations that fall within the country defined by the CountryId parameter. An example of when to use the SearchTypeOverride parameter is if no results are returned for a country configured for Radius Search. The fallback for that situation would be to have a second call with SearchTypeOverride set to Country that would return all locations for that country.

Territory Or Radius: 5 - Based on the inputted starting point, retrieves all locations that belong to defined territories that include the starting point. If no locations are found, a Radius Search will then be performed and all locations from that returned. For this to be effective, the Radius parameter must be supplied with a value.

Territory And Radius: 6 - Based on the inputted starting point, retrieves all locations that belong to defined territories that include the starting point. A Radius Search is then performed and the results combined with those from the Territory Search. For this to be effective, the Radius parameter must be supplied with a value.

Internet Only: 7 - Returns all internet only locations across all countries.

InternationalRadius: 8 - Performs a radius search based on an inputted set of geocodes without regard to country. This search path will bypass requiring ClientSettings/RoutingMethod/RoutingDetails records. Latitude and longitude are required.

Territory State: 13 - If a state is provided for a country that supports this search type, a state only territory search is performed using the inputted state. All locations within any defined territories that include that state are retrieved.

An example of when to use the SearchTypeOverride parameter is if no results are returned for a country configured for Radius Search. The fallback for that situation would be to have a second call with SearchTypeOverride set to Country that would return all locations for that country.

Including Territory Data

Setting the input parameter of IncludeTerritoryData = true will populate and return the TerritoryIDs and TerritoryNames field in the RestLocationResults return object. The value of the TerritoryIDs field will be a comma-separated string of all of the territory Ids associated with a location. The value of the TerritoryNames field will be a comma-separated string of all of the territory names associated with a location. No geographic data will be returned. If a returned location is not associated with any territories then null values are populated

If the FilterTerritoryData parameter is set to true and IncludeTerritoryData is set to true, only the territories that contain the search location will be returned with the location search results. If a location is not associated with any locations that include the search location, then an empty string is returned for TerritoryIds and TerritoryNames

Language