curl --request GET \
--url https://apiweb.mile.app/api/v4/vehicle/{vehicleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/vehicle/{vehicleId}"
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/vehicle/{vehicleId}', 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/vehicle/{vehicleId}",
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/vehicle/{vehicleId}"
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/vehicle/{vehicleId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/vehicle/{vehicleId}")
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{
"status": true,
"message": "Success",
"data": {
"_id": "68e4c1d2a01b2c3d4e5f6071",
"name": "B 9123 KXT",
"isActive": true,
"hubId": "65c1f68ea735b522d370ea25",
"assignee": "[email protected]",
"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",
"extendedData": null
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Read vehicle by ID
Returns one vehicle of your organization.
An id that is not a vehicle of your organization returns 404 with failedCode vehic-033.
Same as GET /api/v3/vehicle/{id}, plus the include parameter.
Requires permission view/vehicle.
curl --request GET \
--url https://apiweb.mile.app/api/v4/vehicle/{vehicleId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v4/vehicle/{vehicleId}"
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/vehicle/{vehicleId}', 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/vehicle/{vehicleId}",
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/vehicle/{vehicleId}"
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/vehicle/{vehicleId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v4/vehicle/{vehicleId}")
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{
"status": true,
"message": "Success",
"data": {
"_id": "68e4c1d2a01b2c3d4e5f6071",
"name": "B 9123 KXT",
"isActive": true,
"hubId": "65c1f68ea735b522d370ea25",
"assignee": "[email protected]",
"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",
"extendedData": null
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}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.