Skip to main content

Address Resolution & Lookup Services

In ResQueServe, an address is not than just a string of text.

Updated over a month ago

To enable accurate dispatching, routing, and simulation behavior, entities (like POIs) are frequently linked to Structured Address Records.

Instead of manually typing "Pariser Platz, 10117 Berlin", you should resolve this location to a canonical Address ID. This ensures that:

  1. The location is verified against the map data.

  2. The simulation knows exactly which district and city the entity belongs to.

  3. Geocoding happens efficiently on the server side.


Critical Prerequisite: Dispatch Center Configuration

Before you can use the Lookup API, you must configure the environment. The LookupClient searches against a pre-indexed database of addresses defined for your specific Dispatch Center. If these settings are missing, the API will return empty results or errors.

Administrator Action Required

  1. Log in to the Admin Dashboard of the Dispatch Center.

  2. Navigate to General Settings.

  3. Ensure the Address Package is selected (e.g., "DACH-Region").

  4. Navigate to Area Settings.

  5. Define the Area. The lookup endpoint will only provide addresses in this area.

If the "Address Package" is not set, SearchAddressesAsync will fail.


Using the LookupClient

The SDK provides the LookupClient to perform fuzzy searches against the configured address database.

Registration

Like other clients, it is automatically registered when you call AddResQueServeDashboardClient.

C#

public class AddressService(LookupClient lookupClient) { ... }

Searching for an Address

The primary method for developers is SearchAddressesAsync. This allows you to find a street or location by name and retrieve its internal ID.

Parameters:

  • dpcId: The Dispatch Center ID.

  • query: The text to search for (e.g., "Bahnhofstr").

  • isInArea: (Default: true) If set to true, it filters results to only include addresses geographically inside the Dispatch Center's defined Polygon. Set to false if you need to search the entire Address Package (e.g., for cross-border POIs).

C#

public async Task<long?> ResolveStreetId(long dpcId, string streetName, string cityName)
{
// Search for "Bahnhofstraße Duderstadt"
// Combining street and city often yields better ranking
var query = $"{streetName} {cityName}";

var results = await lookupClient.SearchAddressesAsync(
dpcId: dpcId,
query: query,
isInArea: true // Only return results valid for this control center
);

if (results != null && results.Any())
{
// Pick the best match (usually the first one)
var match = results.First();

Console.WriteLine($"Found: {match.Street}, {match.DistrictZip} {match.CityName}");
return match.Id;
}

return null;
}

Understanding the Result (AddressLookupDto)

The search returns a list of AddressLookupDto objects. These contain the structured data you need to display to a user or link to a POI.

Property

Description

Id

The most important field. Use this long value when assigning an Address ID to a POI or Unit Home Base.

Street

The street name.

DistrictZip

The postal code (ZIP).

CityName

The city or municipality name.

DistrictName

The specific district or borough.

StateName

The federal state or province.

Did this answer your question?