Edit object

Service version: 1
Last edit: 2022.08.31

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

put
URL request format
https://{baseURL}/locationHistory/{versionNumber}/objects/{objectId}?key={Your_API_Key}&adminKey={Your_Admin_Key}

curl command request format

put
curl command request format
1curl -XPUT "Content-type: application/json" -d
2'{
3 "name": "object_name",
4 "properties": {
5 "key": "value"
6 ...
7 }
8 }'
9'https://{baseURL}/locationHistory/{versionNumber}/objects/{objectId}?key={Your_API_Key}&adminKey={Your_Admin_Key}'

PUT request body format

put
PUT request body - JSON
1{
2 "name": "object_name",
3 "properties": {
4 "key": "value"
5 }
6}

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

baseURL


string

The base URL for calling the API.


Value: api.tomtom.com

versionNumber


string

Service version.


Value: 1

key


string

An API Key valid for the requested service.


Value: Your valid API Key.

adminKey


string

An Admin Key valid for the provided API Key.


Value: A valid Admin Key.

objectId


string

Id of an object to edit.


Value: UUID

Response data

Response body

Response body format - JSON
1{
2 "name": "object_name",
3 "id": "object_id",
4 "properties": {
5 "key": "value"
6 }
7}

Response fields

The following table describes all of the fields that can appear in a response.

Primary fields

Description

name


string

The name of the object.

id


string

The UUID of the object.

properties


object

(Optional) It is an object containing the user-defined properties of the object. Its content varies between objects.

Response codes

Code

Meaning & possible causes

200

OK

400

Bad request :

  • Object with the requested name already exists (name already in use).

  • Requested object is not linked to the requester's account or does not exist.

403

Forbidden :

  • The provided Admin Key is invalid.
  • The Admin Key is missing.

Example

Edit an object.

URL request example

put
URL request example
https://api.tomtom.com/locationHistory/1/objects/b3e6a642-e082-499e-8e04-dee9e5e9c575?key={Your_API_Key{&adminKey={Your_Admin_Key}

PUT request body example

put
PUT request body example - JSON
1{
2 "properties": {
3 "embeddedId": "EL 11111"
4 }
5}

Response body example

Response body example - JSON
1{
2 "name": "Support car 1",
3 "id": "cfde72d8-4b9f-4f6d-83c8-87ae0465fd5d",
4 "properties": {
5 "embeddedId": "EL 11111"
6 }
7}