cURL
curl --request GET \
--url https://api.example.com/v2/driver-agreements/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v2/driver-agreements/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v2/driver-agreements/{id}/', 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.example.com/v2/driver-agreements/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/driver-agreements/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v2/driver-agreements/{id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/driver-agreements/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"custom_fields": "<string>",
"vehicle": {
"id": 123,
"custom_fields": "<string>",
"added_date": "2023-11-07T05:31:56Z",
"fleet": {
"id": 123,
"region_details": [
{
"id": 123,
"title": "<string>"
}
],
"title": "<string>",
"is_active": true,
"warning_threshold_per_vehicle": "<string>",
"deactivation_threshold_per_vehicle": "<string>",
"client": "<string>",
"onboarding_vehicle_order": 123
},
"plate_number": "<string>",
"plate_state": "<string>",
"vehicle_number": "<string>",
"active": true,
"vehicle_make": "<string>",
"vehicle_model": "<string>",
"year": "<string>",
"lessee_renter": "<string>",
"vehicle_type_code": "<string>"
},
"driver": {
"id": 123,
"first_name": "<string>",
"address_line_1": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"email": [
"jsmith@example.com"
],
"driver_id": "<string>",
"last_name": "<string>",
"address_line_2": "<string>",
"contact_number": "<string>"
},
"status": "<string>",
"agreement_start_date": "2023-11-07T05:31:56Z",
"date_added": "2023-11-07T05:31:56Z",
"last_updated": "2023-11-07T05:31:56Z",
"agreement_number": "<string>",
"agreement_end_date": "2023-11-07T05:31:56Z",
"plan": "<string>"
}Driver Agreements
Get Driver Agreement
Retrieve a driver agreement by ID.
GET
/
v2
/
driver-agreements
/
{id}
/
cURL
curl --request GET \
--url https://api.example.com/v2/driver-agreements/{id}/ \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/v2/driver-agreements/{id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/v2/driver-agreements/{id}/', 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.example.com/v2/driver-agreements/{id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v2/driver-agreements/{id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v2/driver-agreements/{id}/")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/driver-agreements/{id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"custom_fields": "<string>",
"vehicle": {
"id": 123,
"custom_fields": "<string>",
"added_date": "2023-11-07T05:31:56Z",
"fleet": {
"id": 123,
"region_details": [
{
"id": 123,
"title": "<string>"
}
],
"title": "<string>",
"is_active": true,
"warning_threshold_per_vehicle": "<string>",
"deactivation_threshold_per_vehicle": "<string>",
"client": "<string>",
"onboarding_vehicle_order": 123
},
"plate_number": "<string>",
"plate_state": "<string>",
"vehicle_number": "<string>",
"active": true,
"vehicle_make": "<string>",
"vehicle_model": "<string>",
"year": "<string>",
"lessee_renter": "<string>",
"vehicle_type_code": "<string>"
},
"driver": {
"id": 123,
"first_name": "<string>",
"address_line_1": "<string>",
"city": "<string>",
"state": "<string>",
"zip": "<string>",
"email": [
"jsmith@example.com"
],
"driver_id": "<string>",
"last_name": "<string>",
"address_line_2": "<string>",
"contact_number": "<string>"
},
"status": "<string>",
"agreement_start_date": "2023-11-07T05:31:56Z",
"date_added": "2023-11-07T05:31:56Z",
"last_updated": "2023-11-07T05:31:56Z",
"agreement_number": "<string>",
"agreement_end_date": "2023-11-07T05:31:56Z",
"plan": "<string>"
}Authorizations
JWTAPIKey
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
A unique integer value identifying this Driver Agreement.
Response
200 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
255ACTIVE- ActiveINACTIVE- In-active
Available options:
ACTIVE, INACTIVE Maximum string length:
255Was this page helpful?
⌘I

