Get Locations
Retrieve a complete list of all locations stored within your Cambrionix Connect organisation. This functionality allows you to access detailed information on each location, making it easy to manage and monitor your organisation’s geographic assets. Whether you’re looking to review, organise, or update your location data, this feature provides quick and comprehensive access to all stored locations within Cambrionix Connect.
Syntax: see 'CCall Structure
Type = 'GET'
|
'https://connect.cambrionix.com/api/locations/v1/locations' \ |
Returns:
|
{ "result": [ { "created": { "time": "time", "user": { "id": "user-id", "detail": { "givenName": "given-name", "surname": "surname", "displayName": "display-name", "email": "account-email" } } }, "updated": { "time": "time", "user": { "id": "user-id", "detail": { "givenName": "given-name", "surname": "surname", "displayName": "display-name", "email": "account-email" } } }, "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" }, "type": "address-type" } ], } |
| Output | Description |
|---|---|
| time | The hub time, shown as an integer in ms |
| user-id | This is the id of the user as a unique 128-bit number |
| given-name | The first name of the user |
| surname | The surname of the user |
| display-name | The account name of the user |
| account-email | The email of the user |
| location-id | This is the unique id of the location |
| location-name | This is the user defined name of the location |
| organisation-id | This is the unique id of the organisation |
| 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 |
| address-type | The type of address, see Address Types |
Example
curl -X 'GET' \
'https: //connect.cambrionix.com/api/locations/v1/locations' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJSUzI1PzQ'
Returns
{
"result": [
{
"created": {
"time": 1726491911479,
"user": {
"id": "46bbf7f5-1794-411d-b42b-97ab2fe12460",
"detail": {
"givenName": "Nick",
"surname": "Metcalfe",
"displayName": "unknown",
"email": "nicholas.metcalfe@cambrionix.com"
}
}
},
"updated": {
"time": 1726491911478,
"user": {
"id": "46bbf7f5-1794-411d-b42b-97ab2fe12460",
"detail": {
"givenName": "Nick",
"surname": "Metcalfe",
"displayName": "unknown",
"email": "nicholas.metcalfe@cambrionix.com"
}
}
},
"id": "337a0e54-2699-4bca-9357-bb87092ecd92",
"name": "Office",
"description": "Office",
"organization": {
"id": "dafc70d5-a4c8-42a3-ad8d-a8ccb5fa313f"
},
"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"
},
"type": "office"
}
],
}
Errors
If there is an error in the API method then JSON-RPC Error Object a will be returned