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

200 OK

The request completed successfully.

301 Moved Permanently

The target resource has been assigned a new permanent URI. Any future references to this resource ought to use one of the enclosed URIs.

302 Found

Redirection to a different URI.

401 Unauthorized

The request has not been applied because it lacks valid authentication credentials for the target resource.

405 Method Not Allowed

The specified method was recognized, but it is not appropriate for the requested resource.

408 Request Timeout

The server did not receive a complete request message from the client within the time that it was prepared to wait.

499 Client Closed Request

The client closed the connection while the server is processing the request.

500 Internal Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request.

502 Bad Gateway

The server seems to be unable to handle the requests.

504 Gateway Timeout

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

400 Bad Request

The request was malformed. The response body will include an error providing further information.

415 Unsupported Media Type

The request entity has a media type which the server does not support.

Request structure

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Save process parameters/request-headers.adoc[]

Request fields

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Save process parameters/request-fields.adoc[]

Response structure

Response headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Save process parameters/response-headers.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Save process parameters/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Save process parameters/http-response.adoc[]

Load process parameters

Method

GET

Path

/api/v1/params/{processParametersId}

A method for retrieving previously saved process parameters.

HTTP status codes

Status code Usage

400 Bad Request

The request was malformed. The response body will include an error providing further information.

404 Not Found

The given processParametersId does not exist

Request structure

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Load process parameters/request-headers.adoc[]

Path parameters

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Load process parameters/path-parameters.adoc[]

Response structure

Response headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Load process parameters/response-headers.adoc[]

Response fields

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Load process parameters/response-fields.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Load process parameters/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Load process parameters/http-response.adoc[]

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

207 Multi-Status

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.

400 Bad Request

The request was malformed. The response body will include an error providing further information.

404 Not Found

The given processParametersId does not exist

415 Unsupported Media Type

The request entity has a media type which the server does not support.

503 Service Unavailable

The request was well-formed but data cleansing is currently unavailable due to maintenance.

Request structure

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows using saved parameters/request-headers.adoc[]

Path parameters

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows using saved parameters/path-parameters.adoc[]

Request fields

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows using saved parameters/request-fields.adoc[]

Response structure

Response headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows using saved parameters/response-headers.adoc[]

Response fields

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows using saved parameters/response-fields.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows using saved parameters/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows using saved parameters/http-response.adoc[]

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

207 Multi-Status

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.

400 Bad Request

The request was malformed. The response body will include an error providing further information.

415 Unsupported Media Type

The request entity has a media type which the server does not support.

503 Service Unavailable

The request was well-formed but data cleansing is currently unavailable due to maintenance.

Request structure

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows/request-headers.adoc[]

Request fields

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows/request-fields.adoc[]

Response structure

Response headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows/response-headers.adoc[]

Response fields

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows/response-fields.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Clean rows/http-response.adoc[]

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

403 Forbidden

User has insufficient permissions to call this method.

503 Service Unavailable

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

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Start maintenance/request-headers.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Start maintenance/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Start maintenance/http-response.adoc[]

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

403 Forbidden

User has insufficient permissions to call this method.

503 Service Unavailable

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

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Reload data/request-headers.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Reload data/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Reload data/http-response.adoc[]

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

403 Forbidden

User has insufficient permissions to call this method.

503 Service Unavailable

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

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Abort maintenance/request-headers.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Abort maintenance/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Abort maintenance/http-response.adoc[]

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

403 Forbidden

User has insufficient permissions to call this method.

Request structure

Request headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Maintenance status/request-headers.adoc[]

Response structure

Response headers

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Maintenance status/response-headers.adoc[]

Example

Request

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Maintenance status/curl-request.adoc[]

Response

Unresolved directive in method.adoc - include::/home/lszpak/development/dq-online-merge/dq-online/build/generated-snippets/Maintenance status/http-response.adoc[]

Maintenance stages description

Status Description

RUNNING

There is no maintenance. User requests are processed normally

STOPPING

Application prepares for maintenance. Ongoing requests are being completed. New data cleansing requests result in 503 HTTP code

STOPPED

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

RELOADING

Dictionaries are being reloaded. New data cleansing requests result in 503 HTTP code

ERROR

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.