Routes
Retrieve a route
GET /dn/routes/ looks up route plans by name. Returns matching plans newest first, each with its per-vehicle planned routes.
GET
/
dn
/
routes
/
{name}
Retrieve a route
curl --request GET \
--url https://app.detrack.com/api/v2/dn/routes/{name} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.detrack.com/api/v2/dn/routes/{name}"
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/{name}', 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/{name}",
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/{name}"
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/{name}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/routes/{name}")
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": "not_found",
"message": "Route not found"
}{
"code": "argument_error",
"message": "..."
}Fetch a route plan by its
Each route has two levels:
name. The name goes in the URL path. The lookup matches on name across all dates and returns matches newest first, so the first result is the most recent plan with that name. Results are paginated and use the same data array shape as List routes.
This endpoint doesn’t filter by date. If you reuse a route name on different days, check each result’s
date, or use List routes with the date parameter.- 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.
Path Parameters
Exact name of the route plan, URL-encoded.
Example:
"sample_run"
Query Parameters
Page number.
Records per page. The API doesn't cap it, but keep it to 100 or fewer.
Retrieve a route
curl --request GET \
--url https://app.detrack.com/api/v2/dn/routes/{name} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://app.detrack.com/api/v2/dn/routes/{name}"
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/{name}', 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/{name}",
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/{name}"
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/{name}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.detrack.com/api/v2/dn/routes/{name}")
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": "not_found",
"message": "Route not found"
}{
"code": "argument_error",
"message": "..."
}