LocalitiesAutocompleteResponse

data class LocalitiesAutocompleteResponse(val publicId: String, val type: LocalitiesTypes, val description: String, val matchedSubstrings: LocalitiesAutocompleteMatchedFields, val hasAddresses: Boolean)

Attributes describing a locality. Not all attributes will be available for all locality types.

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.

Constructors

Link copied to clipboard
constructor(publicId: String, type: LocalitiesTypes, description: String, matchedSubstrings: LocalitiesAutocompleteMatchedFields, hasAddresses: Boolean)

Properties

Link copied to clipboard
@SerializedName(value = "description")
val description: String
Link copied to clipboard
@SerializedName(value = "has_addresses")
val hasAddresses: Boolean
Link copied to clipboard
@SerializedName(value = "matched_substrings")
val matchedSubstrings: LocalitiesAutocompleteMatchedFields
Link copied to clipboard
@SerializedName(value = "public_id")
val publicId: String
Link copied to clipboard
@SerializedName(value = "type")
val type: LocalitiesTypes