Simple REST (JSON over HTTP) API:
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)
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…).
curl http://localhost:8123/api/v1/ruian/validate?&municipalityName={municipalityName}&zip={zip}&cp={cp}&street={streetName}
municipalityName
- name of the municipalityzip
- ZIP (postal) codece
- 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 municipalityIn 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 "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 } }
"ERROR"
- Query data error."NOT_FOUND"
- No data found."POSSIBLE"
- Most likely address found (some deviation is present)."MATCH"
- Match.Description of the condition or error.
confidence
- the accuracy of the matchregionId
- region ID (internal)regionName
- name of the regionmunicipalityId
- municipality ID (internal)municipalityName
- name of the municipalitystreetName
- the name of the street or part of the municipalityce
- evidence number (non-standard buildings)cp
- address (descriptive) number (unique within municipality)co
- street (orientation) number (unique within street)zip
- ZIP (postal) code200
– OK422
- Missing parameters500
- Internal server error