Example (scenario 1)
Request
{
"PostalCode": "1507TN",
"City": "",
"Street": "",
"HouseNumber": "6",
"Addition": ""
}
Adrescheck Nationaal
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
| Endpoint
|
Post | https://api.postnl.nl/address/national/v1/validate |
Key | Value |
Content-Type | Application/json |
apikey | <your apikey> |
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 |
Fieldname | Description of attribute | Format [length] |
City | City of requested address | String [1-35] |
PostalCode | Postalcode of requested address | String [6] |
Street | Street of requested address | String [1-95] |
HouseNumber | Housenumber of requested address | Number [1-5] |
Addition | Housenumber addition of requested address if applicable | String [6] or null |
FormattedAddress | Full formatted address according to PostNL standard | Array wiirh 2 strings |
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. |