☁️ CRM · All integrations

Address validation in Salesforce with Apex

Cleanse Lead, Contact and Account addresses against 2.4 million authoritative Danish addresses — with a single Apex callout or a Flow HTTP action.

Danadresse is a plain REST API, so Salesforce can call it from Apex, from a Flow (HTTP Callout, GA since Winter '24) or from a Lightning Web Component with autocomplete at input time.

How to set it up

  1. Get an API key
    Free account on the dashboard → copy dawa_live_….
  2. Create a Named Credential
    Register https://api.danadresse.dk as a Named Credential so the key isn't hard-coded in Apex.
  3. Call /datavask/adresser
    From a trigger, a Flow HTTP action or a batch — the response gives category A/B/C plus the corrected address.
  4. Write the result back
    Store the cleansed address + DAR UUID in custom fields, so duplicates can be matched on UUID instead of text.
# Apex callout to /datavask/adresser
// Apex callout — vask en adresse før den gemmes på Account
HttpRequest req = new HttpRequest();
req.setEndpoint('https://api.danadresse.dk/datavask/adresser?betegnelse='
    + EncodingUtil.urlEncode(billingAddress, 'UTF-8'));
req.setHeader('X-Api-Key', 'dawa_live_…');
req.setMethod('GET');
HttpResponse res = new Http().send(req);
// res.getBody(): kategori A/B/C + den autoritative DAR-adresse

Good to know

No-code Flows

Flow Builder's HTTP Callout can hit the API without a line of Apex — great for admins.

Autocomplete in LWC

A Lightning Web Component can use /autocomplete directly for search-as-you-type on Lead forms.

Duplicate key

The DAR UUID is a stable key across systems — better matching than free text.

A packaged AppExchange component is on the roadmap — write to partners@lynbro.dk for early access.

Ready to try it with Salesforce?

Free Hobby key, no credit card — the API answers in under 100 ms.

Get an API key →

API docs · Code examples · JS widget