API documentation
Geo Adrescheck Nationaal v2
Summary
Use this API to enrich your Dutch address data with geographical data.
Methods and endpoints
Method | Endpoint |
POST | https://api.postnl.nl/address/national/v1/geocode |
Required headers
Header key | Header value | Mandatory/optional |
apikey | Your apikey | Mandatory |
Content-Type | application/json | Mandatory |
Input parameters
Fieldname | Mandatory/optional | Format | Example |
PostalCode | Mandatory | String [6] | 1234AB |
HouseNumber | Mandatory | String or Number [1-5] | 123 (only numerical values allowed) |
Addition | Optional | String [6] | A / a / a2 |
OR
Fieldname | Mandatory/optional | Format | Example |
City | Mandatory | String [1-35] | Amsterdam |
Street | Mandatory | String [1-95] | Dam |
HouseNumber | Mandatory | String or Number [1-5] | 123 (only numerical values allowed) |
Addition | Optional | String [6] | A / a / a2 |
Output parameters
Fieldname | Description or attribute | Format |
City | City of requested address | String |
PostalCode | Postalcode of requested address | String [6] |
Street | Street of requested address | String |
HouseNumber | Housenumber of requested address | Number |
Addition | Housenumber addition of requested address if applicable | String [6] |
FormattedAddress | Full formatted address according to PostNL standard | Array with 2 strings |
geo | Geographic data represented in an array | Object with 4 values |
lat | Latitudinal value of location | Number [8] |
long | Longitudinal value of location | Number [8] |
rdxCoordinate | Vierkantnet-coördinate on x-axis | Number [4] |
rdyCoordinate | Vierkantnet-coördinate on y-axis | Number [4] |
Example request & response
Request | Response |
{ "PostalCode": "1507TN", "City": "", "Street": "", "HouseNumber": "6", "Addition": "" } | [ { "City": "ZAANDAM", "PostalCode": "1507TN", "Street": "Wals", "HouseNumber": 6, "FormattedAddress": [ "Wals 6 ", "1507TN ZAANDAM" ], "geo": { "lat": 52.439944, "long1": 4.806337, "rdxCoordinate": 1155, "rdyCoordinate": 4948 } } ] |
Possible error codes
Error code | Error message |
200 | JSON response with requested data. |
200 | Address not found. Example:
[] |
4xx | Error on customer-side. Example:
{ "errors": [ { "status": "400", "title": "Bad Request", "detail": "postalcode has the wrong format. It should be: 1234AB" } ] } |
5xx | Error on PostNL side |