Get object details
Service version: 1
Last edit: 2019.09.18
On this page
- ▸ Purpose
- ▸ Request data
Purpose
This endpoint requests all details about a single object.
Request data
HTTPS method: GET
URL format
For ease of viewing and identification:
- Required constants and parameters are shown in bold text.
- Optional parameters are shown in plain text.
https://baseURL/geofencing/versionNumber/objects/objectId?key=Your_API_Key
curl command
curl 'https://baseURL/geofencing/versionNumber/objects/objectId?key=Your_API_Key'
Request parameters
The following table describes the parameters that can be used in a request.
- Required parameters must be used or the call will fail.
- Optional parameters may be used.
- If there is a default value that will be assumed when an optional parameter is not used, it is shown in the table.
- The order of request parameters is not important.
Required parameters | |
---|---|
Parameter | Description |
baseURL string |
The base URL for calling the API. Value: api.tomtom.com
|
versionNumber string |
Service version number. Value: 1
|
key string |
An API Key valid for the requested service. Value: Your valid API Key .
|
objectId string |
The object id to gather details for. Value: A UUID. |
Optional parameters | |
This endpoint does not have any optional parameters. |
Response data
Response body
The following JSON code block demonstrates a successful response from the API server.
{
"name": "object_name",
"id": "object_id",
"defaultProject": "project_id",
"properties": {
"key": "value"
...
}
}
Response fields
The following table describes all of the response fields.
Primary fields | |
---|---|
Field | Description |
name string |
The name of the object. |
id string |
The UUID of the object. |
defaultProject string |
(Optional) The UUID of the object's default project. |
properties object |
(Optional) An object containing user-defined properties of the fence. Its content varies between fences. |
HTTP response codes
Code | Meaning and possible causes |
---|---|
200 |
OK |
404 |
Not found: The object with the specified id does not exist. |
Examples
Get details of the 'Support car 1' object (id: cfde72d8-4b9f-4f6d-83c8-87ae0465fd5d)
Request URL
https://api.tomtom.com/geofencing/1/objects/cfde72d8-4b9f-4f6d-83c8-87ae0465fd5d?key=Your_API_Key
Response body (JSON)
{
"name": "Support car 1",
"id": "cfde72d8-4b9f-4f6d-83c8-87ae0465fd5d",
"defaultProject": "4dee65b0-bd0a-47fd-ad12-27231fd780fb",
"properties": {
"embeddedId": "EL 11111",
"maxSpeedKmh": 70,
"driver": "John Doe"
}
}