curl --request PUT \
--url https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"id": "groupID",
"name": "group-name",
"parentId": "rootGroupId",
"vehicleIds": [
"[\"vehicleID1\",\"vehicleID2\"]"
],
"personIds": [
"[\"personID1\",\"personID2\"]"
]
}
'import requests
url = "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group"
payload = {
"id": "groupID",
"name": "group-name",
"parentId": "rootGroupId",
"vehicleIds": ["[\"vehicleID1\",\"vehicleID2\"]"],
"personIds": ["[\"personID1\",\"personID2\"]"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
id: 'groupID',
name: 'group-name',
parentId: 'rootGroupId',
vehicleIds: ['["vehicleID1","vehicleID2"]'],
personIds: ['["personID1","personID2"]']
})
};
fetch('https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group', 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://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'groupID',
'name' => 'group-name',
'parentId' => 'rootGroupId',
'vehicleIds' => [
'["vehicleID1","vehicleID2"]'
],
'personIds' => [
'["personID1","personID2"]'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group"
payload := strings.NewReader("{\n \"id\": \"groupID\",\n \"name\": \"group-name\",\n \"parentId\": \"rootGroupId\",\n \"vehicleIds\": [\n \"[\\\"vehicleID1\\\",\\\"vehicleID2\\\"]\"\n ],\n \"personIds\": [\n \"[\\\"personID1\\\",\\\"personID2\\\"]\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"id\": \"groupID\",\n \"name\": \"group-name\",\n \"parentId\": \"rootGroupId\",\n \"vehicleIds\": [\n \"[\\\"vehicleID1\\\",\\\"vehicleID2\\\"]\"\n ],\n \"personIds\": [\n \"[\\\"personID1\\\",\\\"personID2\\\"]\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"id\": \"groupID\",\n \"name\": \"group-name\",\n \"parentId\": \"rootGroupId\",\n \"vehicleIds\": [\n \"[\\\"vehicleID1\\\",\\\"vehicleID2\\\"]\"\n ],\n \"personIds\": [\n \"[\\\"personID1\\\",\\\"personID2\\\"]\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "groupID",
"name": "group-name",
"parentId": "rootGroupId",
"path": "rootGroupId.groupID",
"vehicleIds": [
"[\"vehicleID1\",\"vehicleID2\"]"
],
"personIds": [
"[\"personID1\",\"personID2\"]"
]
}[
{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}
]{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}Updates Group
Based on body, endpoint updates existing group. Following properties can be updated: node name, persons and vehicles assigned to group, parent of group / node. If update run successfully it returns 200 with updated Group. Else if node has not been found it returns 400. Else if newly selected name for group is already taken or new parent group is one of the direct / indirect descendants it returns 409 - Conflict
curl --request PUT \
--url https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data '
{
"id": "groupID",
"name": "group-name",
"parentId": "rootGroupId",
"vehicleIds": [
"[\"vehicleID1\",\"vehicleID2\"]"
],
"personIds": [
"[\"personID1\",\"personID2\"]"
]
}
'import requests
url = "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group"
payload = {
"id": "groupID",
"name": "group-name",
"parentId": "rootGroupId",
"vehicleIds": ["[\"vehicleID1\",\"vehicleID2\"]"],
"personIds": ["[\"personID1\",\"personID2\"]"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json;charset=UTF-8"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <token>',
'Content-Type': 'application/json;charset=UTF-8'
},
body: JSON.stringify({
id: 'groupID',
name: 'group-name',
parentId: 'rootGroupId',
vehicleIds: ['["vehicleID1","vehicleID2"]'],
personIds: ['["personID1","personID2"]']
})
};
fetch('https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group', 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://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'id' => 'groupID',
'name' => 'group-name',
'parentId' => 'rootGroupId',
'vehicleIds' => [
'["vehicleID1","vehicleID2"]'
],
'personIds' => [
'["personID1","personID2"]'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json;charset=UTF-8"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group"
payload := strings.NewReader("{\n \"id\": \"groupID\",\n \"name\": \"group-name\",\n \"parentId\": \"rootGroupId\",\n \"vehicleIds\": [\n \"[\\\"vehicleID1\\\",\\\"vehicleID2\\\"]\"\n ],\n \"personIds\": [\n \"[\\\"personID1\\\",\\\"personID2\\\"]\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json;charset=UTF-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json;charset=UTF-8")
.body("{\n \"id\": \"groupID\",\n \"name\": \"group-name\",\n \"parentId\": \"rootGroupId\",\n \"vehicleIds\": [\n \"[\\\"vehicleID1\\\",\\\"vehicleID2\\\"]\"\n ],\n \"personIds\": [\n \"[\\\"personID1\\\",\\\"personID2\\\"]\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json;charset=UTF-8'
request.body = "{\n \"id\": \"groupID\",\n \"name\": \"group-name\",\n \"parentId\": \"rootGroupId\",\n \"vehicleIds\": [\n \"[\\\"vehicleID1\\\",\\\"vehicleID2\\\"]\"\n ],\n \"personIds\": [\n \"[\\\"personID1\\\",\\\"personID2\\\"]\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "groupID",
"name": "group-name",
"parentId": "rootGroupId",
"path": "rootGroupId.groupID",
"vehicleIds": [
"[\"vehicleID1\",\"vehicleID2\"]"
],
"personIds": [
"[\"personID1\",\"personID2\"]"
]
}[
{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}
]{
"errorCode": 123,
"errorMessage": "<string>",
"offendingFields": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
ID of group
1 - 24^[a-z0-9]+$"groupID"
Group name
255"group-name"
ID of parent group, in case for changing the hierarchy
"rootGroupId"
List of Vehicle IDs to assign for concrete group
List of Person IDs to assign for concrete group
Response
Updated group.
ID of group
1 - 24^[a-z0-9]+$"groupID"
Group name
255"group-name"
ID of parent group, in case for changing the hierarchy
"rootGroupId"
Hierarchy path from root group
"rootGroupId.groupID"
List of Vehicle IDs to assign for concrete group
List of Person IDs to assign for concrete group
Was this page helpful?
