Update Driver
curl --request PUT \
--url https://api.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId} \
--header 'Authorization: Basic <encoded-value>' \
--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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}"
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": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', '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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}', 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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}",
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' => '<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: Basic <encoded-value>",
"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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}"
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("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://api.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}")
.header("Authorization", "Basic <encoded-value>")
.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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
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{
"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>"
}/driver
Update Driver
Update given driver to the hierarchy node (drivers are removed from their current node).
PUT
/
public
/
v1
/
customer
/
{customerId}
/
driver
/
{driverId}
Update Driver
curl --request PUT \
--url https://api.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId} \
--header 'Authorization: Basic <encoded-value>' \
--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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}"
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": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Basic <encoded-value>', '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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}', 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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}",
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' => '<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: Basic <encoded-value>",
"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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}"
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("PUT", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.put("https://api.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}")
.header("Authorization", "Basic <encoded-value>")
.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.masternautconnect.com/connect-webservices/services/public/v1/customer/{customerId}/driver/{driverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Basic <encoded-value>'
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{
"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>"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
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 updated
Pattern:
^[\w]*$Show child attributes
Show child attributes
Show child attributes
Show child attributes
Pattern:
^[a-zA-Z0-9]{0,25}$|Was this page helpful?
⌘I
