curl --request PATCH \
--url https://fleet.graviton.ma/api/v2/objects/{imei} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Delivery van 01"
}
'import requests
url = "https://fleet.graviton.ma/api/v2/objects/{imei}"
payload = { "name": "Delivery van 01" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Delivery van 01'})
};
fetch('https://fleet.graviton.ma/api/v2/objects/{imei}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet.graviton.ma/api/v2/objects/{imei}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Delivery van 01'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"imei": "<string>",
"protocol": "<string>",
"active": true,
"active_dt": "<string>",
"manager_id": 123,
"dt_server": "<string>",
"dt_tracker": "<string>",
"lat": 123,
"lng": 123,
"altitude": 123,
"angle": 123,
"speed": 123,
"loc_valid": "<string>",
"params": "<string>",
"name": "<string>",
"installation_dt": "<string>",
"icon": "<string>",
"map_arrows": "<string>",
"map_icon": "<string>",
"tail_color": "<string>",
"tail_points": "<string>",
"device": "<string>",
"sim_number": "<string>",
"model": "<string>",
"vin": "<string>",
"plate_number": "<string>",
"odometer_type": "<string>",
"engine_hours_type": "<string>",
"odometer": 123,
"engine_hours": 123,
"fcr": 123,
"time_adj": 123,
"accuracy": 123
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}Update an object
Updates supported current object fields. dt_server and dt_tracker accept UTC YYYY-MM-DD HH:MM:SS or RFC3339 with an explicit timezone and are normalized to UTC. Historical tracker rows are not changed. Requires write access. A read-only account cannot perform this operation. Requires object-edit permission.
curl --request PATCH \
--url https://fleet.graviton.ma/api/v2/objects/{imei} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Delivery van 01"
}
'import requests
url = "https://fleet.graviton.ma/api/v2/objects/{imei}"
payload = { "name": "Delivery van 01" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Delivery van 01'})
};
fetch('https://fleet.graviton.ma/api/v2/objects/{imei}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://fleet.graviton.ma/api/v2/objects/{imei}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Delivery van 01'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"success": true,
"data": {
"imei": "<string>",
"protocol": "<string>",
"active": true,
"active_dt": "<string>",
"manager_id": 123,
"dt_server": "<string>",
"dt_tracker": "<string>",
"lat": 123,
"lng": 123,
"altitude": 123,
"angle": 123,
"speed": 123,
"loc_valid": "<string>",
"params": "<string>",
"name": "<string>",
"installation_dt": "<string>",
"icon": "<string>",
"map_arrows": "<string>",
"map_icon": "<string>",
"tail_color": "<string>",
"tail_points": "<string>",
"device": "<string>",
"sim_number": "<string>",
"model": "<string>",
"vin": "<string>",
"plate_number": "<string>",
"odometer_type": "<string>",
"engine_hours_type": "<string>",
"odometer": 123,
"engine_hours": 123,
"fcr": 123,
"time_adj": 123,
"accuracy": 123
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "<string>",
"page": 123,
"per_page": 123,
"total": 123,
"pages": 123
}
}Authorizations
Your Graviton API token. Send Authorization: Bearer YOUR_API_TOKEN or Authorization: YOUR_API_TOKEN. Each token has individual permissions; a valid token without the permission required by the method and route returns 403 TOKEN_PERMISSION_DENIED.
Path Parameters
^[A-Za-z0-9_-]{1,20}$Body
Canonical JSON Boolean. Case-insensitive true/false strings are accepted for backward compatibility.
Current object server timestamp. UTC YYYY-MM-DD HH:MM:SS or RFC3339 with an explicit timezone; stored in UTC. Does not edit history rows.
Current object tracker timestamp. UTC YYYY-MM-DD HH:MM:SS or RFC3339 with an explicit timezone; stored in UTC. Does not edit history rows.

