Get Location by Coordinates - Pull_GetLocationByCoordinates
This method returns location details based on the geo-coordinates provided on the XML request.
Use Cases
- Convert GPS coordinates to DH location IDs
- Find nearest location for property addresses
- Validate property locations
Best Practices
- Use Smallest Radius: Start with 10km, increase if no results
- Cache Results: Cache coordinate-to-location mappings
- Prefer Specific: Choose most specific location (Neighborhood > City > Region)
- Validate Coordinates: Ensure coordinates are within valid ranges
- Handle Multiple Results: Pick the closest or most specific match
Request
XML request
<Pull_GetLocationByCoordinates_RQ>
<Authentication>
<AccessKey>[AccessKey]</AccessKey>
<SecretKey>[SecretKey]</SecretKey>
</Authentication>
<Latitude>52.14</Latitude>
<Longitude>21.1</Longitude>
</Pull_GetLocationByCoordinates_RQ>
Request fields
| XML Path | Data Type | Type | Description |
|---|---|---|---|
| Pull_GetLocationByCoordinates_RQ | C | Root element | |
| Pull_GetLocationByCoordinates_RQ/Authentication | C, M | Authentication details | |
| Pull_GetLocationByCoordinates_RQ/Authentication/AccessKey | String(100) | M | Access key |
| Pull_GetLocationByCoordinates_RQ/Authentication/SecretKey | String(100) | M | Secret key |
| Pull_GetLocationByCoordinates_RQ/Latitude | Decimal | M | Latitude |
| Pull_GetLocationByCoordinates_RQ/Longitude | Decimal | M | Longitude |
Response
XML response
<Pull_GetLocationByCoordinates_RS>
<Status ID="0">Success</Status>
<ResponseID>ffacd672ac424e128b58362d2e4e53c2</ResponseID>
<Location LocationID="25591" Distance="11.6227131">Warszawa</Location>
</Pull_GetLocationByCoordinates_RS>
Response fields
| XML Path | Data Type | Type | Description |
|---|---|---|---|
| Pull_GetLocationByCoordinates_RS | C | Root element | |
| Pull_GetLocationByCoordinates_RS/Status | String(100) | M | See ListStatuses |
| Pull_GetLocationByCoordinates_RS/Status@ID | Integer | M | See ListStatuses |
| Pull_GetLocationByCoordinates_RS/Locations/Location | M | Collection of locations | |
| Pull_GetLocationByCoordinates_RS/LocationID | Integer | M | Location ID, see ListLocations |
| Pull_GetLocationByCoordinates_RS/Locations/Distance | Decimal | M | Distance between the coordinates and that location center |
| Pull_GetLocationByCoordinates_RS/Locations/Location@TimeZone | String(50) | O | IANA timezone code of location |