For more Algolytics products visit us at https://algolytics.com/.
Overview
API for online and automatic address data cleaning.
General information
The following table shows the general HTTP status codes that may appear in any user operation:
| Status code | Usage |
|---|---|
|
The request completed successfully. |
|
The target resource has been assigned a new permanent URI. Any future references to this resource ought to use one of the enclosed URIs. |
|
Redirection to a different URI. |
|
The request has not been applied because it lacks valid authentication credentials for the target resource. |
|
The specified method was recognized, but it is not appropriate for the requested resource. |
|
The server did not receive a complete request message from the client within the time that it was prepared to wait. |
|
The client closed the connection while the server is processing the request. |
|
The server encountered an unexpected condition that prevented it from fulfilling the request. |
|
The server seems to be unable to handle the requests. |
|
The server could not provide response in time. |
User operations
Save process parameters
Method |
POST |
Path |
/api/v1/params |
A method for storing particular process parameters. Returns an identifier used to retrieve the stored parameters.
HTTP status codes
| Status code | Usage |
|---|---|
|
The request was malformed. The response body will include an error providing further information. |
|
The request entity has a media type which the server does not support. |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
|
application/json |
Response structure
| Name | Description |
|---|---|
|
text/plain |
Example
$ curl 'https://dq-online.example.host/api/v1/params' -i -u 'user:p4ssword' -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"activeModules" : [ "ADDRESSES" ],
"includeSymbolicNames" : false,
"includeGusZones" : false,
"includeGeographicCoordinates" : false,
"includeBuildingsInfo" : true,
"includeDiagnosticInfo" : false
}'
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: text/plain;charset=UTF-8
Content-Length: 36
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
97fbb9fa-f15e-4567-ace5-76f502cd394a
Load process parameters
Method |
GET |
Path |
/api/v1/params/{processParametersId} |
A method for retrieving previously saved process parameters.
HTTP status codes
| Status code | Usage |
|---|---|
|
The request was malformed. The response body will include an error providing further information. |
|
The given |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
| Parameter | Description |
|---|---|
|
Identifier of previously saved parameters (returned by POST /api/v1/params) |
Response structure
| Name | Description |
|---|---|
|
application/json |
Example
$ curl 'https://dq-online.example.host/api/v1/params/3c921cd2-2551-405e-968f-187b32f3741e' -i -u 'user:p4ssword' -X GET \
-H 'Accept: application/json'
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 208
{
"activeModules" : [ "ADDRESSES" ],
"includeSymbolicNames" : true,
"includeGusZones" : true,
"includeGeographicCoordinates" : true,
"includeBuildingsInfo" : true,
"includeDiagnosticInfo" : true
}
Clean rows using saved parameters
Method |
POST |
Path |
/api/v1/rows/{processParametersId} |
A method for cleaning given rows of raw data, which uses previously saved process parameters. The order of the input rows is preserved in the output array. There are restrictions on combining address data properties, see Restrictions on combining address data properties for more details. All fields in the output structure are optional and depend on the process parameters.
HTTP status codes
| Status code | Usage |
|---|---|
|
There were errors cleansing some records. Records for which processing error has occurred may be partially cleansed. Such records will contain the [error] object in the resulting JSON object. |
|
The request was malformed. The response body will include an error providing further information. |
|
The given |
|
The request entity has a media type which the server does not support. |
|
The request was well-formed but data cleansing is currently unavailable due to maintenance. |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
|
application/json |
| Parameter | Description |
|---|---|
|
Identifier of previously saved parameters (returned by POST /api/v1/params) |
| Path | Type | Description |
|---|---|---|
|
|
An array of input rows to be processed |
|
|
[Optional] Postal code |
|
|
[Optional] City name |
|
|
[Optional] Street name |
|
|
[Optional] Street number |
|
|
[Optional] Apartment number |
|
|
[Optional] Concatenation of the street number and apartment number (alternative to separate fields: streetNumber, apartmentNumber) |
|
|
[Optional] Concatenation of the street name, street number and apartment number (alternative to separate fields: streetName, streetNumber, apartmentNumber) |
|
|
[Optional] Voivodeship name |
|
|
[Optional] County name |
|
|
[Optional] Commune name |
|
|
[Optional] Concatenation of all address information available |
Response structure
| Name | Description |
|---|---|
|
application/json |
| Path | Type | Description |
|---|---|---|
|
|
An array of output rows containing the cleansed data |
|
|
Unique address identifier, constant in time. Requires [ADDRESSES] module |
|
|
Cleaned city name. Requires [ADDRESSES] module |
|
|
Cleaned city district name. Requires [ADDRESSES] module |
|
|
Street attribute (e.g. ul., al., pl.). Requires [ADDRESSES] module |
|
|
Cleaned street name (without street attribute). Requires [ADDRESSES] module |
|
|
The main part of the street name (e.g. the surname of the patron). Requires [ADDRESSES] module |
|
|
A less important part of the street name (does not always exist, e.g. the first name of the patron). Requires [ADDRESSES] module |
|
|
Cleaned street number. Requires [ADDRESSES] module |
|
|
Cleaned apartment number. Requires [ADDRESSES] module |
|
|
Number of apartments according to the GUS. Requires [ADDRESSES] module |
|
|
Number of juridical persons and organizational units located in a given building according to the REGON register. Requires [ADDRESSES] module |
|
|
Cleaned postal code with NN-NNN format where N is a digit (0-9). Requires [ADDRESSES] module |
|
|
Cleaned commune name. Requires [ADDRESSES] module |
|
|
Cleaned county name. Requires [ADDRESSES] module |
|
|
Cleaned voivodeship name. Requires [ADDRESSES] module |
|
|
Symbolic name for city (GUS TERYT identifier). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Symbolic name for city district (GUS TERYT identifier). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Symbolic name for street (GUS TERYT identifier). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Commune code with XXYYZZ format where XX is voivodship code, YY is county within voivodship code, ZZ is commune within county code. Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Name of the commune type, one of: "gmina miejska", "gmina wiejska", "część miejska gminy miejsko-wiejskiej", "część wiejska gminy miejsko-wiejskiej". Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Numeric symbol of the commune type, one of: 1 (for gmina miejska), 2 (for gmina wiejska), 4 (for część miejska gminy miejsko-wiejskiej), 5 (for część wiejska gminy miejsko-wiejskiej). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Commune code, along with its type and statistical region in the given format: XXYYZZTRRRRRRRR where XXYYZZ is [communeSymbol], T is [communeTypeSymbol], RRRRRRRR is 8-digit statistical region code (GUS TERYT identifier). Requires [ADDRESSES] module and [includeGusZones] option enabled |
|
|
Commune code, along with its type, statistical region and census circuit within this region in the given format: XXYYZZTRRRRRRRRC where XXYYZZTRRRRRRRR is [statisticalRegionSymbol], C is census circuit within statistical region code (GUS TERYT identifier). Requires [ADDRESSES] module and [includeGusZones] option enabled |
|
|
Name of the tax authority competent for the address. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabited apartments according to the GUS. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabitants according to the GUS. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabited apartments according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabitants according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 0 and 4 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 5 and 9 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 10 and 14 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 15 and 19 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 20 and 24 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 25 and 29 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 30 and 34 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 35 and 39 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 40 and 44 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 45 and 49 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 50 and 54 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 55 and 59 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 60 and 64 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants over 65 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 0 and 4 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 5 and 9 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 10 and 14 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 15 and 19 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 20 and 24 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 25 and 29 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 30 and 34 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 35 and 39 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 40 and 44 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 45 and 49 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 50 and 54 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 55 and 59 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 60 and 64 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants over 65 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Concatenation of matching and geocoding statuses in the given format: "<category:result>" or "<category>" where the category can take one of the values: "przypisanie niejednoznaczne", "zmiana nazwy miejscowości", "zmiana nazwy ulicy", "dopasowanie", "geokodowanie". Requires [ADDRESSES] module and [includeDiagnosticInfo] option enabled |
|
|
An array of input tokens interpreted as part of the address. Requires [ADDRESSES] module and [includeDiagnosticInfo] option enabled |
|
|
Input token converted to lowercase |
|
|
Token type indicating which part of the address it corresponds to |
|
|
East longitude degree value. Requires [ADDRESSES] module and [includeGeographicCoordinates] option enabled |
|
|
North latitude degree value. Requires [ADDRESSES] module and [includeGeographicCoordinates] option enabled |
|
|
Object indicating that an error occurred while processing the given row. Contains details about the error |
|
|
An error message explaining that the input row was incorrect or an unexpected application error occurred |
|
|
Numerical representation of the error. The following codes are provided: "001" - input rows array contains null element eg. [{"postalCode": "26-601"}, null], "002" - violation of Restrictions on combining address data properties, "500" - unexpected server error |
Example
$ curl 'https://dq-online.example.host/api/v1/rows/cbdc9a5f-909b-4a9e-9500-6c7138efeb7d' -i -u 'user:p4ssword' -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '[ {
"postalCode" : "22100",
"cityName" : "CHEŁM",
"streetNameAndStreetNumberAndApartmentNumber" : "HRUBIESZOWSKA 54/1"
}, {
"postalCode" : "22-100",
"cityName" : "CHEŁM",
"streetName" : "MIKOŁAJA REJA",
"streetNumber" : "40",
"apartmentNumber" : "2"
} ]'
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 5264
[ {
"statuses" : "<dopasowanie: budynek, w którym nie ma mieszkań><geokodowanie: dopasowany budynek>",
"addressId" : "0929902_06761_54",
"cityName" : "Chełm",
"citySymbol" : "0929902",
"streetName" : "Hrubieszowska",
"streetSymbol" : "06761",
"streetAttribute" : "ul.",
"streetNameMajorPart" : "Hrubieszowska",
"postalCode" : "22-100",
"streetNumber" : "54",
"apartmentNumber" : "1",
"voivodeshipName" : "lubelskie",
"countyName" : "Chełm",
"communeName" : "Chełm",
"communeSymbol" : "066201",
"communeTypeSymbol" : 1,
"communeTypeName" : "gmina miejska",
"statisticalRegionSymbol" : "0662011120550",
"censusCircuitSymbol" : "06620111205502",
"latitude" : 51.1278336866813,
"longitude" : 23.4870213871788,
"numberOfApartments" : 1,
"numberOfInhabitedApartmentsByGUS" : 1,
"numberOfInhabitedApartmentsByPESEL" : 1,
"numberOfInhabitantsByGUS" : 2,
"numberOfInhabitantsByPESEL" : 2,
"numberOfMen" : 2,
"numberOfMenBetween_0_4_yearsOld" : 0,
"numberOfMenBetween_5_9_yearsOld" : 0,
"numberOfMenBetween_10_14_yearsOld" : 0,
"numberOfMenBetween_15_19_yearsOld" : 0,
"numberOfMenBetween_20_24_yearsOld" : 0,
"numberOfMenBetween_25_29_yearsOld" : 0,
"numberOfMenBetween_30_34_yearsOld" : 0,
"numberOfMenBetween_35_39_yearsOld" : 1,
"numberOfMenBetween_40_44_yearsOld" : 0,
"numberOfMenBetween_45_49_yearsOld" : 0,
"numberOfMenBetween_50_54_yearsOld" : 0,
"numberOfMenBetween_55_59_yearsOld" : 0,
"numberOfMenBetween_60_64_yearsOld" : 1,
"numberOfMenOver_65_yearsOld" : 0,
"numberOfWomen" : 0,
"numberOfWomenBetween_0_4_yearsOld" : 0,
"numberOfWomenBetween_5_9_yearsOld" : 0,
"numberOfWomenBetween_10_14_yearsOld" : 0,
"numberOfWomenBetween_15_19_yearsOld" : 0,
"numberOfWomenBetween_20_24_yearsOld" : 0,
"numberOfWomenBetween_25_29_yearsOld" : 0,
"numberOfWomenBetween_30_34_yearsOld" : 0,
"numberOfWomenBetween_35_39_yearsOld" : 0,
"numberOfWomenBetween_40_44_yearsOld" : 0,
"numberOfWomenBetween_45_49_yearsOld" : 0,
"numberOfWomenBetween_50_54_yearsOld" : 0,
"numberOfWomenBetween_55_59_yearsOld" : 0,
"numberOfWomenBetween_60_64_yearsOld" : 0,
"numberOfWomenOver_65_yearsOld" : 0,
"numberOfJuridicalPersons" : 0,
"taxationAuthority" : "Urząd Skarbowy w Chełmie",
"matchedTokens" : [ {
"token" : "22100",
"tokenType" : "postalCode"
}, {
"token" : "chełm",
"tokenType" : "cityName"
}, {
"token" : "hrubieszowska",
"tokenType" : "streetName"
}, {
"token" : "54/1",
"tokenType" : "streetNumber"
} ]
}, {
"statuses" : "<dopasowanie: budynek, w którym nie ma mieszkań><geokodowanie: dopasowany budynek>",
"addressId" : "0929902_18565_40",
"cityName" : "Chełm",
"citySymbol" : "0929902",
"streetName" : "Mikołaja Reja",
"streetSymbol" : "18565",
"streetAttribute" : "ul.",
"streetNameMajorPart" : "Reja",
"streetNameMinorPart" : "Mikołaja",
"postalCode" : "22-100",
"streetNumber" : "40",
"apartmentNumber" : "2",
"voivodeshipName" : "lubelskie",
"countyName" : "Chełm",
"communeName" : "Chełm",
"communeSymbol" : "066201",
"communeTypeSymbol" : 1,
"communeTypeName" : "gmina miejska",
"statisticalRegionSymbol" : "0662011120412",
"censusCircuitSymbol" : "06620111204123",
"latitude" : 51.1328840425146,
"longitude" : 23.5075517699559,
"numberOfApartments" : 1,
"numberOfInhabitedApartmentsByGUS" : 1,
"numberOfInhabitedApartmentsByPESEL" : 2,
"numberOfInhabitantsByGUS" : 5,
"numberOfInhabitantsByPESEL" : 7,
"numberOfMen" : 3,
"numberOfMenBetween_0_4_yearsOld" : 0,
"numberOfMenBetween_5_9_yearsOld" : 0,
"numberOfMenBetween_10_14_yearsOld" : 0,
"numberOfMenBetween_15_19_yearsOld" : 0,
"numberOfMenBetween_20_24_yearsOld" : 1,
"numberOfMenBetween_25_29_yearsOld" : 0,
"numberOfMenBetween_30_34_yearsOld" : 0,
"numberOfMenBetween_35_39_yearsOld" : 0,
"numberOfMenBetween_40_44_yearsOld" : 0,
"numberOfMenBetween_45_49_yearsOld" : 0,
"numberOfMenBetween_50_54_yearsOld" : 1,
"numberOfMenBetween_55_59_yearsOld" : 0,
"numberOfMenBetween_60_64_yearsOld" : 1,
"numberOfMenOver_65_yearsOld" : 0,
"numberOfWomen" : 4,
"numberOfWomenBetween_0_4_yearsOld" : 1,
"numberOfWomenBetween_5_9_yearsOld" : 0,
"numberOfWomenBetween_10_14_yearsOld" : 0,
"numberOfWomenBetween_15_19_yearsOld" : 0,
"numberOfWomenBetween_20_24_yearsOld" : 1,
"numberOfWomenBetween_25_29_yearsOld" : 0,
"numberOfWomenBetween_30_34_yearsOld" : 0,
"numberOfWomenBetween_35_39_yearsOld" : 0,
"numberOfWomenBetween_40_44_yearsOld" : 0,
"numberOfWomenBetween_45_49_yearsOld" : 0,
"numberOfWomenBetween_50_54_yearsOld" : 1,
"numberOfWomenBetween_55_59_yearsOld" : 0,
"numberOfWomenBetween_60_64_yearsOld" : 0,
"numberOfWomenOver_65_yearsOld" : 1,
"numberOfJuridicalPersons" : 0,
"taxationAuthority" : "Urząd Skarbowy w Chełmie",
"matchedTokens" : [ {
"token" : "22-100",
"tokenType" : "postalCode"
}, {
"token" : "chełm",
"tokenType" : "cityName"
}, {
"token" : "mikołaja",
"tokenType" : "streetName"
}, {
"token" : "reja",
"tokenType" : "streetName"
}, {
"token" : "40",
"tokenType" : "streetNumber"
}, {
"token" : "2",
"tokenType" : "apartmentNumber"
} ]
} ]
Clean rows
Method |
POST |
Path |
/api/v1/rows |
A method for cleaning given rows of raw data. The order of the input rows is preserved in the output array. There are restrictions on combining address data properties, see Restrictions on combining address data properties for more details. All fields in the output structure are optional and depend on the process parameters.
HTTP status codes
| Status code | Usage |
|---|---|
|
There were errors cleansing some records. Records for which processing error has occurred may be partially cleansed. Such records will contain the [error] object in the resulting JSON object. |
|
The request was malformed. The response body will include an error providing further information. |
|
The request entity has a media type which the server does not support. |
|
The request was well-formed but data cleansing is currently unavailable due to maintenance. |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
|
application/json |
Response structure
| Name | Description |
|---|---|
|
application/json |
| Path | Type | Description |
|---|---|---|
|
|
An array of output rows containing the cleansed data |
|
|
Unique address identifier, constant in time. Requires [ADDRESSES] module |
|
|
Cleaned city name. Requires [ADDRESSES] module |
|
|
Cleaned city district name. Requires [ADDRESSES] module |
|
|
Street attribute (e.g. ul., al., pl.). Requires [ADDRESSES] module |
|
|
Cleaned street name (without street attribute). Requires [ADDRESSES] module |
|
|
The main part of the street name (e.g. the surname of the patron). Requires [ADDRESSES] module |
|
|
A less important part of the street name (does not always exist, e.g. the first name of the patron). Requires [ADDRESSES] module |
|
|
Cleaned street number. Requires [ADDRESSES] module |
|
|
Cleaned apartment number. Requires [ADDRESSES] module |
|
|
Number of apartments according to the GUS. Requires [ADDRESSES] module |
|
|
Number of juridical persons and organizational units located in a given building according to the REGON register. Requires [ADDRESSES] module |
|
|
Cleaned postal code with NN-NNN format where N is a digit (0-9). Requires [ADDRESSES] module |
|
|
Cleaned commune name. Requires [ADDRESSES] module |
|
|
Cleaned county name. Requires [ADDRESSES] module |
|
|
Cleaned voivodeship name. Requires [ADDRESSES] module |
|
|
Symbolic name for city (GUS TERYT identifier). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Symbolic name for city district (GUS TERYT identifier). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Symbolic name for street (GUS TERYT identifier). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Commune code with XXYYZZ format where XX is voivodship code, YY is county within voivodship code, ZZ is commune within county code. Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Name of the commune type, one of: "gmina miejska", "gmina wiejska", "część miejska gminy miejsko-wiejskiej", "część wiejska gminy miejsko-wiejskiej". Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Numeric symbol of the commune type, one of: 1 (for gmina miejska), 2 (for gmina wiejska), 4 (for część miejska gminy miejsko-wiejskiej), 5 (for część wiejska gminy miejsko-wiejskiej). Requires [ADDRESSES] module and [includeSymbolicNames] option enabled |
|
|
Commune code, along with its type and statistical region in the given format: XXYYZZTRRRRRRRR where XXYYZZ is [communeSymbol], T is [communeTypeSymbol], RRRRRRRR is 8-digit statistical region code (GUS TERYT identifier). Requires [ADDRESSES] module and [includeGusZones] option enabled |
|
|
Commune code, along with its type, statistical region and census circuit within this region in the given format: XXYYZZTRRRRRRRRC where XXYYZZTRRRRRRRR is [statisticalRegionSymbol], C is census circuit within statistical region code (GUS TERYT identifier). Requires [ADDRESSES] module and [includeGusZones] option enabled |
|
|
Name of the tax authority competent for the address. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabited apartments according to the GUS. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabitants according to the GUS. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabited apartments according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of inhabitants according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 0 and 4 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 5 and 9 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 10 and 14 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 15 and 19 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 20 and 24 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 25 and 29 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 30 and 34 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 35 and 39 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 40 and 44 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 45 and 49 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 50 and 54 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 55 and 59 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants between 60 and 64 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of female inhabitants over 65 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 0 and 4 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 5 and 9 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 10 and 14 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 15 and 19 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 20 and 24 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 25 and 29 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 30 and 34 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 35 and 39 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 40 and 44 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 45 and 49 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 50 and 54 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 55 and 59 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants between 60 and 64 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Number of male inhabitants over 65 years old according to the PESEL register provided by the Ministry of Digitization. Requires [ADDRESSES] module and [includeBuildingsInfo] option enabled |
|
|
Concatenation of matching and geocoding statuses in the given format: "<category:result>" or "<category>" where the category can take one of the values: "przypisanie niejednoznaczne", "zmiana nazwy miejscowości", "zmiana nazwy ulicy", "dopasowanie", "geokodowanie". Requires [ADDRESSES] module and [includeDiagnosticInfo] option enabled |
|
|
An array of input tokens interpreted as part of the address. Requires [ADDRESSES] module and [includeDiagnosticInfo] option enabled |
|
|
Input token converted to lowercase |
|
|
Token type indicating which part of the address it corresponds to |
|
|
East longitude degree value. Requires [ADDRESSES] module and [includeGeographicCoordinates] option enabled |
|
|
North latitude degree value. Requires [ADDRESSES] module and [includeGeographicCoordinates] option enabled |
|
|
Object indicating that an error occurred while processing the given row. Contains details about the error |
|
|
An error message explaining that the input row was incorrect or an unexpected application error occurred |
|
|
Numerical representation of the error. The following codes are provided: "001" - input rows array contains null element eg. [{"postalCode": "26-601"}, null], "002" - violation of Restrictions on combining address data properties, "500" - unexpected server error |
Example
$ curl 'https://dq-online.example.host/api/v1/rows' -i -u 'user:p4ssword' -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{
"inputRows" : [ {
"postalCode" : "22100",
"cityName" : "CHEŁM",
"streetNameAndStreetNumberAndApartmentNumber" : "HRUBIESZOWSKA 54/1"
}, {
"postalCode" : "22-100",
"cityName" : "CHEŁM",
"streetName" : "MIKOŁAJA REJA",
"streetNumber" : "40",
"apartmentNumber" : "2"
} ],
"processParameters" : {
"activeModules" : [ "ADDRESSES" ],
"includeSymbolicNames" : true,
"includeGusZones" : true,
"includeGeographicCoordinates" : true,
"includeBuildingsInfo" : true,
"includeDiagnosticInfo" : true
}
}'
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Content-Length: 5264
[ {
"statuses" : "<dopasowanie: budynek, w którym nie ma mieszkań><geokodowanie: dopasowany budynek>",
"addressId" : "0929902_06761_54",
"cityName" : "Chełm",
"citySymbol" : "0929902",
"streetName" : "Hrubieszowska",
"streetSymbol" : "06761",
"streetAttribute" : "ul.",
"streetNameMajorPart" : "Hrubieszowska",
"postalCode" : "22-100",
"streetNumber" : "54",
"apartmentNumber" : "1",
"voivodeshipName" : "lubelskie",
"countyName" : "Chełm",
"communeName" : "Chełm",
"communeSymbol" : "066201",
"communeTypeSymbol" : 1,
"communeTypeName" : "gmina miejska",
"statisticalRegionSymbol" : "0662011120550",
"censusCircuitSymbol" : "06620111205502",
"latitude" : 51.1278336866813,
"longitude" : 23.4870213871788,
"numberOfApartments" : 1,
"numberOfInhabitedApartmentsByGUS" : 1,
"numberOfInhabitedApartmentsByPESEL" : 1,
"numberOfInhabitantsByGUS" : 2,
"numberOfInhabitantsByPESEL" : 2,
"numberOfMen" : 2,
"numberOfMenBetween_0_4_yearsOld" : 0,
"numberOfMenBetween_5_9_yearsOld" : 0,
"numberOfMenBetween_10_14_yearsOld" : 0,
"numberOfMenBetween_15_19_yearsOld" : 0,
"numberOfMenBetween_20_24_yearsOld" : 0,
"numberOfMenBetween_25_29_yearsOld" : 0,
"numberOfMenBetween_30_34_yearsOld" : 0,
"numberOfMenBetween_35_39_yearsOld" : 1,
"numberOfMenBetween_40_44_yearsOld" : 0,
"numberOfMenBetween_45_49_yearsOld" : 0,
"numberOfMenBetween_50_54_yearsOld" : 0,
"numberOfMenBetween_55_59_yearsOld" : 0,
"numberOfMenBetween_60_64_yearsOld" : 1,
"numberOfMenOver_65_yearsOld" : 0,
"numberOfWomen" : 0,
"numberOfWomenBetween_0_4_yearsOld" : 0,
"numberOfWomenBetween_5_9_yearsOld" : 0,
"numberOfWomenBetween_10_14_yearsOld" : 0,
"numberOfWomenBetween_15_19_yearsOld" : 0,
"numberOfWomenBetween_20_24_yearsOld" : 0,
"numberOfWomenBetween_25_29_yearsOld" : 0,
"numberOfWomenBetween_30_34_yearsOld" : 0,
"numberOfWomenBetween_35_39_yearsOld" : 0,
"numberOfWomenBetween_40_44_yearsOld" : 0,
"numberOfWomenBetween_45_49_yearsOld" : 0,
"numberOfWomenBetween_50_54_yearsOld" : 0,
"numberOfWomenBetween_55_59_yearsOld" : 0,
"numberOfWomenBetween_60_64_yearsOld" : 0,
"numberOfWomenOver_65_yearsOld" : 0,
"numberOfJuridicalPersons" : 0,
"taxationAuthority" : "Urząd Skarbowy w Chełmie",
"matchedTokens" : [ {
"token" : "22100",
"tokenType" : "postalCode"
}, {
"token" : "chełm",
"tokenType" : "cityName"
}, {
"token" : "hrubieszowska",
"tokenType" : "streetName"
}, {
"token" : "54/1",
"tokenType" : "streetNumber"
} ]
}, {
"statuses" : "<dopasowanie: budynek, w którym nie ma mieszkań><geokodowanie: dopasowany budynek>",
"addressId" : "0929902_18565_40",
"cityName" : "Chełm",
"citySymbol" : "0929902",
"streetName" : "Mikołaja Reja",
"streetSymbol" : "18565",
"streetAttribute" : "ul.",
"streetNameMajorPart" : "Reja",
"streetNameMinorPart" : "Mikołaja",
"postalCode" : "22-100",
"streetNumber" : "40",
"apartmentNumber" : "2",
"voivodeshipName" : "lubelskie",
"countyName" : "Chełm",
"communeName" : "Chełm",
"communeSymbol" : "066201",
"communeTypeSymbol" : 1,
"communeTypeName" : "gmina miejska",
"statisticalRegionSymbol" : "0662011120412",
"censusCircuitSymbol" : "06620111204123",
"latitude" : 51.1328840425146,
"longitude" : 23.5075517699559,
"numberOfApartments" : 1,
"numberOfInhabitedApartmentsByGUS" : 1,
"numberOfInhabitedApartmentsByPESEL" : 2,
"numberOfInhabitantsByGUS" : 5,
"numberOfInhabitantsByPESEL" : 7,
"numberOfMen" : 3,
"numberOfMenBetween_0_4_yearsOld" : 0,
"numberOfMenBetween_5_9_yearsOld" : 0,
"numberOfMenBetween_10_14_yearsOld" : 0,
"numberOfMenBetween_15_19_yearsOld" : 0,
"numberOfMenBetween_20_24_yearsOld" : 1,
"numberOfMenBetween_25_29_yearsOld" : 0,
"numberOfMenBetween_30_34_yearsOld" : 0,
"numberOfMenBetween_35_39_yearsOld" : 0,
"numberOfMenBetween_40_44_yearsOld" : 0,
"numberOfMenBetween_45_49_yearsOld" : 0,
"numberOfMenBetween_50_54_yearsOld" : 1,
"numberOfMenBetween_55_59_yearsOld" : 0,
"numberOfMenBetween_60_64_yearsOld" : 1,
"numberOfMenOver_65_yearsOld" : 0,
"numberOfWomen" : 4,
"numberOfWomenBetween_0_4_yearsOld" : 1,
"numberOfWomenBetween_5_9_yearsOld" : 0,
"numberOfWomenBetween_10_14_yearsOld" : 0,
"numberOfWomenBetween_15_19_yearsOld" : 0,
"numberOfWomenBetween_20_24_yearsOld" : 1,
"numberOfWomenBetween_25_29_yearsOld" : 0,
"numberOfWomenBetween_30_34_yearsOld" : 0,
"numberOfWomenBetween_35_39_yearsOld" : 0,
"numberOfWomenBetween_40_44_yearsOld" : 0,
"numberOfWomenBetween_45_49_yearsOld" : 0,
"numberOfWomenBetween_50_54_yearsOld" : 1,
"numberOfWomenBetween_55_59_yearsOld" : 0,
"numberOfWomenBetween_60_64_yearsOld" : 0,
"numberOfWomenOver_65_yearsOld" : 1,
"numberOfJuridicalPersons" : 0,
"taxationAuthority" : "Urząd Skarbowy w Chełmie",
"matchedTokens" : [ {
"token" : "22-100",
"tokenType" : "postalCode"
}, {
"token" : "chełm",
"tokenType" : "cityName"
}, {
"token" : "mikołaja",
"tokenType" : "streetName"
}, {
"token" : "reja",
"tokenType" : "streetName"
}, {
"token" : "40",
"tokenType" : "streetNumber"
}, {
"token" : "2",
"tokenType" : "apartmentNumber"
} ]
} ]
Restrictions on combining address data properties
It is forbidden to pass different properties, but with the same information (e.g. streetName and streetNameAndStreetNumberAndApartmentNumber both contain street name information). Therefore, the following groups of mutually exclusive properties can be distinguished:
-
generalData|streetNameAndStreetNumberAndApartmentNumber|streetName -
generalData|streetNameAndStreetNumberAndApartmentNumber|streetNumberAndApartmentNumber|streetNumber -
generalData|streetNameAndStreetNumberAndApartmentNumber|streetNumberAndApartmentNumber|apartmentNumber -
generalData|postalCode -
generalData|cityName -
generalData|voivodeshipName -
generalData|countyName -
generalData|communeName
Only one property from each group can be present at a time. Violation of these restrictions results in an 002 [error].
Administrative operations
Start maintenance
Method |
POST |
Path |
/api/v1/maintenance |
Prepares application for reloading new dictionaries into memory. After this method is called no new requests will be accepted. All ongoing requests will be finished properly.
HTTP status codes
| Status code | Usage |
|---|---|
|
User has insufficient permissions to call this method. |
|
The request was well-formed but action is currently unavailable due to maintenance. Occurs when operation can’t be performed from the current state (see Maintenance status). |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
Example
$ curl 'https://dq-online.example.host/api/v1/maintenance' -i -u 'admin:p4ssword' -X POST
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Reload data
Method |
POST |
Path |
/api/v1/reload |
Sends a signal to the application to reload new dictionaries into memory. This method can only be invoked after Start maintenance method have bean called and all ongoing requests have finished.
HTTP status codes
| Status code | Usage |
|---|---|
|
User has insufficient permissions to call this method. |
|
The request was well-formed but action is currently unavailable due to maintenance. Occurs when operation can’t be performed from the current state (see Maintenance status). |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
Example
$ curl 'https://dq-online.example.host/api/v1/reload' -i -u 'admin:p4ssword' -X POST
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Abort maintenance
Method |
POST |
Path |
/api/v1/abort |
Sends signal to application that no reload is required and application should continue serving requests. This method can only be invoked after Start maintenance method have bean called.
HTTP status codes
| Status code | Usage |
|---|---|
|
User has insufficient permissions to call this method. |
|
The request was well-formed but action is currently unavailable due to maintenance. Occurs when operation can’t be performed from the current state (see Maintenance status). |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
Example
$ curl 'https://dq-online.example.host/api/v1/abort' -i -u 'admin:p4ssword' -X POST
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
Maintenance status
Method |
GET |
Path |
/api/v1/status |
Returns maintenance status. Maintenance is divided into subsequent stages (see Maintenance stages description): RUNNING, STOPPING, STOPPED, RELOADING, ERROR. Dictionaries should only be changed when maintenance is in STOPPED status - after invoking Start maintenance method.
HTTP status codes
| Status code | Usage |
|---|---|
|
User has insufficient permissions to call this method. |
Request structure
| Name | Description |
|---|---|
|
Basic auth credentials |
Response structure
| Name | Description |
|---|---|
|
text/plain |
Example
$ curl 'https://dq-online.example.host/api/v1/status' -i -u 'admin:p4ssword' -X GET
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: text/plain;charset=UTF-8
Content-Length: 7
X-Content-Type-Options: nosniff
X-XSS-Protection: 0
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Strict-Transport-Security: max-age=31536000 ; includeSubDomains
X-Frame-Options: DENY
RUNNING
Maintenance stages description
| Status | Description |
|---|---|
|
There is no maintenance. User requests are processed normally |
|
Application prepares for maintenance. Ongoing requests are being completed. New data cleansing requests result in 503 HTTP code |
|
Application has been stopped and maintenance has begun. No requests are being processed and administrative work can begin. New data cleansing requests result in 503 HTTP code |
|
Dictionaries are being reloaded. New data cleansing requests result in 503 HTTP code |
|
Reloading dictionaries has failed. The administrator should repair new dictionaries or restore old ones and reload them again. New data cleansing requests result in 503 HTTP code |
Additionals
We can customize DQ to return additional information according to Your needs. For more information contact our support at support@algolytics.pl.