Sorry, you need to enable JavaScript to visit this website.

Edit object

 

Service version: 1
Last edit: 2019.09.18

On this page

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

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/locationHistory/versionNumber/objects/objectId?key=Your_API_Key&adminKey=Your_Admin_Key

curl command

curl -XPUT "Content-type: application/json" -d
'{
   "name": "object_name",
   "properties": {
     "key": "value"
     ...
   }
 }'
'https://baseURL/locationHistory/versionNumber/objects/objectId?key=Your_API_Key&adminKey=Your_Admin_Key'

PUT Request body (JSON)

{
  "name": "object_name",
  "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.
  • 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.
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
Optional parameters
This endpoint does not have any optional parameters.

▲ Return to top

Response data

Response body

{
  "name": "object_name",
  "id": "object_id",
  "properties": {
    "key": "value"
  }
}

Response fields

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

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) It is an object containing the user-defined properties of the object. Its content varies between objects.

▲ Return to top

HTTP Response codes

Code Meaning and possible causes
200 OK
400 Bad request:

  • Object with the requested name already exists (name already in use).
  • Selected default project does not exist.
  • 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.

▲ Return to top

Examples

Request URL PUT

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

PUT Request body

{
  "properties": {
    "embeddedId": "EL 11111"
  }
}

Response body (JSON)

{
  "name": "Support car 1",
  "id": "cfde72d8-4b9f-4f6d-83c8-87ae0465fd5d",
  "properties": {
    "embeddedId": "EL 11111"
  }
}

▲ Return to top

You are here