Create Driver
curl --request POST \
--url https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"customerId": "<string>",
"name": "<string>",
"active": true,
"activeDate": "2023-11-07T05:31:56Z",
"groupId": "<string>",
"groupName": "<string>",
"defaultVehicleId": "<string>",
"tempVehicleId": "<string>",
"tempVehicleExpiry": "2023-11-07T05:31:56Z",
"tempVehicleNextJourneyOnly": true,
"tempPrivateMode": true,
"tempPrivateModeExpiry": "2023-11-07T05:31:56Z",
"tempPrivateModeNextJourneyOnly": true,
"autoCreated": true,
"keys": [
{
"value": "key-value",
"type": "CARD",
"privateMode": true
}
],
"tags": [
"<string>"
],
"secondaryGroups": [
{
"id": "<string>",
"name": "<string>"
}
],
"externalId": "<string>"
}
'import requests
url = "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver"
payload = {
"id": "<string>",
"customerId": "<string>",
"name": "<string>",
"active": True,
"activeDate": "2023-11-07T05:31:56Z",
"groupId": "<string>",
"groupName": "<string>",
"defaultVehicleId": "<string>",
"tempVehicleId": "<string>",
"tempVehicleExpiry": "2023-11-07T05:31:56Z",
"tempVehicleNextJourneyOnly": True,
"tempPrivateMode": True,
"tempPrivateModeExpiry": "2023-11-07T05:31:56Z",
"tempPrivateModeNextJourneyOnly": True,
"autoCreated": True,
"keys": [
{
"value": "key-value",
"type": "CARD",
"privateMode": True
}
],
"tags": ["<string>"],
"secondaryGroups": [
{
"id": "<string>",
"name": "<string>"
}
],
"externalId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
customerId: '<string>',
name: '<string>',
active: true,
activeDate: '2023-11-07T05:31:56Z',
groupId: '<string>',
groupName: '<string>',
defaultVehicleId: '<string>',
tempVehicleId: '<string>',
tempVehicleExpiry: '2023-11-07T05:31:56Z',
tempVehicleNextJourneyOnly: true,
tempPrivateMode: true,
tempPrivateModeExpiry: '2023-11-07T05:31:56Z',
tempPrivateModeNextJourneyOnly: true,
autoCreated: true,
keys: [{value: 'key-value', type: 'CARD', privateMode: true}],
tags: ['<string>'],
secondaryGroups: [{id: '<string>', name: '<string>'}],
externalId: '<string>'
})
};
fetch('https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver', 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}/driver",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'customerId' => '<string>',
'name' => '<string>',
'active' => true,
'activeDate' => '2023-11-07T05:31:56Z',
'groupId' => '<string>',
'groupName' => '<string>',
'defaultVehicleId' => '<string>',
'tempVehicleId' => '<string>',
'tempVehicleExpiry' => '2023-11-07T05:31:56Z',
'tempVehicleNextJourneyOnly' => true,
'tempPrivateMode' => true,
'tempPrivateModeExpiry' => '2023-11-07T05:31:56Z',
'tempPrivateModeNextJourneyOnly' => true,
'autoCreated' => true,
'keys' => [
[
'value' => 'key-value',
'type' => 'CARD',
'privateMode' => true
]
],
'tags' => [
'<string>'
],
'secondaryGroups' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'externalId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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}/driver"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"customerId\": \"<string>\",\n \"name\": \"<string>\",\n \"active\": true,\n \"activeDate\": \"2023-11-07T05:31:56Z\",\n \"groupId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"defaultVehicleId\": \"<string>\",\n \"tempVehicleId\": \"<string>\",\n \"tempVehicleExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempVehicleNextJourneyOnly\": true,\n \"tempPrivateMode\": true,\n \"tempPrivateModeExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempPrivateModeNextJourneyOnly\": true,\n \"autoCreated\": true,\n \"keys\": [\n {\n \"value\": \"key-value\",\n \"type\": \"CARD\",\n \"privateMode\": true\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"secondaryGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"externalId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"customerId\": \"<string>\",\n \"name\": \"<string>\",\n \"active\": true,\n \"activeDate\": \"2023-11-07T05:31:56Z\",\n \"groupId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"defaultVehicleId\": \"<string>\",\n \"tempVehicleId\": \"<string>\",\n \"tempVehicleExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempVehicleNextJourneyOnly\": true,\n \"tempPrivateMode\": true,\n \"tempPrivateModeExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempPrivateModeNextJourneyOnly\": true,\n \"autoCreated\": true,\n \"keys\": [\n {\n \"value\": \"key-value\",\n \"type\": \"CARD\",\n \"privateMode\": true\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"secondaryGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"customerId\": \"<string>\",\n \"name\": \"<string>\",\n \"active\": true,\n \"activeDate\": \"2023-11-07T05:31:56Z\",\n \"groupId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"defaultVehicleId\": \"<string>\",\n \"tempVehicleId\": \"<string>\",\n \"tempVehicleExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempVehicleNextJourneyOnly\": true,\n \"tempPrivateMode\": true,\n \"tempPrivateModeExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempPrivateModeNextJourneyOnly\": true,\n \"autoCreated\": true,\n \"keys\": [\n {\n \"value\": \"key-value\",\n \"type\": \"CARD\",\n \"privateMode\": true\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"secondaryGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"externalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body/driver
Create Driver
Create given driver to the hierarchy node (drivers are removed from their current node).
POST
/
public
/
v1
/
customer
/
{customerId}
/
driver
Create Driver
curl --request POST \
--url https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"customerId": "<string>",
"name": "<string>",
"active": true,
"activeDate": "2023-11-07T05:31:56Z",
"groupId": "<string>",
"groupName": "<string>",
"defaultVehicleId": "<string>",
"tempVehicleId": "<string>",
"tempVehicleExpiry": "2023-11-07T05:31:56Z",
"tempVehicleNextJourneyOnly": true,
"tempPrivateMode": true,
"tempPrivateModeExpiry": "2023-11-07T05:31:56Z",
"tempPrivateModeNextJourneyOnly": true,
"autoCreated": true,
"keys": [
{
"value": "key-value",
"type": "CARD",
"privateMode": true
}
],
"tags": [
"<string>"
],
"secondaryGroups": [
{
"id": "<string>",
"name": "<string>"
}
],
"externalId": "<string>"
}
'import requests
url = "https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver"
payload = {
"id": "<string>",
"customerId": "<string>",
"name": "<string>",
"active": True,
"activeDate": "2023-11-07T05:31:56Z",
"groupId": "<string>",
"groupName": "<string>",
"defaultVehicleId": "<string>",
"tempVehicleId": "<string>",
"tempVehicleExpiry": "2023-11-07T05:31:56Z",
"tempVehicleNextJourneyOnly": True,
"tempPrivateMode": True,
"tempPrivateModeExpiry": "2023-11-07T05:31:56Z",
"tempPrivateModeNextJourneyOnly": True,
"autoCreated": True,
"keys": [
{
"value": "key-value",
"type": "CARD",
"privateMode": True
}
],
"tags": ["<string>"],
"secondaryGroups": [
{
"id": "<string>",
"name": "<string>"
}
],
"externalId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
customerId: '<string>',
name: '<string>',
active: true,
activeDate: '2023-11-07T05:31:56Z',
groupId: '<string>',
groupName: '<string>',
defaultVehicleId: '<string>',
tempVehicleId: '<string>',
tempVehicleExpiry: '2023-11-07T05:31:56Z',
tempVehicleNextJourneyOnly: true,
tempPrivateMode: true,
tempPrivateModeExpiry: '2023-11-07T05:31:56Z',
tempPrivateModeNextJourneyOnly: true,
autoCreated: true,
keys: [{value: 'key-value', type: 'CARD', privateMode: true}],
tags: ['<string>'],
secondaryGroups: [{id: '<string>', name: '<string>'}],
externalId: '<string>'
})
};
fetch('https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver', 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}/driver",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'customerId' => '<string>',
'name' => '<string>',
'active' => true,
'activeDate' => '2023-11-07T05:31:56Z',
'groupId' => '<string>',
'groupName' => '<string>',
'defaultVehicleId' => '<string>',
'tempVehicleId' => '<string>',
'tempVehicleExpiry' => '2023-11-07T05:31:56Z',
'tempVehicleNextJourneyOnly' => true,
'tempPrivateMode' => true,
'tempPrivateModeExpiry' => '2023-11-07T05:31:56Z',
'tempPrivateModeNextJourneyOnly' => true,
'autoCreated' => true,
'keys' => [
[
'value' => 'key-value',
'type' => 'CARD',
'privateMode' => true
]
],
'tags' => [
'<string>'
],
'secondaryGroups' => [
[
'id' => '<string>',
'name' => '<string>'
]
],
'externalId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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}/driver"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"customerId\": \"<string>\",\n \"name\": \"<string>\",\n \"active\": true,\n \"activeDate\": \"2023-11-07T05:31:56Z\",\n \"groupId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"defaultVehicleId\": \"<string>\",\n \"tempVehicleId\": \"<string>\",\n \"tempVehicleExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempVehicleNextJourneyOnly\": true,\n \"tempPrivateMode\": true,\n \"tempPrivateModeExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempPrivateModeNextJourneyOnly\": true,\n \"autoCreated\": true,\n \"keys\": [\n {\n \"value\": \"key-value\",\n \"type\": \"CARD\",\n \"privateMode\": true\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"secondaryGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"externalId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"customerId\": \"<string>\",\n \"name\": \"<string>\",\n \"active\": true,\n \"activeDate\": \"2023-11-07T05:31:56Z\",\n \"groupId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"defaultVehicleId\": \"<string>\",\n \"tempVehicleId\": \"<string>\",\n \"tempVehicleExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempVehicleNextJourneyOnly\": true,\n \"tempPrivateMode\": true,\n \"tempPrivateModeExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempPrivateModeNextJourneyOnly\": true,\n \"autoCreated\": true,\n \"keys\": [\n {\n \"value\": \"key-value\",\n \"type\": \"CARD\",\n \"privateMode\": true\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"secondaryGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"externalId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.connectedfleet.michelin.com/fleet-management/public/v1/customer/{customerId}/driver")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"customerId\": \"<string>\",\n \"name\": \"<string>\",\n \"active\": true,\n \"activeDate\": \"2023-11-07T05:31:56Z\",\n \"groupId\": \"<string>\",\n \"groupName\": \"<string>\",\n \"defaultVehicleId\": \"<string>\",\n \"tempVehicleId\": \"<string>\",\n \"tempVehicleExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempVehicleNextJourneyOnly\": true,\n \"tempPrivateMode\": true,\n \"tempPrivateModeExpiry\": \"2023-11-07T05:31:56Z\",\n \"tempPrivateModeNextJourneyOnly\": true,\n \"autoCreated\": true,\n \"keys\": [\n {\n \"value\": \"key-value\",\n \"type\": \"CARD\",\n \"privateMode\": true\n }\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"secondaryGroups\": [\n {\n \"id\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"externalId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Pattern:
^[\w]*$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Pattern:
^[a-zA-Z0-9]{0,25}$|Response
Driver was successfully created
Was this page helpful?
⌘I
