DanskAdresseAPIv1
Adresser

Calculate the distance between two locations

Each point is given as either {id} (an access address UUID) or {lat, lon}.

POST/v1/adgangsadresser/distance

Authentication

Authorizationstringheaderrequired

Your API key as a Bearer token.

Request

curl --request POST \
  --url "https://api.danskadresseapi.dk/v1/adgangsadresser/distance" \
  --header "Authorization: Bearer $API_NOEGLE" \
  --header "Content-Type: application/json" \
  --data '{}'

Response

application/json

Afstand

toobject
fromobject
distance_minteger
distance_kmnumber
200Eksempel
{
  "to": {},
  "from": {},
  "distance_m": 0,
  "distance_km": 0
}
401Missing key
{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid API key."
  }
}