Update Driver
curl --request PUT \
--url https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId} \
--header 'AccessToken: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name_first": "<string>",
"name_last": "<string>",
"driver_license_state": "<string>",
"driver_license_number": "<string>",
"driver_date_of_birth": "2023-12-25",
"years_cdl_experience": 123,
"months_cdl_experience": 123,
"accidents_total": 123,
"suspensions_total": 123,
"violations_total": 123,
"major_violations_total": 123
}
'import requests
url = "https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}"
payload = {
"name_first": "<string>",
"name_last": "<string>",
"driver_license_state": "<string>",
"driver_license_number": "<string>",
"driver_date_of_birth": "2023-12-25",
"years_cdl_experience": 123,
"months_cdl_experience": 123,
"accidents_total": 123,
"suspensions_total": 123,
"violations_total": 123,
"major_violations_total": 123
}
headers = {
"AccessToken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {AccessToken: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name_first: '<string>',
name_last: '<string>',
driver_license_state: '<string>',
driver_license_number: '<string>',
driver_date_of_birth: '2023-12-25',
years_cdl_experience: 123,
months_cdl_experience: 123,
accidents_total: 123,
suspensions_total: 123,
violations_total: 123,
major_violations_total: 123
})
};
fetch('https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/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.coverwhale.dev/v1/submission/{displayId}/{transactionId}/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([
'name_first' => '<string>',
'name_last' => '<string>',
'driver_license_state' => '<string>',
'driver_license_number' => '<string>',
'driver_date_of_birth' => '2023-12-25',
'years_cdl_experience' => 123,
'months_cdl_experience' => 123,
'accidents_total' => 123,
'suspensions_total' => 123,
'violations_total' => 123,
'major_violations_total' => 123
]),
CURLOPT_HTTPHEADER => [
"AccessToken: <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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}"
payload := strings.NewReader("{\n \"name_first\": \"<string>\",\n \"name_last\": \"<string>\",\n \"driver_license_state\": \"<string>\",\n \"driver_license_number\": \"<string>\",\n \"driver_date_of_birth\": \"2023-12-25\",\n \"years_cdl_experience\": 123,\n \"months_cdl_experience\": 123,\n \"accidents_total\": 123,\n \"suspensions_total\": 123,\n \"violations_total\": 123,\n \"major_violations_total\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("AccessToken", "<api-key>")
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.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}")
.header("AccessToken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name_first\": \"<string>\",\n \"name_last\": \"<string>\",\n \"driver_license_state\": \"<string>\",\n \"driver_license_number\": \"<string>\",\n \"driver_date_of_birth\": \"2023-12-25\",\n \"years_cdl_experience\": 123,\n \"months_cdl_experience\": 123,\n \"accidents_total\": 123,\n \"suspensions_total\": 123,\n \"violations_total\": 123,\n \"major_violations_total\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["AccessToken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name_first\": \"<string>\",\n \"name_last\": \"<string>\",\n \"driver_license_state\": \"<string>\",\n \"driver_license_number\": \"<string>\",\n \"driver_date_of_birth\": \"2023-12-25\",\n \"years_cdl_experience\": 123,\n \"months_cdl_experience\": 123,\n \"accidents_total\": 123,\n \"suspensions_total\": 123,\n \"violations_total\": 123,\n \"major_violations_total\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"driver_id": 123,
"submission_number": "<string>",
"transaction_id": 123,
"updated_fields": [
"<string>"
]
}Submission Data
Update Driver
Updates fields on an existing driver. Only send fields that need to change.
PUT
/
submission
/
{displayId}
/
{transactionId}
/
driver
/
{driverId}
Update Driver
curl --request PUT \
--url https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId} \
--header 'AccessToken: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name_first": "<string>",
"name_last": "<string>",
"driver_license_state": "<string>",
"driver_license_number": "<string>",
"driver_date_of_birth": "2023-12-25",
"years_cdl_experience": 123,
"months_cdl_experience": 123,
"accidents_total": 123,
"suspensions_total": 123,
"violations_total": 123,
"major_violations_total": 123
}
'import requests
url = "https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}"
payload = {
"name_first": "<string>",
"name_last": "<string>",
"driver_license_state": "<string>",
"driver_license_number": "<string>",
"driver_date_of_birth": "2023-12-25",
"years_cdl_experience": 123,
"months_cdl_experience": 123,
"accidents_total": 123,
"suspensions_total": 123,
"violations_total": 123,
"major_violations_total": 123
}
headers = {
"AccessToken": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {AccessToken: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name_first: '<string>',
name_last: '<string>',
driver_license_state: '<string>',
driver_license_number: '<string>',
driver_date_of_birth: '2023-12-25',
years_cdl_experience: 123,
months_cdl_experience: 123,
accidents_total: 123,
suspensions_total: 123,
violations_total: 123,
major_violations_total: 123
})
};
fetch('https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/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.coverwhale.dev/v1/submission/{displayId}/{transactionId}/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([
'name_first' => '<string>',
'name_last' => '<string>',
'driver_license_state' => '<string>',
'driver_license_number' => '<string>',
'driver_date_of_birth' => '2023-12-25',
'years_cdl_experience' => 123,
'months_cdl_experience' => 123,
'accidents_total' => 123,
'suspensions_total' => 123,
'violations_total' => 123,
'major_violations_total' => 123
]),
CURLOPT_HTTPHEADER => [
"AccessToken: <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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}"
payload := strings.NewReader("{\n \"name_first\": \"<string>\",\n \"name_last\": \"<string>\",\n \"driver_license_state\": \"<string>\",\n \"driver_license_number\": \"<string>\",\n \"driver_date_of_birth\": \"2023-12-25\",\n \"years_cdl_experience\": 123,\n \"months_cdl_experience\": 123,\n \"accidents_total\": 123,\n \"suspensions_total\": 123,\n \"violations_total\": 123,\n \"major_violations_total\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("AccessToken", "<api-key>")
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.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}")
.header("AccessToken", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name_first\": \"<string>\",\n \"name_last\": \"<string>\",\n \"driver_license_state\": \"<string>\",\n \"driver_license_number\": \"<string>\",\n \"driver_date_of_birth\": \"2023-12-25\",\n \"years_cdl_experience\": 123,\n \"months_cdl_experience\": 123,\n \"accidents_total\": 123,\n \"suspensions_total\": 123,\n \"violations_total\": 123,\n \"major_violations_total\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coverwhale.dev/v1/submission/{displayId}/{transactionId}/driver/{driverId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["AccessToken"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name_first\": \"<string>\",\n \"name_last\": \"<string>\",\n \"driver_license_state\": \"<string>\",\n \"driver_license_number\": \"<string>\",\n \"driver_date_of_birth\": \"2023-12-25\",\n \"years_cdl_experience\": 123,\n \"months_cdl_experience\": 123,\n \"accidents_total\": 123,\n \"suspensions_total\": 123,\n \"violations_total\": 123,\n \"major_violations_total\": 123\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"driver_id": 123,
"submission_number": "<string>",
"transaction_id": 123,
"updated_fields": [
"<string>"
]
}Authorizations
AWS Cognito access token obtained from the /authentication endpoint. Token expires after 3600 seconds.
Headers
Body
application/json
Available options:
Y, N