---
title: "Fetch all routes"
method: GET
path: "/fleet/routes"
tags: ["Routes"]
---

# Fetch all routes

`GET /fleet/routes`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/routes`
- Auth: HTTP bearer

Returns multiple routes. The legacy version of this endpoint can be found at [samsara.com/api-legacy](https://www.samsara.com/api-legacy#operation/fetchAllDispatchRoutes).

 <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Read Routes** under the Driver Workflow category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Query parameters

- `startTime` string, required
- `endTime` string, required
- `limit` integer
- `after` string
- `include` string[]
- `tagIds` string
- `parentTagIds` string

## Response `200`

OK response.

- RoutesFetchRoutesResponseBody
  - `data` BaseRouteWithOrdersResponseObjectResponseBody[], required: An array containing multiple routes.
    - `actualRouteEndTime` string, date-time: Actual end time, if it exists, for the route in RFC 3339 format.
    - `actualRouteStartTime` string, date-time: Actual start time, if it exists, for the route in RFC 3339 format.
    - `driver` GoaDriverTinyResponseResponseBody: A minified driver object. This object is only returned if the route is assigned to the driver.
      - `externalIds` object: A map of external ids
      - `id` string, required: ID of the driver
      - `name` string: Name of the driver
    - `externalIds` object: A map of external ids
    - `id` string, required: ID of the route
    - `name` string: Route name
    - `notes` string: Notes for the route
    - `orgLocalTimezone` string: The local timezone, as defined in Settings for your organization. Timezones use [IANA timezone database](https://www.iana.org/time-zones) keys (e.g. `America/Los_Angeles`, `America/New_York`, `Europe/London`, etc.). You can find a mapping of common timezone formats to IANA timezone keys [here](https://unicode.org/cldr/charts/latest/supplemental/zone_tzid.html).
    - `recurringRouteLiveSharingLinks` LiveSharingLinkResponseObjectResponseBody[]: List of shareable, non-expired 'By recurring Route' Live Sharing Links.
      - `expiresAtTime` string: Date that this link expires, in RFC 3339 format.
      - `liveSharingUrl` string, required: The shareable URL of the vehicle's location.
      - `name` string, required: Name of the Live Sharing Link.
    - `scheduledRouteEndTime` string, date-time: Scheduled end time, if it exists, for the route in RFC 3339 format.
    - `scheduledRouteStartTime` string, date-time: Scheduled start time, if it exists, for the route in RFC 3339 format.
    - `settings` RouteSettingsResponseBody: An optional dictionary, only necessary to override the defaults for route start and end conditions.
      - `routeCompletionCondition` 'arriveLastStop' | 'departLastStop': Defaults to 'arriveLastStop' which ends the route upon arriving at the final stop. The condition 'departLastStop' ends the route upon departing the last stop. If 'arriveLastStop' is set, then the departure time of the final stop should not be set. Valid values: `arriveLastStop`, `departLastStop`
      - `routeStartingCondition` 'departFirstStop' | 'arriveFirstStop': Defaults to 'departFirstStop' which starts the route upon departing the first stop in the route. The condition 'arriveFirstStop' starts the route upon arriving at the first stop in the route. If 'departFirstStop' is set, the arrival time of the first stop should not be set. Valid values: `departFirstStop`, `arriveFirstStop`
      - `sequencingMethod` 'unknown' | 'scheduledArrivalTime' | 'manual': Determines how stops are sequenced on the route. 'scheduledArrivalTime' sequences stops by their scheduled arrival times (default). 'manual' allows custom sequencing via stop.sequenceNumber. 'unknown' indicates the method is not specified. Valid values: `unknown`, `scheduledArrivalTime`, `manual`
    - `stops` RouteStopWithOrdersResponseObjectResponseBody[]: List of stops along the route
      - `actualArrivalTime` string, date-time: Actual arrival time, if it exists, for the route stop in RFC 3339 format.
      - `actualDepartureTime` string, date-time: Actual departure time, if it exists, for the route stop in RFC 3339 format.
      - `actualDistanceMeters` integer: Actual GPS-measured distance traveled from the previous stop's departure to this stop's arrival, in meters. Null for the first stop, skipped stops, or if GPS data is unavailable.
      - `address` GoaAddressTinyResponseResponseBody: A minified Address object
        - `externalIds` object: A map of external ids
        - `id` string, required: Id of the address
        - `name` string, required: Name of the address
      - `appointmentWindows` RouteStopAppointmentWindowResponseBody[]: Appointment windows for the stop.
        - `endTime` string, required: The end time of the appointment window for the stop in RFC 3339 format.
        - `startTime` string, required: The start time of the appointment window for the stop in RFC 3339 format.
      - `documents` GoaDocumentTinyResponseResponseBody[]: List of documents associated with the stop.
        - `id` string, required: Id of the document
        - `name` string: Name of the document
      - `enRouteTime` string, date-time: The time the stop became en-route, in RFC 3339 format.
      - `eta` string, date-time: Estimated time of arrival, if this stop is currently en-route, in RFC 3339 format.
      - `externalIds` object: A map of external ids
      - `forms` RouteStopFormResponseObjectResponseBody[]: List of forms associated with the stop.
        - `formTemplateId` string, uuid: ID of the form template.
        - `id` string, required: ID of the form submission.
        - `isRequired` boolean: Whether the driver must complete the form before departing the stop.
      - `id` string, required: Id of the stop
      - `issues` GoaIssueTinyResponseResponseBody[]: List of issues associated with the stop.
        - `id` string, required: ID of the issue
      - `liveSharingUrl` string: The shareable url of the stop's current status.
      - `locationLiveSharingLinks` LiveSharingLinkResponseObjectResponseBody[]: List of shareable, non-expired 'By Location' Live Sharing Links.
        - `expiresAtTime` string: Date that this link expires, in RFC 3339 format.
        - `liveSharingUrl` string, required: The shareable URL of the vehicle's location.
        - `name` string, required: Name of the Live Sharing Link.
      - `name` string, required: Name of the stop
      - `notes` string: Notes for the stop
      - `ontimeWindowAfterArrivalMs` integer: Specifies the time window (in milliseconds) after a stop's scheduled arrival time during which the stop is considered 'on-time'.
      - `ontimeWindowBeforeArrivalMs` integer: Specifies the time window (in milliseconds) before a stop's scheduled arrival time during which the stop is considered 'on-time'.
      - `orders` RouteStopOrderTaskReferenceObjectResponseBody[], required: Canonical order tasks attached to this stop.
        - `id` string, required: Samsara-generated canonical order UUID.
        - `taskId` string, required: Order task ID attached to this stop.
      - `plannedDistanceMeters` integer: Planned driving distance from the previous stop in meters. Based on routing calculations at route creation time. Null for the first stop or if routing data is unavailable.
      - `scheduledArrivalTime` string, date-time: Scheduled arrival time, if it exists, for the stop in RFC 3339 format.
      - `scheduledDepartureTime` string, date-time: Scheduled departure time, if it exists, for the stop in RFC 3339 format.
      - `sequenceNumber` integer: Manual sequence position of this stop. Only used when route.settings.sequencingMethod=manual.
      - `singleUseLocation` RoutesSingleUseAddressObjectResponseBody: This field is used to indicate stops along the route for which an address has not been persisted. This field is mutually exclusive with addressId.
        - `address` string: Address of the stop.
        - `latitude` number, double, required: The latitude of the location
        - `longitude` number, double, required: The longitude of the location
        - `radiusMeters` number: The radius in meters for the geofence around this location. Must be a positive value.
      - `skippedTime` string, date-time: Skipped time, if it exists, for the route stop in RFC 3339 format.
      - `state` 'unassigned' | 'scheduled' | 'en route' | 'skipped' | 'arrived' | 'departed', required: The current state of the route stop. Valid values: `unassigned`, `scheduled`, `en route`, `skipped`, `arrived`, `departed`
    - `tagIds` string[]: An array of IDs of tags to associate with this route.
    - `vehicle` GoaVehicleTinyResponseResponseBody: A minified vehicle object. This object is only returned if the route is assigned to the vehicle.
      - `externalIds` object: A map of external ids
      - `id` string: ID of the vehicle
      - `name` string: Name of the vehicle
  - `pagination` GoaPaginationResponseResponseBody, required: Pagination parameters.
    - `endCursor` string, required: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'after' query parameter. This may be an empty string if there are no more pages left to view.
    - `hasNextPage` boolean, required: True if there are more pages of results immediately available after this endCursor.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
