latestOpenAPI 3.1.02026-07-2296226496.3 KB
09a23a95889b
Route
Get Route
Retrieve a route by ID, including its stops, travel metrics, and associated orders.
get/v1/routes/{id}
Path parameters
idstring required
Route ID
Route ID
Response
OK
Example response
{
"id": "rte_JphRWDiEosGpXuxwgaYfY3",
"externalId": "rte_JphRWDiEosGpXuxwgaYfY3",
"portalUrl": "https://portal.usenash.com/routes/rte_JphRWDiEosGpXuxwgaYfY3",
"name": "Route 1",
"type": "SINGLE_PICKUP_MULTIPLE_DROPOFFS",
"courierId": "cor_9dK2mNp7xVt3RfWzY8sLbQ",
"vehicleId": "veh_4hL8pXq2sVn6RtY3wCbD9M",
"shiftId": "shf_1234567890abcdef12345678",
"stops": [
{
"stopType": "PICKUP",
"objectIds": [
"ord_Qr5bVt8WiByGh66z2g7xEu",
"ord_WJFuooSiRvFCaceGZjpbqs"
],
"arrivalTime": "2025-04-25T03:27:00",
"departTime": "2025-04-25T03:30:00",
"plannedArrivalTime": "2025-04-25T03:27:00",
"serviceTime": 360,
"distanceFromPrevious": 3376,
"durationFromPrevious": 420,
"location": {
"lat": 45.558214,
"lng": -122.587074
},
"status": "PENDING",
"statusDescription": "leave_unattended",
"statusHistory": [
{
"created_at": "2025-04-25T03:00:00Z",
"status": "PENDING"
},
{
"created_at": "2025-04-25T03:15:00Z",
"status": "ENROUTE"
},
{
"created_at": "2025-04-25T03:20:00Z",
"status": "COMPLETED",
"status_description": "leave_unattended"
}
],
"startedAt": "2025-04-25T03:27:00Z",
"orders": [
{
"id": "ord_Qr5bVt8WiByGh66z2g7xEu",
"orderItems": [
{
"id": "item-001",
"status": "delivered",
"statusMetadata": {
"failureLocation": "dropoff"
},
"statusHistory": [
{
"status": "picked",
"createdAt": "2025-04-25T03:20:00"
}
]
}
]
}
]
}
],
"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"
}
]
}