Postcode API: automatically fill in addresses in your software

API postcode: adressen automatisch invullen in je software
Date
December 5, 2026
Author
Isatis Group
Category
Engineering
Read time
9 min read

Learn how a postcode API fills in street and city from a postcode and house number, and how to handle edge cases, security and upkeep.

A customer enters their address in your webshop or customer portal. Street, house number, postcode, city: four fields, and every now and then a typo slips in. The parcel comes back, an employee calls the customer, and someone retypes the address into the system by hand. It takes little time per instance, but it keeps happening, and it affects every form where addresses are entered.

A postcode API is an integration that lets your software automatically retrieve the street and town based on a postcode and house number. You send those two values to an address source, it returns the matching address, and your form fills in the rest by itself. That way users have to type less, and you catch mistakes before they end up in your database.

Postcode API: what you send and what you get back

The basics are simple. The user enters a postcode and a house number. Your software sends a request to the address source and gets a response back, usually as JSON. That response contains at least the street name and the town. Depending on the source, more fields may be included, such as the municipality or a coordinate.

The combination of postcode and house number works well as a key, because the postcode already belongs to a street and a range of house numbers. Geonovum shows in its BAG catalogue that PostNL determines the postcode that belongs to a combination of street name and house number. That is why two fields are enough to find the full address, and the user doesn't have to fill in four.

Keep the form simple while you're at it:

  • Postcode and house number first. Those two fields go at the top, and the rest follows automatically.
  • Street and town are filled in. Keep them visible, so the user can see whether they're correct.
  • Addition in a separate field. A house letter or addition (for example 12A or 12-2) gets its own field.
  • Manual override stays possible. You need a safety net for exceptions, otherwise you block customers with an unusual address.

What you use an address API for in your software

The most obvious place is the order form, but there are more places where it pays off:

  • Registering customers, patients or students. Any system that records people wants a clean address.
  • Planning and routes. A delivery service or installer needs accurate addresses to plan trips.
  • Invoicing. A wrong address on an invoice often means a returned letter or a reminder that never arrives.
  • Importing old files. You can run an existing customer file past the source and have discrepancies flagged.
  • Integrations between systems. If your CRM, webshop and accounting software each use their own address format, a central check gives you a single source of truth.

So this is more than a convenience feature in a form. It affects the quality of the data in everything that comes after.

Connecting directly or building your own layer

You can call the external address source directly from your front end or form. That works for a small application. As soon as multiple systems need addresses, it's wiser to put your own internal API in between. That layer talks to the address source, and all your own applications talk to that layer.

This has a few advantages:

  • One place for your key and settings. The credentials for the external source aren't scattered across forms and apps.
  • Switching without a rebuild. If you want to change address source later, you adjust one integration instead of all your applications.
  • Your own response format. Your applications always get the same fields back, even if the source deviates.
  • Caching and logging in one place. You see what is being requested and can answer repeated queries locally.

API development is all about exactly this kind of design: a clear contract, consistent naming and versioning, so that applications built on top of it keep working when you change something. For an address service, REST is usually the logical choice, because it involves a simple question and a simple answer. Which style fits depends on your application and on who uses the API.

Edge cases where address validation breaks down

The standard scenario works on its own. The problems are in the exceptions, and that's where you decide whether your integration is truly usable.

  • House number additions. Spellings vary: 12A, 12 A, 12-A. Normalise the input before you send the request.
  • Capitals and spaces in the postcode. A user types 1234ab, 1234 AB or 1234 ab. Turn those into a single format.
  • New builds. A new address doesn't appear everywhere in the data right away. The open data from the government states that Gemeente Eindhoven surveys an object within 6 months after a new address application or a building permit. So expect a resident of a newly completed home to enter an address your source doesn't know yet.
  • PO boxes and foreign addresses. These don't fit into a form with postcode and house number. Offer an alternative way to enter them.
  • The source is temporarily unavailable. Your form must not freeze in that case. Let the user enter the address by hand and flag it for review.

The common thread: automatic filling helps the user, but never blocks them. A customer who can't order because their new street is missing is worse than an address with a typo.

Security, performance and dependency

An address API looks harmless, but it's a connection to the outside world that you should take seriously. Addresses are personal data as soon as they belong to a customer, and every request you send costs time and sometimes money.

  • Keep your key server-side. Never put credentials in code the browser can read. Let your own back end make the request.
  • Limit the number of requests. Rate limiting on your own API prevents a script or a bug in your front end from flooding the source.
  • Validate the input. Check the format of the postcode and house number before you forward them. That saves requests and keeps junk out.
  • Log what's needed. See who requests what and when there's unusual traffic, without recording more personal data than necessary.
  • Think about speed. Users don't like to wait. Start the request as soon as both fields are filled in, and show a calm message if the response takes a moment.

Isatis is ISO 27001 certified, the standard for information security. Points like these therefore belong in the design of an integration, however small, because even a small API is an entry point. They are discussed up front, not added afterwards.

Testing and maintenance after go-live

An address integration that works today won't necessarily still work in a year. The external source may change its response format, phase out a version or react differently to edge cases. So put a few fixed tests in your build, for example with known addresses, an address with an addition and an address that doesn't exist. You can read how to approach that in our blog on software testing: types, approach and when to use what.

Also check what happens in practice after go-live:

  • How often does the response come back empty? Many empty responses point to an input problem or missing addresses.
  • How often do users overwrite the filled-in address? That says something about the quality of the source or of your form.
  • How long does a request take? If you notice delays, caching or a different setup can help.

It helps if the team that builds the integration also maintains it. That way nothing falls between two suppliers, and whoever spots a discrepancy also knows how the integration is put together.

Step-by-step plan: from idea to working integration

If you want to build an address service into your software, work through these steps:

  1. Determine where addresses are needed. Form, import, invoicing or everything at once.
  2. Choose an address source. Look at the data you get back, the terms of use and how up to date the source is.
  3. Design your own interface. Define which fields go in and out and how you return errors. A technical design helps with that; read what goes into a technical design.
  4. Build the integration and the safety net. Including manual entry and behaviour during an outage.
  5. Test with real exceptions. Additions, new builds, empty responses and a source that doesn't respond.
  6. Monitor and maintain. Keep track of how the integration behaves and adjust when the source changes.

Frequently asked questions

What do I need to look up an address?

Usually a postcode and a house number, possibly with an addition. With those two values you request the street and town. For addresses without a postcode, such as foreign addresses, you need a separate input.

Can an address service also contain errors or miss addresses?

Yes. New addresses aren't always in the data right away. So always build in manual entry and let the user adjust the filled-in address.

Do I have to call the external service directly?

You can, but for more than one application, your own intermediate layer is wiser. That way your key is in one place, you can switch sources without rebuilding everything, and you keep an eye on usage.

Can Isatis build such an integration or connect it to my existing systems?

Yes, API development and software integration are part of our services. We first look at what you want to achieve, and we'll tell you honestly if we're not the right party.

Want to find out if this fits your software?

Not sure how best to get addresses into your systems, or do you want an existing integration reviewed? Then schedule a short 15-minute conversation via the contact page. You tell us what you want to achieve, and we'll tell you whether and how we can help.


About the author: Jeroen Penninx, Director and co-founder of Isatis.

Share this article

Jack van Poll

Jack van Poll

Co-Founder, Isatis

Writes about nearshore engineering,
software partnerships and building teams that last.

Get in touch

Read next.

All articles