Skip to main content
GET
/
v1
/
routes
/
{id}
Get Route
curl --request GET \
  --url https://api.sandbox.usenash.com/v1/routes/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "rte_JphRWDiEosGpXuxwgaYfY3",
  "portalUrl": "https://portal.usenash.com/routes/rte_JphRWDiEosGpXuxwgaYfY3",
  "type": "SINGLE_PICKUP_MULTIPLE_DROPOFFS",
  "stops": [
    {
      "stopType": "PICKUP",
      "objectIds": [
        "ord_Qr5bVt8WiByGh66z2g7xEu",
        "ord_WJFuooSiRvFCaceGZjpbqs"
      ],
      "location": {
        "lat": 45.558214,
        "lng": -122.587074
      },
      "arrivalTime": "2025-04-25T03:27:00",
      "departTime": "2025-04-25T03:30:00",
      "serviceTime": 360,
      "distanceFromPrevious": 3376,
      "durationFromPrevious": 420,
      "status": "PENDING",
      "statusHistory": [
        {
          "created_at": "2025-04-25T03:00:00Z",
          "status": "PENDING"
        },
        {
          "created_at": "2025-04-25T03:15:00Z",
          "status": "ENROUTE"
        }
      ]
    }
  ],
  "externalId": "rte_JphRWDiEosGpXuxwgaYfY3",
  "name": "Route 1",
  "courierId": "cou_1234567890abcdef12345678",
  "vehicleId": "vhc_1234567890abcdef12345678",
  "shiftId": "shf_1234567890abcdef12345678",
  "jobId": "job_1234567890abcdef12345678",
  "routeMetadata": {
    "priority": "high",
    "source": "optimization_engine"
  },
  "validationErrors": {
    "order_123": "Order 123 has pickup but no dropoff"
  },
  "status": "CREATED",
  "statusHistory": [
    {
      "created_at": "2025-04-25T03:00:00Z",
      "status": "CREATED"
    },
    {
      "created_at": "2025-04-25T03:10:00Z",
      "status": "ASSIGNED"
    },
    {
      "created_at": "2025-04-25T03:15:00Z",
      "status": "STARTED"
    }
  ]
}
A Route object represents a planned sequence of stops for a vehicle or delivery agent. The core of the Route is the stops array, which lists the specific locations to visit in order. Each stop within this array details:
  • The actions to be performed (like stopType).
  • Associated items (objectIds).
  • Timing estimates (arrivalTime, departTime, serviceTime).
  • Travel details from the prior stop (distanceFromPrevious, durationFromPrevious).
  • The physical coordinates (location).

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Route ID

Response

OK

Represents a planned sequence of stops for a delivery or batch.

id
string
required

Unique identifier for the route.

Example:

"rte_JphRWDiEosGpXuxwgaYfY3"

portalUrl
string
required

Portal URL of the route.

Example:

"https://portal.usenash.com/routes/rte_JphRWDiEosGpXuxwgaYfY3"

type
string
required

Type of the route, indicating the pickup/dropoff structure.

Example:

"SINGLE_PICKUP_MULTIPLE_DROPOFFS"

stops
RouteStopSerializer · object[]
required

Ordered list of stops included in the route.

externalId
string | null

External Route ID.

Example:

"rte_JphRWDiEosGpXuxwgaYfY3"

name
string | null

Name of the route.

Example:

"Route 1"

courierId
string | null

Courier ID of the driver assigned to the route.

Example:

"cou_1234567890abcdef12345678"

vehicleId
string | null

Vehicle ID of the vehicle assigned to the route.

Example:

"vhc_1234567890abcdef12345678"

shiftId
string | null

Shift ID of the shift assigned to the route.

Example:

"shf_1234567890abcdef12345678"

jobId
string | null

Dispatched Job ID of this route

Example:

"job_1234567890abcdef12345678"

routeMetadata
Routemetadata · object

Additional metadata for the route.

Example:
{
"priority": "high",
"source": "optimization_engine"
}
validationErrors
Validationerrors · object

Validation errors for the route.

Example:
{
"order_123": "Order 123 has pickup but no dropoff"
}
status
string | null

Current status of the route.

Example:

"CREATED"

statusHistory
Statushistory · object[] | null

History of status changes for the route.

Example:
[
{
"created_at": "2025-04-25T03:00:00Z",
"status": "CREATED"
},
{
"created_at": "2025-04-25T03:10:00Z",
"status": "ASSIGNED"
},
{
"created_at": "2025-04-25T03:15:00Z",
"status": "STARTED"
}
]