For more Algolytics products visit us at https://algolytics.com/.
Overview
API for real time autocompletion of address information. To receive access to our product or change your access password, please contact us at support@algolytics.pl.
User operations
Autocomplete: city
Method |
POST |
Path |
api/autocomplete/city |
Request is used to autocomplete city name.
HTTP status codes
Status code | Usage |
---|---|
|
The request completed successfully. |
|
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 server is currently unavailable. Service will be in this state during re indexing process. |
|
The server failed to fulfill an apparently valid request. If an unspecified error in range 500-599 occurred contact our support at support@algolytics.pl. |
Request structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
Input value for city hints. |
|
|
[Optional] – Ignored when requesting for city hints. |
|
|
[Optional] – Ignored when requesting for city hints. |
Response structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
City hints for the given request. |
|
|
Present city name. |
|
|
The name of the city searched by the user, which is not the present name of the city. If null, the present city name has been matched to the user’s query. |
|
|
Information if the city has streets. |
Example
$ curl 'https://autocomplete.example.host/api/autocomplete/city' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"city" : "Pelplin-Nadl",
"street" : null,
"buildingNumber" : null
}'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
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: 132
{
"hints" : [ {
"lookedUpName" : "Pelplin-Nadleśnictwo",
"actualName" : "Nadleśnictwo",
"hasStreets" : false
} ]
}
Autocomplete: street
Method |
POST |
Path |
api/autocomplete/street |
Request is used to autocomplete name of the street within the given city.
HTTP status codes
Status code | Usage |
---|---|
|
The request completed successfully. |
|
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 server is currently unavailable. Service will be in this state during re indexing process. |
|
The server failed to fulfill an apparently valid request. If an unspecified error in range 500-599 occurred contact our support at support@algolytics.pl. |
Request structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
Full present name of the city in which to look for the street. |
|
|
Input value for street hints. |
|
|
[Optional] – Ignored when requesting for street hints. |
Response structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
Street hints for the given request. |
|
|
Present street name. |
|
|
The name of the street searched by the user, which is not the present name of the street. If null, the present street name has been matched to the user’s query. |
Example
$ curl 'https://autocomplete.example.host/api/autocomplete/street' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"city" : "Brzeziny",
"street" : "Armii Czer",
"buildingNumber" : null
}'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
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: 104
{
"hints" : [ {
"lookedUpName" : "Armii Czerwonej",
"actualName" : "Szarych Szeregów"
} ]
}
Autocomplete: building
Method |
POST |
Path |
api/autocomplete/building |
Request is used to autocomplete building number within the given city and street.
HTTP status codes
Status code | Usage |
---|---|
|
The request completed successfully. |
|
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 server is currently unavailable. Service will be in this state during re indexing process. |
|
The server failed to fulfill an apparently valid request. If an unspecified error in range 500-599 occurred contact our support at support@algolytics.pl. |
Request structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
Full present name of the city in which to look for the building. |
|
|
[Optional] – Full present name of the street on which to look for the building. May be null to indicate that there is no street in the given address. |
|
|
Input value for building hints. |
Response structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
Building hints for the given request. |
|
|
Building number. |
|
|
Postal code for the building. |
Example
$ curl 'https://autocomplete.example.host/api/autocomplete/building' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"city" : "Suchy Las",
"street" : "Sucholeska",
"buildingNumber" : "1"
}'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
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: 337
{
"hints" : [ {
"postalCode" : "62-002",
"buildingNumber" : "1"
}, {
"postalCode" : "62-002",
"buildingNumber" : "10"
}, {
"postalCode" : "62-002",
"buildingNumber" : "12"
}, {
"postalCode" : "62-002",
"buildingNumber" : "14"
}, {
"postalCode" : "62-002",
"buildingNumber" : "16"
} ]
}
Autocomplete: postal code
Method |
POST |
Path |
api/autocomplete/postalcode |
Request is used to get postal code for given address.
HTTP status codes
Status code | Usage |
---|---|
|
The request completed successfully. |
|
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 server is currently unavailable. Service will be in this state during re indexing process. |
|
The server failed to fulfill an apparently valid request. If an unspecified error in range 500-599 occurred contact our support at support@algolytics.pl. |
Request structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
Full present name of the city in which to look for the postal code. |
|
|
[Optional] – Full present name of the street on which to look for the postal code. This value will be ignored when city doesn’t contain given street. May be null to indicate that there is no street in the given address. If building number is also null postal codes for the city will be returned. |
|
|
[Optional] – Building number. This value will be ignored when street doesn’t contain given building number. If null algorithm will search for all postal codes for given city and street. |
Response structure
Name | Description |
---|---|
|
application/json;charset=UTF-8 |
Path | Type | Description |
---|---|---|
|
|
Building hints for the given request. |
|
|
Postal code for the given address. Multiple codes can be returned if they were matched to the city or street level. |
Example
$ curl 'https://autocomplete.example.host/api/autocomplete/postalcode' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"city" : "Warszawa",
"street" : "Puławska",
"buildingNumber" : "228"
}'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
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: 53
{
"hints" : [ {
"postalCode" : "02-566"
} ]
}
Autocomplete: check postal code
Method |
GET |
Path |
api/autocomplete/check/{postalcode} |
Request is used to check if given postal code exists. Postal code should be provided in format dd-ddd where d is digit from range 0-9. In case the postal code does not exist, status code 404 is returned, along with the message “Postal code doesn’t exist”.
HTTP status codes
Status code | Usage |
---|---|
|
The request completed successfully. |
|
The requested resource could not be found |
|
The request was malformed. The response body will include an error providing further information. |
|
The request was well-formed but server is currently unavailable. Service will be in this state during re indexing process. |
|
The server failed to fulfill an apparently valid request. If an unspecified error in range 500-599 occurred contact our support at support@algolytics.pl. |
Request structure
Parameter | Description |
---|---|
|
Postal code to be checked if it exist. |
Example
$ curl 'https://autocomplete.example.host/api/autocomplete/check/02-822' -i -X GET
HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
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