Get Place Location
This API endpoint retrieves detailed information for a specific place using a unique place id. By providing a id in the request, users can obtain comprehensive information about a single location, including its name, address, geographic coordinates, and additional metadata
Syntax: see 'CCall Structure
Type = 'GET'
|
'https://connect.cambrionix.com/api/locations/v1/places/place_id' \ |
| Output | Description |
|---|---|
| place-id | This is the id of the place as a unique 128-bit number |
Returns:
|
{ "result": { { "id": "place-id", "name": "place-name", "address": { "components": [ { "name": { "long": "long-name", "short": "short-name" }, "types": [ "component-type" ] } ], "location": { "latitude": "latitude", "longitude": "longitude" }, "formatted": "formatted-address" }, "viewport": { "northeast": { "latitude": "latitude", "longitude": "longitude" }, "southwest": { "latitude": "latitude", "longitude": "longitude" } } }, "icon": "image", "source":place-source }, } |
| Output | Description |
|---|---|
| place-id | This is the id of the place as a unique 128-bit number |
| place-name | This is the user defined name of the place |
| long-name | The full name of the component |
| short-name | The shorthand version of the name of the component |
| component-type | The address component type see Address Component Types |
| latitude |
The latititude of the location |
| longitude | The longitude of the location |
| formatted-address | The full address formatted as a string |
| image | image of the location |
| place-source | The source of the image e.g. Google.Maps |
Example
{
"result": {
"id": "337a0e54-2699-4bca-9357-bb87092ecd92",
"name": "Office",
"address": {
"components": [
{
"name": {
"long": "The Maurice Wilkes Building",
"short": "The Maurice Wilkes Building"
},
"types": [
"premise"
]
},
{
"name": {
"long": "Cowley Road",
"short": "Cowley Rd"
},
"types": [
"route"
]
},
{
"name": {
"long": "Cambridgeshire",
"short": "Cambridgeshire"
},
"types": [
"administrative_area_level_2",
"political"
]
},
{
"name": {
"long": "England",
"short": "England"
},
"types": [
"administrative_area_level_1",
"political"
]
},
{
"name": {
"long": "CB4 0DS",
"short": "CB4 0DS"
},
"types": [
"postal_code"
]
},
{
"name": {
"long": "United Kingdom",
"short": "GB"
},
"types": [
"country",
"political"
]
}
],
"location": {
"latitude": 52.23316289999999,
"longitude": 0.1513396
},
"formatted": "The Maurice Wilkes Building, Cowley Rd, Cambridge CB4 0DS, UK"
},
"icon": "office",
"source": "Google.Maps.Places"
}
}
}
Errors
If there is an error in the API method then JSON-RPC Error Object a will be returned