Get Organisation Location
This API endpoint retrieves detailed information for a specific location within an organisation. By providing a unique location 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/locations/location_id' \ |
Output | Description |
---|---|
location-id | This is the unique id of the location |
Returns:
{ "result": [ { "id": "location-id", "name": "location-name", "description": "location-description", "organization": { "id": "organisation-id" }, "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" } } }, "type": "address-type", ], } |
Output | Description |
---|---|
location-id | This is the unique id of the location |
location-name | This is the user defined name of the location |
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 latitude of the location |
longitude | The longitude of the location |
formatted-address | The full address formatted as a string |
address-type | The type of address, see Address Types |
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