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 create an free account.
User operations
Autocomplete: city
Method | POST |
---|---|
Path | api/scenario/code/remote/score?name=ac_city&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129 |
Request is used to autocomplete city name.
HTTP status codes
STATUS CODE | USAGE |
---|---|
200 OK | The request completed successfully. |
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 server is currently unavailable. Service will be in this state during re indexing process. |
5xx Unexpected Server Error | 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 |
---|---|
Content-Type | application/json;charset=UTF-8 |
Accept | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
secret_key | String | An authorization token obtained by the registration e-mail |
query.city | String | Input value for city hints. |
query.street | Null | [Optional] – Ignored when requesting for city hints. |
query.buildingNumber | Null | [Optional] – Ignored when requesting for city hints. |
Response structure
NAME | DESCRIPTION |
---|---|
Content-Type | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
result.response.hints | Array | City hints for the given request. |
result.response.hints[].actualName | String | Present city name. |
result.response.hints[].lookedUpName | String | 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. |
result.response.hints[].hasStreets | Boolean | Information if the city has streets. |
result.error | String | An error message explaining that the input data was incorrect or an unexpected application error occurred |
Example
$ curl -X POST 'https://server.address/api/scenario/code/remote/score?name=ac_city&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129'\
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"query":
{
"city" : "Pelplin-Nadl",
"street" : null,
"buildingNumber" : null
},
"secret_key": "****"
}'
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
X-Frame-Options: DENY
{
"type": "SCENARIO",
"name": "ac_city",
"version": 1,
"beginTime": "2021-03-09T13:52:12.971643Z",
"endTime": "2021-03-09T13:52:13.228205Z",
"result": {
"error": null,
"response": {
"hints": [
{
"lookedUpName": "Pelplin-Nadleśnictwo",
"actualName": "Nadleśnictwo",
"hasStreets": false
}
]
}
},
"userId": "dataquality",
"sceuid": "133ed112-56be-4773-b5aa-2877310c1c1c"
}
Autocomplete: street
Method | POST |
---|---|
Path |
api/scenario/code/remote/score?name=ac_street&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129 |
Request is used to autocomplete name of the street within the given city.
HTTP status codes
STATUS CODE | USAGE |
---|---|
200 OK | The request completed successfully. |
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 server is currently unavailable. Service will be in this state during re indexing process. |
5xx Unexpected Server Error | 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 |
---|---|
Content-Type | application/json;charset=UTF-8 |
Accept | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
secret_key | String | An authorization token obtained by the registration e-mail |
query.city | String | Full present name of the city in which to look for the street. |
query.street | String | Input value for street hints. |
query.buildingNumber | Null | [Optional] – Ignored when requesting for street hints. |
Response structure
NAME | DESCRIPTION |
---|---|
Content-Type | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
result.response.hints | Array | Street hints for the given request. |
result.response.hints[].actualName | String | Present street name. |
result.response.hints[].lookedUpName | String | 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. |
result.error | String | An error message explaining that the input data was incorrect or an unexpected application error occurred |
Example
$ curl -X POST 'https://server.address/api/scenario/code/remote/score?name=ac_street&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129'\
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"query":
{
"city" : "Brzeziny",
"street" : "Armii Czer",
"buildingNumber" : null
},
"secret_key":"*****"
}'
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
X-Frame-Options: DENY
{
"type": "SCENARIO",
"name": "ac_street",
"version": 1,
"beginTime": "2021-03-09T14:33:38.750598Z",
"endTime": "2021-03-09T14:33:38.937509Z",
"result": {
"error": null,
"response": {
"hints": [
{
"lookedUpName": "Armii Czerwonej",
"actualName": "Szarych Szeregów"
}
]
}
},
"userId": "dataquality",
"sceuid": "133ed112-56be-4773-b5aa-2877310c1c1c"
}
Autocomplete: building
Method | POST |
---|---|
Path | api/scenario/code/remote/score?name=ac_building&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129 |
Request is used to autocomplete building number within the given city and street.
HTTP status codes
STATUS CODE | USAGE |
---|---|
200 OK | The request completed successfully. |
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 server is currently unavailable. Service will be in this state during re indexing process. |
5xx Unexpected Server Error | 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 |
---|---|
Content-Type | application/json;charset=UTF-8 |
Accept | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
secret_key | String | An authorization token obtained by the registration e-mail |
query.city | String | Full present name of the city in which to look for the building. |
query.street | String | [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. |
query.buildingNumber | String | Input value for building hints. |
Response structure
NAME | DESCRIPTION |
---|---|
Content-Type | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
result.response.hints | Array | Building hints for the given request. |
result.response.hints[].buildingNumber | String | Building number. |
result.response.hints[].postalCode | String | Postal code for the building. |
result.error | String | An error message explaining that the input data was incorrect or an unexpected application error occurred |
Example
$ curl -X POST 'https://server.address/api/scenario/code/remote/score?name=ac_building&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129'\
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"query":
{
"city" : "Suchy Las",
"street" : "Sucholeska",
"buildingNumber" : "1"
},
"secret_key":"*****"
}'
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
X-Frame-Options: DENY
{
"type": "SCENARIO",
"name": "ac_building",
"version": 1,
"beginTime": "2021-03-09T15:40:27.528181Z",
"endTime": "2021-03-09T15:40:27.855529Z",
"result": {
"error": null,
"response": {
"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"
}
]
}
},
"userId": "dataquality",
"sceuid": "133ed112-56be-4773-b5aa-2877310c1c1c"
}
Autocomplete: postal code
Method | POST |
---|---|
Path | api/scenario/code/remote/score?name=ac_postalcode&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129 |
Request is used to get postal code for given address.
HTTP status codes
STATUS CODE | USAGE |
---|---|
200 OK | The request completed successfully. |
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 server is currently unavailable. Service will be in this state during re indexing process. |
5xx Unexpected Server Error | 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 |
---|---|
Content-Type | application/json;charset=UTF-8 |
Accept | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
secret_key | String | An authorization token obtained by the registration e-mail |
query.city | String | Full present name of the city in which to look for the postal code. |
query.street | String | [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. |
query.buildingNumber |
String |
[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 |
---|---|
Content-Type | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
result.response.hints | Array | Building hints for the given request. |
result.response.hints[].postalCode | String | Postal code for the given address. Multiple codes can be returned if they were matched to the city or street level. |
result.error | String | An error message explaining that the input data was incorrect or an unexpected application error occurred |
Example
$ curl -X POST 'https://server.address/api/scenario/code/remote/score?name=ac_postalcode&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129'\
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"query":
{
"city" : "Warszawa",
"street" : "Puławska",
"buildingNumber" : "228"
},
"secret_key":"*****"
}'
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
X-Frame-Options: DENY
{
"type": "SCENARIO",
"name": "ac_postalcode",
"version": 1,
"beginTime": "2021-03-10T05:29:52.892787Z",
"endTime": "2021-03-10T05:29:53.215607Z",
"result": {
"error": null,
"response": {
"hints": [
{
"postalCode": "02-670"
}
]
}
},
"userId": "dataquality",
"sceuid": "133ed112-56be-4773-b5aa-2877310c1c1c"
}
Autocomplete: check postal code
Method | POST |
---|---|
Path | api/scenario/code/remote/score?name=ac_checkpostalcode&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129 |
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 “Not Found”.
HTTP status codes
STATUS CODE | USAGE |
---|---|
200 OK | The request completed successfully. |
404 Not Found | The requested resource could not be found |
400 Bad Request | The request was malformed. The response body will include an error providing further information. |
503 Service Unavailable | The request was well-formed but server is currently unavailable. Service will be in this state during re indexing process. |
5xx Unexpected Server Error | 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 |
---|---|
Content-Type | application/json;charset=UTF-8 |
Accept | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
secret_key | String | An authorization token obtained by the registration e-mail |
query.postalcode | String | Postal code to be checked if it exists. |
Response structure
NAME | DESCRIPTION |
---|---|
Content-Type | application/json;charset=UTF-8 |
PATH | TYPE | DESCRIPTION |
---|---|---|
result.response | String | A response message indicating postal code exists or not |
result.error | String | An error message explaining that the input data was incorrect or an unexpected application error occurred |
Example
$ curl -X POST 'https://server.address/api/scenario/code/remote/score?name=ac_checkpostalcode&key=93d8dd88-6162-4e0a-a220-82b2d3ce6129'
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Accept: application/json;charset=UTF-8' \
-d '{
"query":
{
"postalcode" : "00-032"
},
"secret_key":"*****"
}'
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
X-Frame-Options: DENY
{
"type": "SCENARIO",
"name": "ac_checkpostalcode",
"version": 1,
"beginTime": "2021-03-10T05:47:44.218533Z",
"endTime": "2021-03-10T05:47:44.334963Z",
"result": {
"error": null,
"response": "Postalcode exists"
},
"userId": "dataquality",
"sceuid": "133ed112-56be-4773-b5aa-2877310c1c1c"
}