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:
The location is verified against the map data.
The simulation knows exactly which district and city the entity belongs to.
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
Log in to the Admin Dashboard of the Dispatch Center.
Navigate to General Settings.
Ensure the Address Package is selected (e.g., "DACH-Region").
Navigate to Area Settings.
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 totrue, it filters results to only include addresses geographically inside the Dispatch Center's defined Polygon. Set tofalseif 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 |
| The most important field. Use this |
| The street name. |
| The postal code (ZIP). |
| The city or municipality name. |
| The specific district or borough. |
| The federal state or province. |
