I am using the Here API auto suggest end-point for suggesting cities. Based on this document I want to get country, countryCode, city and cityCode from the response but the address object contains only the label field.
Request:
https://autosuggest.search.hereapi.com/v1/autosuggest?apiKey=XXX&at=0,0&q=Eismieze Berlin&lang=en&resultTypes=locality
Response:
"items": [
{
"title": "Berlin, Germany",
"id": "here:cm:namedplace:20187403",
"resultType": "locality",
"localityType": "city",
"address": {
"label": "Berlin, Germany"
},
"position": {
"lat": 52.51604,
"lng": 13.37691
},
"distance": 5971050,
"mapView": {
"west": 13.08835,
"south": 52.33812,
"east": 13.761,
"north": 52.6755
},
"highlights": {
"title": [
{
"start": 0,
"end": 6
}
],
"address": {
"label": [
{
"start": 0,
"end": 6
}
]
}
}
}
]
I fixed it by adding this request param: show=details
This is an screenshot from the document but they don't write it in the document. Why?