@pinelab/vendure-plugin-dutch-postalcode
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

Vendure Plugin Dutch Postalcodes

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

  1. Register at https://postcode.tech/ to get an API key
  2. 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'),
  ...
]
  1. Start your Vendure server
  2. 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.

Readme

Keywords

none

Package Sidebar

Install

npm i @pinelab/vendure-plugin-dutch-postalcode

Weekly Downloads

12

Version

1.2.1

License

MIT

Unpacked Size

8.2 kB

Total Files

7

Last publish

Collaborators

  • mbrug