Routes
List routes
GET /dn/routes lists all routes for a given date with pagination. Returns vehicles, planned jobs, distance, time, and status per route.
GET
/
dn
/
routes
List routes
curl --request GET \
--url https://app.detrack.com/api/v2/dn/routes \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.detrack.com/api/v2/dn/routes"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.detrack.com/api/v2/dn/routes', 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://app.detrack.com/api/v2/dn/routes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://app.detrack.com/api/v2/dn/routes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.detrack.com/api/v2/dn/routes")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "69001c6de8ec5410e2570bb3",
"name": "sample_run",
"date": "2026-09-15",
"mode": "drive",
"status": "to_be_confirm",
"message": "<string>",
"vehicle": {},
"job_ids": [
"<string>"
],
"depot_location": {
"id": "68f0d416e8ec54cbf4a04dba",
"name": "Main Depot",
"address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Mandaluyong, 1550 Metro Manila",
"addr_1": "<string>",
"addr_2": "<string>",
"addr_3": "<string>",
"zip_code": "<string>",
"country": "<string>",
"city": "<string>",
"state": "<string>",
"country_id": "<string>",
"location": [
121.055626,
14.583941
],
"address_lat": 14.583941,
"address_lng": 121.055626
},
"end_depot_location": {
"id": "68f0d416e8ec54cbf4a04dba",
"name": "Main Depot",
"address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Mandaluyong, 1550 Metro Manila",
"addr_1": "<string>",
"addr_2": "<string>",
"addr_3": "<string>",
"zip_code": "<string>",
"country": "<string>",
"city": "<string>",
"state": "<string>",
"country_id": "<string>",
"location": [
121.055626,
14.583941
],
"address_lat": 14.583941,
"address_lng": 121.055626
},
"total_distance": 15107,
"total_time": 4373.497,
"total_planned": 3,
"total_unplanned": 0,
"type": "balanced",
"jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
],
"planned_routes": [
{
"id": "69001c6fe8ec5410e2570bc0",
"vrp_id": "69001c6de8ec5410e2570bb3",
"name": "1",
"date": "2026-09-15",
"status": "to_be_confirm",
"vehicle": {},
"time_window_from": "07:00",
"time_window_to": "23:50",
"start_time": "07:00",
"completion_time": "08:12",
"total_distance": 15107,
"total_time": 4373.497,
"total_planned": 3,
"total_unplanned": 0,
"planned_jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
],
"unplanned_jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
]
}
],
"unplanned_jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
]
}
],
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
},
"total_count": 1
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}{
"code": "invalid_date",
"message": "date parameter is required"
}Retrieve every route scheduled for a specific date. Each route includes the assigned vehicle, depot, planned and unplanned jobs, and computed totals such as distance and duration. Use the
page and limit query parameters to paginate through large result sets.
Each route has two levels:
- The plan (the top-level object) holds the plan’s
status, depot, and totals across all vehicles. planned_routeshas one entry per vehicle, with that vehicle’sstatus,start_time,completion_time, time window, and itsplanned_jobsin delivery order (job_sequence,eta_time).
unplanned_jobs. The plan-level vehicle shows one of the plan’s vehicles; use planned_routes[].vehicle to see which vehicle drives which route. See Route status for what each status value means.Authorizations
Your Detrack API key, from Integrations > API Key in the dashboard.
Query Parameters
Route date (YYYY-MM-DD).
Example:
"2026-09-15"
Page number.
Records per page. The API doesn't cap it, but keep it to 100 or fewer.
List routes
curl --request GET \
--url https://app.detrack.com/api/v2/dn/routes \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.detrack.com/api/v2/dn/routes"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://app.detrack.com/api/v2/dn/routes', 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://app.detrack.com/api/v2/dn/routes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$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://app.detrack.com/api/v2/dn/routes"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.detrack.com/api/v2/dn/routes")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/routes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "69001c6de8ec5410e2570bb3",
"name": "sample_run",
"date": "2026-09-15",
"mode": "drive",
"status": "to_be_confirm",
"message": "<string>",
"vehicle": {},
"job_ids": [
"<string>"
],
"depot_location": {
"id": "68f0d416e8ec54cbf4a04dba",
"name": "Main Depot",
"address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Mandaluyong, 1550 Metro Manila",
"addr_1": "<string>",
"addr_2": "<string>",
"addr_3": "<string>",
"zip_code": "<string>",
"country": "<string>",
"city": "<string>",
"state": "<string>",
"country_id": "<string>",
"location": [
121.055626,
14.583941
],
"address_lat": 14.583941,
"address_lng": 121.055626
},
"end_depot_location": {
"id": "68f0d416e8ec54cbf4a04dba",
"name": "Main Depot",
"address": "SM Megamall, EDSA corner Doña Julia Vargas Ave, Mandaluyong, 1550 Metro Manila",
"addr_1": "<string>",
"addr_2": "<string>",
"addr_3": "<string>",
"zip_code": "<string>",
"country": "<string>",
"city": "<string>",
"state": "<string>",
"country_id": "<string>",
"location": [
121.055626,
14.583941
],
"address_lat": 14.583941,
"address_lng": 121.055626
},
"total_distance": 15107,
"total_time": 4373.497,
"total_planned": 3,
"total_unplanned": 0,
"type": "balanced",
"jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
],
"planned_routes": [
{
"id": "69001c6fe8ec5410e2570bc0",
"vrp_id": "69001c6de8ec5410e2570bb3",
"name": "1",
"date": "2026-09-15",
"status": "to_be_confirm",
"vehicle": {},
"time_window_from": "07:00",
"time_window_to": "23:50",
"start_time": "07:00",
"completion_time": "08:12",
"total_distance": 15107,
"total_time": 4373.497,
"total_planned": 3,
"total_unplanned": 0,
"planned_jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
],
"unplanned_jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
]
}
],
"unplanned_jobs": [
{
"id": "68e0bac7e8ec545357500616",
"type": "Delivery",
"status": "dispatched",
"do_number": "DO-10001",
"address": "Vicente Sotto St, CCP Complex, Pasay 1307",
"deliver_to_collect_from": "<string>",
"phone_number": "<string>",
"time_window_from": "09:00",
"time_window_to": "12:00",
"job_sequence": 1,
"eta_time": "07:05",
"run_number": "1",
"service_time": 10,
"geocoded_lat": 14.5542,
"geocoded_lng": 120.9839,
"has_latlng": true
}
]
}
],
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
},
"total_count": 1
}{
"code": "invalid_key",
"message": "Invalid key"
}{
"code": "forbidden"
}{
"code": "invalid_date",
"message": "date parameter is required"
}