yarn add @pinelab/vendure-plugin-dutch-postalcode
to install this plugin.
yarn add @pinelab/vendure-plugin-dutch-postalcode
to install this plugin.
Find Dutch addresses by postalcode and housenumber using https://postcode.tech's api. You need to register to obtain an API key, but registering is free of charge.
vendure-config.ts
import { DutchPostalCodePlugin } from "@pinelab/vendure-plugin-dutch-postalcode"
plugins: [
DutchPostalCodePlugin.init('your-postcode.tech-apikey'),
...
]
query {
dutchAddressLookup(input: { postalCode: "8932BR", houseNumber: "48" }) {
lat
lon
postalCode
houseNumber
street
city
municipality
province
}
}
The api has permission Public
set, which requires you to be authorized as guest or logged in customer. If you have an
activeOrder, you're usually authorized.