---
title: "List Depots"
method: GET
path: "/depots"
tags: ["Depots"]
---

# List Depots

`GET /depots`

## Request

- Base URL: `https://api.spoke.com/public/v1`
- URL: `https://api.spoke.com/public/v1/depots`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/spoke/apis/spoke-api/docs/depots/get.ts> (a function with typed inputs; its response is checked against the schema)

## Query parameters

- `pageToken` string
- `maxPageSize` number

## Response `200`

Success

- object: Success
  - `depots` DepotSchema[], required: The depots.
    - `id` string, required
    - `name` string, required: The name of the depot.
    - `routeOverrides` object, nullable, required
      - `startTime` object, required: Default route start time.
        - `hour` integer, required: Hour of the day
        - `minute` integer, required: Minute of the hour
      - `startAddress` object, required: The default start address for routes originating from this depot.
        - `address` string, nullable, required: The full address.
        - `addressLineOne` string, nullable, required: The first line of the address.
        - `addressLineTwo` string, nullable, required: The second line of the address.
        - `latitude` number, nullable, required: Latitude coordinate of the depot in decimal degrees.
        - `longitude` number, nullable, required: Longitude coordinate of the depot in decimal degrees.
        - `placeId` string, nullable, required: A Google PlaceID identifying the location of the depot.
        - `countryCode` string, nullable, required: The country code of the address.
      - `defaultTimeAtStop` number, nullable: Estimated time at stop in seconds.
      - `endAddress` object, nullable: The default end address for routes originating from this depot (if empty, assume a round-trip).
        - `address` string, nullable, required: The full address.
        - `addressLineOne` string, nullable, required: The first line of the address.
        - `addressLineTwo` string, nullable, required: The second line of the address.
        - `latitude` number, nullable, required: Latitude coordinate of the depot in decimal degrees.
        - `longitude` number, nullable, required: Longitude coordinate of the depot in decimal degrees.
        - `placeId` string, nullable, required: A Google PlaceID identifying the location of the depot.
        - `countryCode` string, nullable, required: The country code of the address.
      - `endTime` object, nullable: Default route end time.
        - `hour` integer, required: Hour of the day
        - `minute` integer, required: Minute of the hour
      - `maxStops` number, nullable: Max stops assigned to each driver
      - `roadSide` 'any' | 'left_only' | 'right_only', nullable: The side of the road drivers should stop at.
      - `vehicleType` 'bike' | 'scooter' | 'car' | 'small_truck' | 'truck' | 'electric_cargo_bike', nullable: Default vehicle type for new routes from this depot.
      - `roundTrip` boolean, nullable: Return to start address at end of route
  - `nextPageToken` string, nullable, required: The next page token.

## Other responses

- `400`: Query parameters are invalid
- `401`: Unauthorized
- `500`: An internal server error occurred
- `default`: The default error model

---

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