API documentation

Geo Adrescheck Nationaal v2

Summary

Use this API to enrich your Dutch address data with geographical data.

Methods and endpoints

MethodEndpoint
POSThttps://api.postnl.nl/address/national/v1/geocode

Required headers

Header keyHeader valueMandatory/optional
apikeyYour apikeyMandatory
Content-Typeapplication/jsonMandatory

Input parameters

FieldnameMandatory/optionalFormatExample
PostalCodeMandatoryString [6]1234AB
HouseNumberMandatoryString or Number [1-5]123 (only numerical values allowed)
AdditionOptionalString [6]A / a / a2

OR

FieldnameMandatory/optionalFormatExample
CityMandatoryString [1-35]Amsterdam
StreetMandatoryString [1-95]Dam
HouseNumberMandatoryString or Number [1-5]123 (only numerical values allowed)
AdditionOptionalString [6]A / a / a2

Output parameters

FieldnameDescription or attributeFormat
CityCity of requested addressString
PostalCodePostalcode of requested addressString [6]
StreetStreet of requested addressString
HouseNumberHousenumber of requested addressNumber
AdditionHousenumber addition of requested address if applicableString [6]
FormattedAddressFull formatted address according to PostNL standardArray with 2 strings
geoGeographic data represented in an arrayObject with 4 values
latLatitudinal value of locationNumber [8]
longLongitudinal value of locationNumber [8]
rdxCoordinateVierkantnet-coördinate on x-axisNumber [4]
rdyCoordinateVierkantnet-coördinate on y-axisNumber [4]

Example request & response

RequestResponse

{

     "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 codeError message
200JSON response with requested data.
200Address 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"

        }

    ]

}

5xxError on PostNL side