API documentation

Checkout Postalcode Check v1

Summary

Use this API to validate and enrich the Dutch address data that is entered in your webshop or CRM. Validations can only be done with input parameters PostalCode+HouseNumber.

Methods and endpoints

MethodEndpoint
POSThttps://api.postnl.nl/shipment/checkout/v1/postalcodecheck
GEThttps://api.postnl.nl/shipment/checkout/v1/postalcodecheck

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)
housenumberadditionOptionalString [6]A / a / a2

Output parameters

FieldnameDescription of attributeFormat [length]
cityCity of requested addressString [1-35]
postalCodePostalcode of requested addressString [6]
streetNameStreet of requested addressString [1-95]
houseNumberHousenumber of requested addressNumber [1-5]
houseNumberAdditionHousenumber addition of requested address if applicableString [6] or null
formattedAddressFull formatted address according to PostNL standardArray with 2 strings

Example request & response

Examples of all possible requests can be found in the Postman collections.

RequestResponse
{

     "postalcode": "1507TN",

     "housenumber": "6",

     "housenumberaddition": ""

}

[

    {

        "city": "ZAANDAM",

        "postalCode": "1507TN",

        "streetName": "Wals",

        "houseNumber": 6,

        "formattedAddress": [

            "Wals 6 ",

            "1507TN ZAANDAM"

        ]

    }

]

Possible error codes

Error codeError message
200JSON 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"

        }

    ]

}
500Error on PostNL side.