LocalitiesAutocompleteResponse

constructor(publicId: String, type: LocalitiesTypes, description: String, matchedSubstrings: LocalitiesAutocompleteMatchedFields, hasAddresses: Boolean)

Parameters

publicId

Contains a unique ID for each suggestion. Please use this ID if you need to give us feedbacks on results. This ID is also required to perform Localities Details request.

type

Contains the type of the localities suggestion.

description

Concatenation of name, admin_1, admin_0 to be used as suggestion in drop down list if needed. The description can vary depending on the type requested.

matchedSubstrings
hasAddresses

On the specific territory of United Kingdom, Localities autocomplete request can return the additional attribute has_addresses for a postal code, which indicates if a postal code bears addresses. When has_addresses is true, it is possible to display a list of the available addresses by requesting details with the Localities public_id. To get the details of an address you will need to request again /details endpoint passing in the dedicated address public_id.