@pinelab/vendure-plugin-dutch-postalcode
v1.2.1
Published
Vendure plugin for retrieving Dutch addresses by postal code via postcode.tech
Downloads
60
Readme
Vendure Plugin Dutch Postalcodes
Official documentation here
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.
Getting started
- Register at https://postcode.tech/ to get an API key
- Add the following code to your plugins in
vendure-config.ts
import { DutchPostalCodePlugin } from "@pinelab/vendure-plugin-dutch-postalcode"
plugins: [
DutchPostalCodePlugin.init('your-postcode.tech-apikey'),
...
]
- Start your Vendure server
- You can now lookup address details based on a postalcode and housenumber via the shop-api
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.