Lookup Patterns¶
Lookup endpoints allow you to retrieve specific entities directly by identifier or coordinate.
They are optimized for:
- Detail views
- Backend validation
- CRM enrichment
- Entity resolution
- Debugging and QA workflows
Lookup endpoints return complete records unless projection is supported and explicitly requested.
1️⃣ Single Building Lookup¶
By Building ID¶
GET /building
Required Parameters¶
building_idsubscription_key
Example¶
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/building?building_id=01c02e568d94065d29c7fd9e&subscription_key=YOUR_KEY"
When to Use¶
- Opening a building detail page
- Fetching full solar potential metrics
- Inspecting roof-level information
- Backend verification of an ID
By Coordinates¶
GET /building-coordinates
Returns a building for the provided WGS84 coordinate using containment-first matching:
- Resolve the building if the point lies inside a footprint.
- Otherwise, fall back to the nearest building within 2 meters.
- Return the fallback only when exactly one building is within that radius.
- Otherwise, return no match.
Required Parameters¶
lonlatsubscription_key
Example¶
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/building-coordinates?lon=7.1202&lat=51.481&subscription_key=YOUR_KEY"
When to Use¶
- Map click interaction
- Address-to-building resolution
- Coordinate-based enrichment
2️⃣ Batch Building Lookup¶
By IDs¶
POST /buildings
Example¶
{
"building_ids": [
"01c495b5658638dac98ece60",
"024dbe18626eb27678f0eae2"
],
"options": {
"select": ["building_id", "roof_area", "pv"]
}
}
Response Structure¶
{
"requested": 2,
"returned": 2,
"missing_ids": [],
"items": [...]
}
When to Use¶
- CRM enrichment
- Validation of multiple IDs
- Batch detail retrieval
By Coordinates (Batch)¶
POST /buildings-coordinates
Example¶
{
"points": [
{ "lon": 7.1202, "lat": 51.4811 },
{ "lon": 6.7802, "lat": 51.1583 }
],
"options": {
"select": ["building_id", "postcode"]
}
}
Response Includes¶
requestedreturnedmissing_pointsitems
Each item contains:
input_point→ the original coordinatematch_type→insideornearest_within_2mbuilding→ the resolved building object
This allows deterministic mapping between inputs and results, even when duplicates or partial matches occur.
3️⃣ H3 Lookup¶
Single H3 Cell¶
GET /h3
Required¶
h3_idsubscription_key
H3 ID may be decimal or hex.
Example:
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/h3?h3_id=613046256849125375&subscription_key=YOUR_KEY"
Batch H3 Lookup¶
POST /h3s
{
"h3_ids": [
"613046256849125375",
"613046255204958207"
],
"options": {
"select": ["h3_id", "count_buildings"]
}
}
4️⃣ Postcode Lookup¶
Single Postcode¶
GET /postcode
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/postcode?postcode=90461&subscription_key=YOUR_KEY"
Batch Postcode Lookup¶
POST /postcodes
{
"postcodes": ["90461", "90471"],
"options": {
"select": ["postcode", "count_buildings"]
}
}
5️⃣ Municipality Lookup¶
Single Municipality¶
GET /municipality
curl "https://ua-api-solar-lake-enterprise.azurewebsites.net/municipality?ags=09564000&subscription_key=YOUR_KEY"
Batch Municipality Lookup¶
POST /municipalities
{
"ags_list": ["09564000", "09562000"],
"options": {
"select": ["ags", "municipality", "state", "count_buildings"]
}
}
Typical Lookup Use Cases¶
Detail Page Workflow¶
- User selects building on map
- Frontend retrieves
building_id - Call
GET /building - Render detailed solar metrics
CRM Enrichment¶
- Export building IDs from campaign
- Send batch request to
/buildings - Merge response into CRM
Validation Workflow¶
- External system sends ID list
- Use batch lookup
- Check
missing_idsfor invalid entries
Performance Recommendations¶
- Use projection (
options.select) in batch lookups - Avoid retrieving full geometry if not required
- Use batch endpoints instead of multiple single GET calls
- Limit batch size to reasonable numbers (e.g., hundreds, not tens of thousands)
Error Handling¶
Batch endpoints return:
requestedreturnedmissing_idsormissing_points
Always validate:
requested == returned
If not, inspect the missing entries.
Summary¶
Lookup endpoints are optimized for:
- Direct entity retrieval
- Batch enrichment
- Coordinate resolution
- Administrative lookups
They are ideal for backend services, CRM integrations, and detailed user interfaces.