VALID ADRESS API

Simple REST (JSON over HTTP) API:

Validator

Send the address and it'll confirm if the address exists or it finds the most likely address if information is missing or incomplete. It tries to fill all missing information (for example missing ZIP code)

validate

The validate service tries to find the specified address in the registry. If this fails, it will try to find a suitable candidate (perhaps a typo in the street, or the name of the municipality, part of the municipality, perhaps the reversed address and street numbers…).

GET request

curl http://localhost:8123/api/v1/ruian/validate?&municipalityName={municipalityName}&zip={zip}&cp={cp}&street={streetName}

Parameters

  • municipalityName - name of the municipality
  • zip - ZIP (postal) code
  • ce - evidence number (non-standard buildings)
  • co - street (orientation) number (unique within street)
  • cp - address (descriptive) number (unique within municipality)
  • street - the name of the street or part of the municipality

Answer

In response, you will receive a JSON similar to this:

{
    "status": "POSSIBLE",
    "message": null,
    "place": {
        "confidence": ...,
        "regionId": ...,
        "regionName": ...,
        "municipalityId": ...,
        "municipalityName": ..., 
        "streetName": ...,
        "ce": ...,
        "cp": ...,
        "co": ...,
        "zip": ... 
    }
}

CURL Example

curl "http://localhost:8123/api/v1/ruian/validate?municipalityName=Praha&cp=4&street=Česákova+4&zip=15001" 2>/dev/null | python3 -mjson.tool
{
    "status": "POSSIBLE",
    "message": null,
    "place": {
        "confidence": 0.7116908192307692,
        "regionId": "CZ010",
        "regionName": "Hlavn\u00ed m\u011bsto Praha",
        "municipalityId": 554782,
        "municipalityName": "Praha",
        "streetName": "Vlas\u00e1kova",
        "ce": null,
        "cp": "864",
        "co": null,
        "zip": 15500,
        "id": 30486297
    }
}

Status

  • "ERROR" - Query data error.
  • "NOT_FOUND" - No data found.
  • "POSSIBLE" - Most likely address found (some deviation is present).
  • "MATCH" - Match.

Message

Description of the condition or error.

Place

  • confidence - the accuracy of the match
  • regionId - region ID (internal)
  • regionName - name of the region
  • municipalityId - municipality ID (internal)
  • municipalityName - name of the municipality
  • streetName - the name of the street or part of the municipality
  • ce - evidence number (non-standard buildings)
  • cp - address (descriptive) number (unique within municipality)
  • co - street (orientation) number (unique within street)
  • zip - ZIP (postal) code

HTTP kód

  • 200 – OK
  • 422 - Missing parameters
  • 500 - Internal server error