Bulk Create Drivers
curl --request POST \
--url https://api.app.fleetit.com/v2/drivers/bulk/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"driver_id": "DUMMY12345",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"contact_number": "1234567890",
"email": "john.doe@example.com"
},
{
"driver_id": "DUMMY67890",
"first_name": "Jane",
"last_name": "Smith",
"address_line_1": "456 Elm Street",
"address_line_2": "Apt 5C",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"contact_number": "9876543210",
"email": "jane.smith@example.com"
}
]
'import requests
url = "https://api.app.fleetit.com/v2/drivers/bulk/"
payload = [
{
"driver_id": "DUMMY12345",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"contact_number": "1234567890",
"email": "john.doe@example.com"
},
{
"driver_id": "DUMMY67890",
"first_name": "Jane",
"last_name": "Smith",
"address_line_1": "456 Elm Street",
"address_line_2": "Apt 5C",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"contact_number": "9876543210",
"email": "jane.smith@example.com"
}
]
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([
{
driver_id: 'DUMMY12345',
first_name: 'John',
last_name: 'Doe',
address_line_1: '123 Main Street',
address_line_2: 'Apt 4B',
city: 'New York',
state: 'NY',
zip: '10001',
contact_number: '1234567890',
email: 'john.doe@example.com'
},
{
driver_id: 'DUMMY67890',
first_name: 'Jane',
last_name: 'Smith',
address_line_1: '456 Elm Street',
address_line_2: 'Apt 5C',
city: 'Los Angeles',
state: 'CA',
zip: '90001',
contact_number: '9876543210',
email: 'jane.smith@example.com'
}
])
};
fetch('https://api.app.fleetit.com/v2/drivers/bulk/', 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.app.fleetit.com/v2/drivers/bulk/",
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([
[
'driver_id' => 'DUMMY12345',
'first_name' => 'John',
'last_name' => 'Doe',
'address_line_1' => '123 Main Street',
'address_line_2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'zip' => '10001',
'contact_number' => '1234567890',
'email' => 'john.doe@example.com'
],
[
'driver_id' => 'DUMMY67890',
'first_name' => 'Jane',
'last_name' => 'Smith',
'address_line_1' => '456 Elm Street',
'address_line_2' => 'Apt 5C',
'city' => 'Los Angeles',
'state' => 'CA',
'zip' => '90001',
'contact_number' => '9876543210',
'email' => 'jane.smith@example.com'
]
]),
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.app.fleetit.com/v2/drivers/bulk/"
payload := strings.NewReader("[\n {\n \"driver_id\": \"DUMMY12345\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_line_1\": \"123 Main Street\",\n \"address_line_2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"contact_number\": \"1234567890\",\n \"email\": \"john.doe@example.com\"\n },\n {\n \"driver_id\": \"DUMMY67890\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"address_line_1\": \"456 Elm Street\",\n \"address_line_2\": \"Apt 5C\",\n \"city\": \"Los Angeles\",\n \"state\": \"CA\",\n \"zip\": \"90001\",\n \"contact_number\": \"9876543210\",\n \"email\": \"jane.smith@example.com\"\n }\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.app.fleetit.com/v2/drivers/bulk/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"driver_id\": \"DUMMY12345\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_line_1\": \"123 Main Street\",\n \"address_line_2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"contact_number\": \"1234567890\",\n \"email\": \"john.doe@example.com\"\n },\n {\n \"driver_id\": \"DUMMY67890\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"address_line_1\": \"456 Elm Street\",\n \"address_line_2\": \"Apt 5C\",\n \"city\": \"Los Angeles\",\n \"state\": \"CA\",\n \"zip\": \"90001\",\n \"contact_number\": \"9876543210\",\n \"email\": \"jane.smith@example.com\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.fleetit.com/v2/drivers/bulk/")
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 {\n \"driver_id\": \"DUMMY12345\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_line_1\": \"123 Main Street\",\n \"address_line_2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"contact_number\": \"1234567890\",\n \"email\": \"john.doe@example.com\"\n },\n {\n \"driver_id\": \"DUMMY67890\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"address_line_1\": \"456 Elm Street\",\n \"address_line_2\": \"Apt 5C\",\n \"city\": \"Los Angeles\",\n \"state\": \"CA\",\n \"zip\": \"90001\",\n \"contact_number\": \"9876543210\",\n \"email\": \"jane.smith@example.com\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": 101,
"driver_id": "DUMMY12345",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"contact_number": "1234567890",
"email": "john.doe@example.com"
},
{
"id": 102,
"driver_id": "DUMMY67890",
"first_name": "Jane",
"last_name": "Smith",
"address_line_1": "456 Elm Street",
"address_line_2": "Apt 5C",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"contact_number": "9876543210",
"email": "jane.smith@example.com"
}
]Drivers
Bulk Create
Creates multiple drivers in system
POST
/
v2
/
drivers
/
bulk
/
Bulk Create Drivers
curl --request POST \
--url https://api.app.fleetit.com/v2/drivers/bulk/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"driver_id": "DUMMY12345",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"contact_number": "1234567890",
"email": "john.doe@example.com"
},
{
"driver_id": "DUMMY67890",
"first_name": "Jane",
"last_name": "Smith",
"address_line_1": "456 Elm Street",
"address_line_2": "Apt 5C",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"contact_number": "9876543210",
"email": "jane.smith@example.com"
}
]
'import requests
url = "https://api.app.fleetit.com/v2/drivers/bulk/"
payload = [
{
"driver_id": "DUMMY12345",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"contact_number": "1234567890",
"email": "john.doe@example.com"
},
{
"driver_id": "DUMMY67890",
"first_name": "Jane",
"last_name": "Smith",
"address_line_1": "456 Elm Street",
"address_line_2": "Apt 5C",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"contact_number": "9876543210",
"email": "jane.smith@example.com"
}
]
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([
{
driver_id: 'DUMMY12345',
first_name: 'John',
last_name: 'Doe',
address_line_1: '123 Main Street',
address_line_2: 'Apt 4B',
city: 'New York',
state: 'NY',
zip: '10001',
contact_number: '1234567890',
email: 'john.doe@example.com'
},
{
driver_id: 'DUMMY67890',
first_name: 'Jane',
last_name: 'Smith',
address_line_1: '456 Elm Street',
address_line_2: 'Apt 5C',
city: 'Los Angeles',
state: 'CA',
zip: '90001',
contact_number: '9876543210',
email: 'jane.smith@example.com'
}
])
};
fetch('https://api.app.fleetit.com/v2/drivers/bulk/', 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.app.fleetit.com/v2/drivers/bulk/",
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([
[
'driver_id' => 'DUMMY12345',
'first_name' => 'John',
'last_name' => 'Doe',
'address_line_1' => '123 Main Street',
'address_line_2' => 'Apt 4B',
'city' => 'New York',
'state' => 'NY',
'zip' => '10001',
'contact_number' => '1234567890',
'email' => 'john.doe@example.com'
],
[
'driver_id' => 'DUMMY67890',
'first_name' => 'Jane',
'last_name' => 'Smith',
'address_line_1' => '456 Elm Street',
'address_line_2' => 'Apt 5C',
'city' => 'Los Angeles',
'state' => 'CA',
'zip' => '90001',
'contact_number' => '9876543210',
'email' => 'jane.smith@example.com'
]
]),
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.app.fleetit.com/v2/drivers/bulk/"
payload := strings.NewReader("[\n {\n \"driver_id\": \"DUMMY12345\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_line_1\": \"123 Main Street\",\n \"address_line_2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"contact_number\": \"1234567890\",\n \"email\": \"john.doe@example.com\"\n },\n {\n \"driver_id\": \"DUMMY67890\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"address_line_1\": \"456 Elm Street\",\n \"address_line_2\": \"Apt 5C\",\n \"city\": \"Los Angeles\",\n \"state\": \"CA\",\n \"zip\": \"90001\",\n \"contact_number\": \"9876543210\",\n \"email\": \"jane.smith@example.com\"\n }\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.app.fleetit.com/v2/drivers/bulk/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"driver_id\": \"DUMMY12345\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_line_1\": \"123 Main Street\",\n \"address_line_2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"contact_number\": \"1234567890\",\n \"email\": \"john.doe@example.com\"\n },\n {\n \"driver_id\": \"DUMMY67890\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"address_line_1\": \"456 Elm Street\",\n \"address_line_2\": \"Apt 5C\",\n \"city\": \"Los Angeles\",\n \"state\": \"CA\",\n \"zip\": \"90001\",\n \"contact_number\": \"9876543210\",\n \"email\": \"jane.smith@example.com\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.app.fleetit.com/v2/drivers/bulk/")
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 {\n \"driver_id\": \"DUMMY12345\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"address_line_1\": \"123 Main Street\",\n \"address_line_2\": \"Apt 4B\",\n \"city\": \"New York\",\n \"state\": \"NY\",\n \"zip\": \"10001\",\n \"contact_number\": \"1234567890\",\n \"email\": \"john.doe@example.com\"\n },\n {\n \"driver_id\": \"DUMMY67890\",\n \"first_name\": \"Jane\",\n \"last_name\": \"Smith\",\n \"address_line_1\": \"456 Elm Street\",\n \"address_line_2\": \"Apt 5C\",\n \"city\": \"Los Angeles\",\n \"state\": \"CA\",\n \"zip\": \"90001\",\n \"contact_number\": \"9876543210\",\n \"email\": \"jane.smith@example.com\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": 101,
"driver_id": "DUMMY12345",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main Street",
"address_line_2": "Apt 4B",
"city": "New York",
"state": "NY",
"zip": "10001",
"contact_number": "1234567890",
"email": "john.doe@example.com"
},
{
"id": 102,
"driver_id": "DUMMY67890",
"first_name": "Jane",
"last_name": "Smith",
"address_line_1": "456 Elm Street",
"address_line_2": "Apt 5C",
"city": "Los Angeles",
"state": "CA",
"zip": "90001",
"contact_number": "9876543210",
"email": "jane.smith@example.com"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Unique identifier for the driver
Example:
"DUMMY12345"
Example:
"John"
Example:
"Doe"
Example:
"123 Main Street"
Example:
"New York"
Example:
"NY"
Example:
"10001"
Example:
"1234567890"
Example:
"john.doe@example.com"
Example:
"Apt 4B"
Response
200 - application/json
Successful response
Example:
101
Example:
"DUMMY12345"
Example:
"John"
Example:
"Doe"
Example:
"123 Main Street"
Example:
"Apt 4B"
Example:
"New York"
Example:
"NY"
Example:
"10001"
Example:
"1234567890"
Example:
"john.doe@example.com"
Was this page helpful?
⌘I

