Documentation

Adrescheck Nationaal

Summary

Use this API to validate and enrich the Dutch address data that is entered in your webshop or CRM. Validations can be done with either combination of input: PostalCode+HouseNumber or City+Street+Housenumber. When using City+Street+HouseNumber, we use ‘approximate string matching’ also known as ‘Fuzzy search’. Therefore, typo's are allowed.

Method


Method
Endpoint
Posthttps://api.postnl.nl/address/national/v1/validate

Required headers

KeyValue
Content-TypeApplication/json
apikey<your apikey>

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 of attributeFormat [length]
CityCity of requested addressString [1-35]
PostalCodePostalcode of requested addressString [6]
StreetStreet of requested addressString [1-95]
HouseNumberHousenumber of requested addressNumber [1-5]
AdditionHousenumber addition of requested address if applicableString [6] or null
FormattedAddressFull formatted address according to PostNL standardArray wiirh 2 strings

Example (scenario 1)

Request

{
     "PostalCode": "1507TN", 
     "City": "",
     "Street": "",
     "HouseNumber": "6",
     "Addition": ""
}

Response

[
    {
        "City": "ZAANDAM",
        "PostalCode": "1507TN",
        "Street": "Wals",
        "HouseNumber": 6,
        "FormattedAddress": [
            "Wals 6 ",
            "1507TN ZAANDAM"
        ]
    }
]

Possible error codes

Error code

Error message

200

JSON response with requested data.

4xx

Address not found. Example:


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.