Page tree
Skip to end of metadata
Go to start of metadata

Autocomplete addresses service is used to provide users with a list of hints while typing address to prevent spelling errors.

Authorization

Autocomplete addresses service provides users with wide REST API. To use API methods first of all must pass an authorization process. Authorization requires clients Pony Express key. If key is valid, user will be provided with a Bearer Token with a lifespan of 24 hours. Obtained Token must be provided with each request to Autocomplete addresses service API. Authorization request example could be found in Postman-collection Authorization_request.json

Autocomplete addresses service methods

Examples of all the methods described below are listed in the Postman collection Autocomplete addresses.postman_collection.json
Please note, that all hints provided by Autocomplete addresses service exist only in Russian language.

Autocomplete addresses service API provides users with following methods:

HTTP GET https://autocomplete.ponyexpress.ru/api/autocomplete/locality (City hints)

Required parameters: 

countryCode=RUS - code of contry where the hints are searched for (currently the only available value is RUS)

context=Россия - search context (For locality method context value is always "Россия")

prefix=Мос - user prefix

Method response: list of suggested cities



HTTP GET https://autocomplete.ponyexpress.ru/api/autocomplete/street (Street hints)

Required parameters: 

countryCode=RUS - code of contry where the hints are searched for (currently the only available value is RUS)

context=Москва - search context (For street method context value is city name for which hints are searched (eg "Москва"))

prefix=Твер - user prefix

Method response: list of suggested streets


HTTP GET https://autocomplete.ponyexpress.ru/api/autocomplete/building (House hints)

Required parameters: 

countryCode=RUS - code of contry where the hints are searched for (currently the only available value is RUS)

context=Москва,Маршала Жукова пр-кт - search context (For building method context value is comma separated city and street names (without whitespaces), specified for which hints are searched (eg "Москва,Маршала Жукова пр-кт"))

prefix=7 - user prefix

Method response: list of suggested houses


HTTP GET https://autocomplete.ponyexpress.ru/api/autocomplete/postcode (Zip code for a specific home)

Required parameters: 

countryCode=RUS - code of contry where the hints are searched for (currently the only available value is RUS)

context=Москва,Маршала Жукова пр-кт - search context (For postcode method context value is comma separated city and street names (without whitespaces), specified for which hints are searched (eg "Москва,Маршала Жукова пр-кт"))

buildingNumber=7 - building number for which the zip code is searched

Method response: zip code

  • No labels