curl --request GET \
--url https://apiweb.mile.app/api/v4/vehicles \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/vehicles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v4/vehicles', 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://apiweb.mile.app/api/v4/vehicles",
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://apiweb.mile.app/api/v4/vehicles"
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://apiweb.mile.app/api/v4/vehicles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/vehicles")
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{
"current_page": 1,
"data": [
{
"_id": "68e4c1d2a01b2c3d4e5f6071",
"name": "B 9123 KXT",
"isActive": true,
"hubId": "65c1f68ea735b522d370ea25",
"assignee": "rina@example.com",
"speed": 40,
"fixedCost": 150000,
"oddEven": null,
"isOddEven": false,
"workingTime": {
"startTime": "08:00",
"endTime": "17:00"
},
"breakTime": [],
"tags": [
"van"
],
"organizationId": "65c1f4eeca7c4816d94587b2",
"updatedTime": "2026-10-05T02:10:11.000000Z",
"createdTime": "2026-10-05T02:10:11.000000Z",
"hubs": {
"_id": "65c1f68ea735b522d370ea25",
"name": "Bandung",
"address": "Jalan Kebon Kawung 215, Bandung"
},
"extendedData": null
}
],
"first_page_url": "https://apiweb.mile.app/api/v4/vehicles?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/api/v4/vehicles?page=1",
"links": [],
"next_page_url": null,
"path": "https://apiweb.mile.app/api/v4/vehicles",
"per_page": 20,
"prev_page_url": null,
"to": 1,
"total": 1
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Read vehicles
Returns the vehicles of your organization as a page, newest first. The response is a page object (data, current_page, total, …) with no status field.
With hubId, the hub’s own vehicles come first, then the vehicles of its sub hubs when the hub’s routing configuration uses cross docking.
sortBy and sortOrder are accepted but have no effect: the order is always newest first.
Same as GET /api/v3/vehicles, plus the include parameter.
Requires permission view/vehicle.
curl --request GET \
--url https://apiweb.mile.app/api/v4/vehicles \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/vehicles"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v4/vehicles', 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://apiweb.mile.app/api/v4/vehicles",
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://apiweb.mile.app/api/v4/vehicles"
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://apiweb.mile.app/api/v4/vehicles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/vehicles")
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{
"current_page": 1,
"data": [
{
"_id": "68e4c1d2a01b2c3d4e5f6071",
"name": "B 9123 KXT",
"isActive": true,
"hubId": "65c1f68ea735b522d370ea25",
"assignee": "rina@example.com",
"speed": 40,
"fixedCost": 150000,
"oddEven": null,
"isOddEven": false,
"workingTime": {
"startTime": "08:00",
"endTime": "17:00"
},
"breakTime": [],
"tags": [
"van"
],
"organizationId": "65c1f4eeca7c4816d94587b2",
"updatedTime": "2026-10-05T02:10:11.000000Z",
"createdTime": "2026-10-05T02:10:11.000000Z",
"hubs": {
"_id": "65c1f68ea735b522d370ea25",
"name": "Bandung",
"address": "Jalan Kebon Kawung 215, Bandung"
},
"extendedData": null
}
],
"first_page_url": "https://apiweb.mile.app/api/v4/vehicles?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://apiweb.mile.app/api/v4/vehicles?page=1",
"links": [],
"next_page_url": null,
"path": "https://apiweb.mile.app/api/v4/vehicles",
"per_page": 20,
"prev_page_url": null,
"to": 1,
"total": 1
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Query Parameters
Pass extendedData to add each vehicle's extendedData: the record of your organization's vehicle extension data type (the custom fields added under Extended data). Off by default, and only the exact value extendedData turns it on.
When your organization has no vehicle extension, the field is left out. When it has one but this vehicle has no record yet, the field is null.
When the extension is kept per hub, extendedData is an array with one record per hub. Add hubId to get only that hub's record as an object, or null when it has none.
Example: extendedData
extendedData Response
Success
The response is of type object.