status, darstatus and retired addresses
Understand the status and darstatus fields, when retired addresses appear in a response, and what to do with stored address ids that are no longer current.
Addresses are created, changed and retired. When a building is demolished or a street is renamed, the id you stored a year ago may no longer be a current address. The status and darstatus fields tell you where the address is in its life cycle.
This guide explains the values, which endpoints show retired addresses, and how to check your stored ids.
The values
status is DAWA's field. Build your logic on it:
status | Meaning |
|---|---|
| 1 | Current (gældende). The address is in use |
| 2 | Retired (nedlagt). The address existed but is no longer in use |
| 3 | Provisional (foreløbig). The address has been created but is not final yet |
| 4 | Withdrawn (henlagt). The address was created as provisional and never taken into use |
darstatus is the status code from the Danish Address Register (DAR), which DAWA also sent:
darstatus | Meaning |
|---|---|
| 2 | Provisional |
| 3 | Current |
| 4 | Retired |
| 5 | Withdrawn |
For a current address status is 1 and darstatus is 3. That is what you see in nearly every response. Use status for decisions in your code and treat darstatus as extra information.
Which endpoints show what
| Endpoint | Which addresses |
|---|---|
/autocomplete, /adresser/autocomplete | Current and provisional |
/adresser, /adgangsadresser (lists) | Current and provisional, unless you send status or medtagnedlagte |
/adresser/{id}, /adgangsadresser/{id} | The address with that id, whatever its status. An adresse id on /adgangsadresser/{id} gives its adgangsadresse |
/adresser/reverse, /adgangsadresser/reverse | Current and provisional |
/datavask/adresser, /datavask/adgangsadresser | Current and provisional candidates |
cirkel= and polygon= on the lists | Like the lists: current and provisional, the value in status, or everything with medtagnedlagte |
Two parameters control the lists:
status=2returns only addresses with exactly that status. You can use 1, 2, 3 or 4.medtagnedlagteincludes addresses with every status value. It can be written as a flag without a value, as in DAWA (?medtagnedlagte), or asmedtagnedlagte=true.
This is DAWA's behaviour: without parameters you get the addresses that are in use or about to be (status 1 and 3), so a new build can be picked as soon as it is registered. Retired and withdrawn addresses (2 and 4) only appear when you ask for them. If you only want final addresses, send status=1.
The historik.nedlagt field
DAWA had a historik object with oprettet, ændret, ikrafttrædelse and nedlagt. We send the same object. historik.nedlagt holds the time the address was retired or withdrawn, and is null for current and provisional addresses.
For every version of one address, use /historik/adresser?id=… or /historik/adgangsadresser?id=…. As in DAWA you get a list of versions with virkningstart, virkningslut, status and the address fields of that version. The versions are built from our change log, which starts in July 2026, so an address that has not changed since then has one version.
Check the ids you have stored
If you store address ids in a customer database, check them regularly. You can look up a hundred ids in one call by separating them with | in the id parameter on /adresser. Remember medtagnedlagte, otherwise the retired ones simply drop out of the response, and you cannot tell "retired" from "unknown":
import os import requests STORED_IDS = [ "0a3f50ae-b4ee-32b8-e044-0003ba298018", "762a9a1f-a5fb-4e47-b1b2-9fa94026bc80", "fec4202d-1015-425d-a3f5-5d21d03194b6", ] STATUS = {1: "current", 2: "retired", 3: "provisional", 4: "withdrawn"} r = requests.get( "https://api.danadresse.dk/adresser", params={ "id": "|".join(STORED_IDS), "medtagnedlagte": "true", "struktur": "mini", "per_side": 100, }, headers={"X-Api-Key": os.environ["DANADRESSE_API_KEY"]}, timeout=10, ) r.raise_for_status() found = {a["id"]: a for a in r.json()} for address_id in STORED_IDS: a = found.get(address_id) if a is None: print(f"{address_id}: unknown id - clean the stored text with /datavask") elif a["status"] == 1: print(f"{address_id}: current - {a['betegnelse']}") else: print(f"{address_id}: {STATUS.get(a['status'], a['status'])} - ask the customer to confirm")
With the three example ids, all are current:
0a3f50ae-b4ee-32b8-e044-0003ba298018: current - Rådhuspladsen 1, st. th, 4200 Slagelse 762a9a1f-a5fb-4e47-b1b2-9fa94026bc80: current - Rådhuspladsen 1, 3300 Frederiksværk fec4202d-1015-425d-a3f5-5d21d03194b6: current - Strandvejen 100, 2900 Hellerup
If you have many thousands of ids, following the changes is cheaper than looking everything up again. Fetch events from /replikering/haendelser?entitet=adresse or use webhooks. An address that is retired or withdrawn arrives as an event with operation delete. See Fetch changes with events.
What to do with a retired address
Do not delete the customer's data because the address was retired. The customer may live in the same place, and the address just got a new number or street name. Do this instead:
- Flag the record so it is not used for shipping without a check.
- Send the text you stored through datavask. It only matches current and provisional addresses, so a good match is a candidate for the new address.
- If the category is
A, you can suggest the new address directly. If it isBorC, ask the customer to confirm.
import os import requests stored_text = "Strandvejen 100, 2900 Hellerup" r = requests.get( "https://api.danadresse.dk/datavask/adresser", params={"betegnelse": stored_text}, headers={"X-Api-Key": os.environ["DANADRESSE_API_KEY"]}, timeout=10, ) r.raise_for_status() wash = r.json() print("kategori:", wash["kategori"]) for res in wash["resultater"][:3]: a = res["adresse"] print(f" {a['vejnavn']} {a['husnr']}, {a['postnr']} {a['postnrnavn']} id={a['id']}")
Each result also has aktueladresse, as in DAWA. Because we only match current and provisional addresses, it is the same address as adresse. Use the result list as shown above.
If you get 404 on /adresser/{id}, we do not know the id. That typically happens when the id was never a DAWA or DAR id, or when it was altered somewhere in your system. Treat it as an unknown address and clean the stored text the same way.
Next steps
- Why you should store the id: Store the address id.
- The difference between adresse and adgangsadresse: Adresse or adgangsadresse.
- Keep a local copy up to date: Fetch changes with events.
Related guides
Markdown source Spotted an error? Tell us API-reference (Swagger)