Retrieve routes for a specific plan.
Rate limit: 10 requests/sec (learn more about rate limits here).
To use this endpoint, select Read Routes under the Driver Workflow category when creating or editing an API token. Learn More.
Submit Feedback: Likes, dislikes, and API feature requests should be filed as feedback in our API feedback form. If you encountered an issue or noticed inaccuracies in the API documentation, please submit a case to our support team.
curl --request GET \
--url https://api.samsara.com/hub/plan/routes \
--header 'Authorization: Bearer <token>'{
"data": [
{
"cost": 125.5,
"createdAt": "2024-04-10T10:30:00Z",
"distanceMeters": 15420,
"durationSeconds": 3600,
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"id": "950e8400-e29b-41d4-a716-446655440005",
"isEdited": false,
"isPinned": false,
"name": "Route 1",
"orgLocationTimezone": "America/Los_Angeles",
"planId": "850e8400-e29b-41d4-a716-446655440003",
"scheduledRouteEndTime": "2019-06-13T19:08:25Z",
"scheduledRouteStartTime": "2024-04-10T08:00:00Z",
"stops": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"name": "Stop 1",
"scheduledArrivalTime": "2024-04-10T09:00:00Z",
"scheduledDepartureTime": "2024-04-10T09:30:00Z",
"hubLocationId": "d4e5f6a7-b8c9-0123-defa-456789012345",
"notes": "",
"orders": [
{
"id": "e5f6a7b8-c9d0-1234-efab-567890123456",
"type": "pickup",
"customProperties": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"name": "CustomerType",
"value": "Premium"
}
],
"customerLocationId": "LOC-12345",
"quantities": [
{
"capacityId": "f1e2d3c4-b5a6-9870-fedc-ba0987654321",
"quantity": 750
}
],
"requiredSkills": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Forklift Operation"
}
],
"serviceWindow": "9:00AM - 5:00PM"
}
],
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459
}
}
],
"type": "dynamic",
"updatedAt": "2024-04-10T10:30:00Z",
"dispatchRouteId": "123456",
"driver": {
"id": "12345",
"name": "Driver Bob"
},
"quantities": [
{
"capacityId": "f1e2d3c4-b5a6-9870-fedc-ba0987654321",
"quantity": 750
}
],
"vehicle": {
"id": "67890",
"name": "Fleet Truck #1"
}
}
],
"pagination": {
"hasNextPage": false,
"endCursor": "YXJyYXljb25uZWN0aW9uOjEwMA=="
}
}Documentation Index
Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The plan identifier
Comma-separated list of route IDs for filtering.
Time filter of when the route was updated, in RFC 3339 format
Time filter of when the route was updated, in RFC 3339 format
If specified, should be the endCursor from the previous page of results. When present, this request will return the next page of results that occur immediately after the previous page of results.
Maximum number of objects to return. Default and maximum is 100
x <= 100curl --request GET \
--url https://api.samsara.com/hub/plan/routes \
--header 'Authorization: Bearer <token>'{
"data": [
{
"cost": 125.5,
"createdAt": "2024-04-10T10:30:00Z",
"distanceMeters": 15420,
"durationSeconds": 3600,
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"id": "950e8400-e29b-41d4-a716-446655440005",
"isEdited": false,
"isPinned": false,
"name": "Route 1",
"orgLocationTimezone": "America/Los_Angeles",
"planId": "850e8400-e29b-41d4-a716-446655440003",
"scheduledRouteEndTime": "2019-06-13T19:08:25Z",
"scheduledRouteStartTime": "2024-04-10T08:00:00Z",
"stops": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"name": "Stop 1",
"scheduledArrivalTime": "2024-04-10T09:00:00Z",
"scheduledDepartureTime": "2024-04-10T09:30:00Z",
"hubLocationId": "d4e5f6a7-b8c9-0123-defa-456789012345",
"notes": "",
"orders": [
{
"id": "e5f6a7b8-c9d0-1234-efab-567890123456",
"type": "pickup",
"customProperties": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"name": "CustomerType",
"value": "Premium"
}
],
"customerLocationId": "LOC-12345",
"quantities": [
{
"capacityId": "f1e2d3c4-b5a6-9870-fedc-ba0987654321",
"quantity": 750
}
],
"requiredSkills": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Forklift Operation"
}
],
"serviceWindow": "9:00AM - 5:00PM"
}
],
"singleUseLocation": {
"address": "1234 Main St, San Jose, CA",
"latitude": 123.456,
"longitude": 37.459
}
}
],
"type": "dynamic",
"updatedAt": "2024-04-10T10:30:00Z",
"dispatchRouteId": "123456",
"driver": {
"id": "12345",
"name": "Driver Bob"
},
"quantities": [
{
"capacityId": "f1e2d3c4-b5a6-9870-fedc-ba0987654321",
"quantity": 750
}
],
"vehicle": {
"id": "67890",
"name": "Fleet Truck #1"
}
}
],
"pagination": {
"hasNextPage": false,
"endCursor": "YXJyYXljb25uZWN0aW9uOjEwMA=="
}
}