Edit object
Decommission notice
Purpose
This endpoint provides new values for an existing object’s attributes. An Admin may only send the values that need to be updated.
Request data
HTTPS method: PUT
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.
URL request format
https://{baseURL}/geofencing/{versionNumber}/objects/{objectId}?key={Your_API_Key}&adminKey={Your_Admin_Key}curl command request format
curl -v -XPUT -H "Content-type: application/json" -d'{ "name": "object_name", "defaultProject": "project_id", "properties": { "key": "value" ... } }''https://{baseURL}/geofencing/{versionNumber}/objects/{objectId}?key={Your_API_Key}&adminKey={Your_Admin_Key}'PUT request body format
{ "name": "object_name", "defaultProject": "project_id", "properties": { "key": "value" ... }}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.
- The order of request parameters is not important.
Note: There are no optional parameters in this endpoint.
Required parameters | Description |
|---|---|
| The base URL for calling the API. |
| Service version. |
| An API Key valid for the requested service. |
| An Admin Key valid for the provided API Key. |
| Id of an object to edit. |
Response data
Response body
{ "name": "object_name", "id": "object_id", "defaultProject": "project_id", "properties": { "key": "value" ... }}Response fields
The following table describes all of the fields that can appear in a response.
Primary fields | Description |
|---|---|
| The name of the object. |
| The UUID of the object. |
| (Optional) The UUID of the object’s default project. |
| (Optional) It is an object containing the user-defined properties of the object. Its content varies between objects. |
Response codes
Code | Meaning & possible causes |
|---|---|
| OK |
| Bad request:
|
| Forbidden:
|
Example
Edit an object.
URL request example
https://api.tomtom.com/geofencing/1/objects/b3e6a642-e082-499e-8e04-dee9e5e9c575?key={Your_API_Key}&adminKey={Your_Admin_Key}PUT request body example
{ "defaultProject": "", "properties": { "embeddedId": "EL 11111" }}Response body example
{ "name": "Support car 1", "id": "cfde72d8-4b9f-4f6d-83c8-87ae0465fd5d", "defaultProject": "", "properties": { "embeddedId": "EL 11111" }}