List/Search Routes
curl --request GET \
--url https://api.sandbox.usenash.com/v1/routes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/routes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.usenash.com/v1/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://api.sandbox.usenash.com/v1/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 => [
"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://api.sandbox.usenash.com/v1/routes"
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://api.sandbox.usenash.com/v1/routes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/routes")
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{
"results": [
{
"id": "<string>",
"externalId": "<string>",
"name": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"portalUrl": "<string>",
"providerName": "<string>",
"courier": {
"id": "<string>",
"name": "<string>"
},
"vehicle": {
"id": "<string>",
"name": "<string>"
},
"stopCount": 123,
"orderIds": [
"<string>"
],
"distanceMeters": 123,
"durationSeconds": 123
}
],
"totalCount": 123,
"limit": 123,
"offset": 123
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]List Routes
List and search routes with filters and pagination.
GET
/
v1
/
routes
List/Search Routes
curl --request GET \
--url https://api.sandbox.usenash.com/v1/routes \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.usenash.com/v1/routes"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.usenash.com/v1/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://api.sandbox.usenash.com/v1/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 => [
"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://api.sandbox.usenash.com/v1/routes"
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://api.sandbox.usenash.com/v1/routes")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.usenash.com/v1/routes")
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{
"results": [
{
"id": "<string>",
"externalId": "<string>",
"name": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"portalUrl": "<string>",
"providerName": "<string>",
"courier": {
"id": "<string>",
"name": "<string>"
},
"vehicle": {
"id": "<string>",
"name": "<string>"
},
"stopCount": 123,
"orderIds": [
"<string>"
],
"distanceMeters": 123,
"durationSeconds": 123
}
],
"totalCount": 123,
"limit": 123,
"offset": 123
}[
{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"response_status": "<string>",
"RequestID": "<string>"
}
]Use this to find routes — by date, status, driver, or free-text search — when you have no route ID to start from. The payload is deliberately slim: enough to identify a route and show it in a list, not the whole plan. Read Get Route once you know which one you want.
startDate defaults to 30 days ago, so a call with no date range returns the recent past rather than everything you have ever run.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Required range:
1 <= x <= 100Example:
25
Required range:
x >= 0Example:
0
ASC or DESC, applied to created_at
Defaults to 30 days ago.
Defaults to now.
Comma-separated order tags; matches routes with an order carrying any of them
Free-form search
Filter by dispatched state
Comma-separated
Comma-separated
Comma-separated
Comma-separated pickup/dropoff cities
Comma-separated pickup/dropoff states
Comma-separated pickup/dropoff countries
Was this page helpful?