Dutch services (module)
Dutch services saves visitors typing. It looks up an address from a postcode and house number, and a company from its
name or KvK number. It is an official module (nl): an admin installs it and switches on the
lookups they want under Modules. Both lookups are off until an admin switches them on.
What users can do
- Admins switch each lookup on or off in the module's settings, enter their own KvK API key, and set how many KvK queries may be sent per day.
- Visitors on a page that uses the lookups type a postcode and house number and see the street and town filled in. Signed-in customers in a business checkout find their company by name or KvK number and see its name and address filled in. When a lookup is off or does not answer, they type the details themselves, with no error.
Who may do it
| Action | Permission | Roles |
|---|---|---|
| Install, switch on or off, change the settings | packages.manage (Modules) | admin |
| Look up an address | none | anybody, 60 a minute per address |
| Look up a company | a signed-in account | accounts, 30 per ten minutes per account |
Setting it up
- Install the module and open its Settings under Modules (Modules).
- Switch on Address lookup (PDOK). It is free and needs no key.
- For the company lookup, request your own API key at developers.kvk.nl, enter it under KvK API key and switch on Company lookup (KvK). The key is stored encrypted and never shown again. The lookup stays off while no key is stored.
- Check KvK queries per day (200 by default). KvK charges the key's owner for its queries, so this keeps a busy day or a misuse from running up the bill.
- Switch the module on.
What is sent where
The module only calls api.pdok.nl and api.kvk.nl, and only with what the visitor typed: a postcode and house
number to PDOK, a company name or KvK number to KvK. Nothing else about the visitor goes out. Answers are kept on the
site for a short while (an address 24 hours, a company one hour, "nothing found" five minutes), so the same question
reaches PDOK or KvK once. A lookup that does not answer within three seconds (PDOK) or five seconds (KvK) is given up
and the visitor types the details.
On the website
With the website module on, the module adds two starter components to its Components screen:
- Dutch address lookup: a postcode and a house number. When either changes, the street and town are looked up and filled in, and shown under the fields.
- Dutch company lookup: a company name or KvK number. The matching companies (at most ten) are listed; choosing one fills in the company name, KvK number and address. For signed-in customers only: anybody else is told to fill in the company themselves.
A block fills in what a form on the same page shows, such as the shop's cart (street, house number, postcode, town, company and KvK number). They share these values through the browser's session storage: what was typed or looked up stays on that visitor's computer until the browser closes and is cleared when the order is placed. Without the blocks the cart works as before, and where a lookup is off or does not answer, the visitor types the details.
Rules and limits
- Postcodes are written as
1234 ABor1234ab; the module reads both. Only the postcode and the digits of the house number decide the street and town, so a letter or addition changes nothing. - Company lookup is for signed-in accounts only, and the daily limit counts only queries that really went to KvK. Once it is used up, visitors type the company themselves until the next day.
- A refused KvK key shows visitors the same "fill in the company yourself" text; an admin sees the problem in the settings after the first failed lookup.
- VAT is not decided by the company lookup: the VAT number is still checked as before (Shop).
For developers
The routes, calls and tests: the README of plugin-nl. How a module calls it:
Calls between modules.