Update objects in a batch
curl --request PATCH \
--url https://fleet.graviton.ma/api/v2/objects/batch \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"updates": [
{
"imei": "<string>",
"changes": {
"protocol": "<string>",
"ip": "<string>",
"port": 123,
"active": true,
"active_dt": "2023-12-25",
"dt_server": "<string>",
"dt_tracker": "<string>",
"name": "<string>",
"installation_dt": "2023-12-25",
"icon": "<string>",
"map_arrows": "<string>",
"map_icon": "<string>",
"tail_color": "<string>",
"tail_points": 123,
"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
}
}
]
}
'import requests
url = "https://fleet.graviton.ma/api/v2/objects/batch"
payload = { "updates": [
{
"imei": "<string>",
"changes": {
"protocol": "<string>",
"ip": "<string>",
"port": 123,
"active": True,
"active_dt": "2023-12-25",
"dt_server": "<string>",
"dt_tracker": "<string>",
"name": "<string>",
"installation_dt": "2023-12-25",
"icon": "<string>",
"map_arrows": "<string>",
"map_icon": "<string>",
"tail_color": "<string>",
"tail_points": 123,
"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
}
}
] }
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({
updates: [
{
imei: '<string>',
changes: {
protocol: '<string>',
ip: '<string>',
port: 123,
active: true,
active_dt: '2023-12-25',
dt_server: '<string>',
dt_tracker: '<string>',
name: '<string>',
installation_dt: '2023-12-25',
icon: '<string>',
map_arrows: '<string>',
map_icon: '<string>',
tail_color: '<string>',
tail_points: 123,
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
}
}
]
})
};
fetch('https://fleet.graviton.ma/api/v2/objects/batch', 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/batch",
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([
'updates' => [
[
'imei' => '<string>',
'changes' => [
'protocol' => '<string>',
'ip' => '<string>',
'port' => 123,
'active' => true,
'active_dt' => '2023-12-25',
'dt_server' => '<string>',
'dt_tracker' => '<string>',
'name' => '<string>',
'installation_dt' => '2023-12-25',
'icon' => '<string>',
'map_arrows' => '<string>',
'map_icon' => '<string>',
'tail_color' => '<string>',
'tail_points' => 123,
'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
]
]
]
]),
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": "<unknown>",
"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
}
}{
"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
}
}Fleet
Update objects in a batch
Each object may receive different supported changes. The complete request and access scope are validated before any update; duplicate IMEIs and unsupported fields are rejected. Requires write access. A read-only account cannot perform this operation. Requires object-edit permission.
PATCH
/
objects
/
batch
Update objects in a batch
curl --request PATCH \
--url https://fleet.graviton.ma/api/v2/objects/batch \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"updates": [
{
"imei": "<string>",
"changes": {
"protocol": "<string>",
"ip": "<string>",
"port": 123,
"active": true,
"active_dt": "2023-12-25",
"dt_server": "<string>",
"dt_tracker": "<string>",
"name": "<string>",
"installation_dt": "2023-12-25",
"icon": "<string>",
"map_arrows": "<string>",
"map_icon": "<string>",
"tail_color": "<string>",
"tail_points": 123,
"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
}
}
]
}
'import requests
url = "https://fleet.graviton.ma/api/v2/objects/batch"
payload = { "updates": [
{
"imei": "<string>",
"changes": {
"protocol": "<string>",
"ip": "<string>",
"port": 123,
"active": True,
"active_dt": "2023-12-25",
"dt_server": "<string>",
"dt_tracker": "<string>",
"name": "<string>",
"installation_dt": "2023-12-25",
"icon": "<string>",
"map_arrows": "<string>",
"map_icon": "<string>",
"tail_color": "<string>",
"tail_points": 123,
"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
}
}
] }
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({
updates: [
{
imei: '<string>',
changes: {
protocol: '<string>',
ip: '<string>',
port: 123,
active: true,
active_dt: '2023-12-25',
dt_server: '<string>',
dt_tracker: '<string>',
name: '<string>',
installation_dt: '2023-12-25',
icon: '<string>',
map_arrows: '<string>',
map_icon: '<string>',
tail_color: '<string>',
tail_points: 123,
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
}
}
]
})
};
fetch('https://fleet.graviton.ma/api/v2/objects/batch', 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/batch",
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([
'updates' => [
[
'imei' => '<string>',
'changes' => [
'protocol' => '<string>',
'ip' => '<string>',
'port' => 123,
'active' => true,
'active_dt' => '2023-12-25',
'dt_server' => '<string>',
'dt_tracker' => '<string>',
'name' => '<string>',
'installation_dt' => '2023-12-25',
'icon' => '<string>',
'map_arrows' => '<string>',
'map_icon' => '<string>',
'tail_color' => '<string>',
'tail_points' => 123,
'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
]
]
]
]),
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": "<unknown>",
"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
}
}{
"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.
Body
application/json
Required array length:
1 - 100 elementsShow child attributes
Show child attributes

