curl --request GET \
--url https://apiweb.mile.app/api/v3/vehicle-maintenances \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/vehicle-maintenances"
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/v3/vehicle-maintenances', 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/v3/vehicle-maintenances",
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/v3/vehicle-maintenances"
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/v3/vehicle-maintenances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/vehicle-maintenances")
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,
"data": [
{
"_id": "6720a1f0c2e4b0a1000112ab",
"organizationId": "65a1b2c3d4e5f60000000001",
"vehicleId": "65f9c1aa77e0b30001aa1122",
"hubId": "65e7b0110000000000000001",
"startTime": "2026-11-04T01:00:00+00:00",
"endTime": "2026-11-04T10:00:00+00:00",
"notes": "Annual service",
"createdBy": "[email protected]",
"createdTime": "2026-10-29T03:12:44+00:00",
"updatedTime": "2026-10-29T03:12:44+00:00"
}
],
"total": 1
}Read vehicle maintenance schedules
Lists the maintenance schedules of a hub or of one vehicle in your organization. Send hubId or vehicleId (one of them is required; with both, both must match).
startTime and endTime return the schedules that overlap that range: startTime keeps the schedules that end at or after it, and endTime keeps the schedules that start at or before it. Both accept Y-m-d H:i:s (read as UTC) or ISO-8601 with an offset, for example 2026-11-01T00:00:00+07:00.
Any parameter with an invalid value is rejected with 400 and vehic-003.
Requires the View Vehicle permission.
curl --request GET \
--url https://apiweb.mile.app/api/v3/vehicle-maintenances \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/vehicle-maintenances"
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/v3/vehicle-maintenances', 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/v3/vehicle-maintenances",
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/v3/vehicle-maintenances"
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/v3/vehicle-maintenances")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/vehicle-maintenances")
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,
"data": [
{
"_id": "6720a1f0c2e4b0a1000112ab",
"organizationId": "65a1b2c3d4e5f60000000001",
"vehicleId": "65f9c1aa77e0b30001aa1122",
"hubId": "65e7b0110000000000000001",
"startTime": "2026-11-04T01:00:00+00:00",
"endTime": "2026-11-04T10:00:00+00:00",
"notes": "Annual service",
"createdBy": "[email protected]",
"createdTime": "2026-10-29T03:12:44+00:00",
"updatedTime": "2026-10-29T03:12:44+00:00"
}
],
"total": 1
}Authorizations
Use a valid Bearer token to authenticate.
Query Parameters
Schedules of the vehicles in this hub. Required when vehicleId is not sent.
Example: 65e7b0110000000000000001
Schedules of this vehicle. Required when hubId is not sent.
Example: 65f9c1aa77e0b30001aa1122
Keeps the schedules that end at or after this time. Y-m-d H:i:s (UTC) or ISO-8601 with an offset.
Example: 2026-11-01T00:00:00+07:00
Keeps the schedules that start at or before this time. Same formats as startTime, and not earlier than it.
Example: 2026-11-30T23:59:59+07:00
true or 1 returns only the schedule that ended most recently (end time before now), combined with the other filters. page, limit and sortOrder are then ignored, and total is 0 or 1.
Example: true
true, false, 1, 0 Order by startTime: asc (default) or desc.
Example: desc
asc, desc Schedules per page, 1 to 1000.
Example: 20
1 <= x <= 1000Page number, from 1.
Example: 1
x >= 1