Skip to content Skip to sidebar Skip to footer

Lookup API - Luxembourg

Introduction

For Luxembourg, a postalcode and a number (optionally a suffix) are unique to an address.
We developed one simple API to check if a postal code and number exist and to return the full details.

Method: GET

URL-Parameters:

  • postalcode (required, string)
  • number (required, number)
  • number addition (optional, string)
  • fields (optional, array)
Fields parameter
This parameter is optional and can be used to filter out the fields you don’t need.
Example: passing [“city”,”street”] will only return the city and the street. Each primary element after “data” of the JSON response can be filtered. This filtering option will help you save data and optimize response speeds. Note: You need to use double quotes (“) for each value.
 
Example request:

GET https://api.apicheck.nl/lookup/v1/postalcode/lu?postalcode=9209&number=10

This call will return the following JSON data:

{
    "error": false,
    "data": {
        "street": "D'Baach aus",
        "number": "10",
        "numberAddition": "",
        "postalcode": "9209",
        "city": "Diekirch",
        "municipality": "Diekirch",
        "formattedAddress": "10 D'Baach aus 9209 Diekirch, Luxembourg",
        "Location": {
            "Coordinates": {
                "latitude": "49.871738231366",
                "longitude": "6.1593103489451"
            }
        },
        "Country": {
            "name": "Luxemburg",
            "code": "LU",
            "nameInt": "Luxembourg"
        }
    }
}

Getting number additions

The API supports getting the number additions of each address (postalcode and number).
This can be helpful when autocompleting number additions. To get the number additions of an address pass the “numberAdditions” element to the fields array in the request parameters.
 
Example request:
GET https://api.apicheck.nl/lookup/v1/address/lu?number=1&postalcode=6195&fields=["street","city","numberAdditions"]
 
This call will return the following JSON data:
{
    "error": false,
    "data": {
        "street": "Rue Neimillen",
        "city": "Imbringen",
        "numberAdditions": [
            "D",
            "C",
            "B",
            "A"
        ]
    }
}

Error responses

Invalid API-key
HTTP 401 (unauthorized)
Your API key is incorrect, or invalid.
Login to the ApiCheck dashboard and check your X-API-KEY header as documented in the Authorization documentation.
{
    "error": true,
    "name": "api_key_invalid",
    "description": "Api key invalid"
}
No match found
HTTP 404 (not found)
The submitted data did not result in any matches.
{
    "error":true,
    "name":"no_match",
    "description":"No match found"
}

Run and try out in Postman: