Geocode API
GeocodingGeocodingConverting an address into map coordinates so a job or resource can be placed on the map and used for routing. turns an address into a latitude and longitude. Dime.Scheduler does this itself for the records it receives, so a job with a site address ends up on the map without any help from the integration. The geocode endpoints expose that same geocoder to you, for the cases where you want the coordinates before the record exists: validating an address in your own system, placing a prospect on a map, or computing a distance without creating a job first. How geocoding is configured, and what it costs in map transactions, is described under geocoding.
Both endpoints require the Basic Map optional module; without it the call is refused with HTTP 403.
Structured address
POST /geocode takes an address broken into its parts:
| Name | Data Type | Default | Required |
|---|---|---|---|
| street | string | ||
| streetNo | string | ||
| zipCode | string | ||
| city | string | ||
| state | string | ||
| country | string |
None of the parts is mandatory on its own, but the geocoder needs enough of them to find a place; send what you have and expect an empty result rather than an error when it is not enough. An empty body is rejected with HTTP 400.
Free text
GET /geocode takes the address as one string, for input that is not split into fields:
| Name | Data Type | Default | Required |
|---|---|---|---|
| address | string | ✔️ | |
| country | string | ✔️ |
Both are query parameters. country narrows the search, which matters for street names that exist in several countries. A missing address is rejected with HTTP 400.
- API
- See
POST /geocodeandGET /geocodein the REST API reference. - Example body for
POST /geocode:{"street": "Kerkstraat","streetNo": "1","zipCode": "9000","city": "Gent","country": "BE"} - Example request for
GET /geocode:GET /geocode?address=Kerkstraat 1, 9000 Gent&country=BE - Both answer with the coordinate, latitude and longitude, or an empty result when the address could not be resolved.
Read more
- API overview
- Geocoding, for how Dime.Scheduler geocodes records on its own
- Recommendation API, which uses coordinates to rank resources by distance