---
title: List Depots
description: List Depots
url: /api/depots/listDepots
---

# List Depots

`GET /depots`

````yaml
openapi: 3.1.0
info:
  title: Spoke API
  version: v1
servers:
  - url: https://api.spoke.com/public/v1
security:
  - BasicAuth: []
paths:
  /depots:
    get:
      operationId: listDepots
      summary: List Depots
      tags:
        - Depots
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 255
          in: query
          name: pageToken
          required: false
          description: The page token to continue from.
        - schema:
            default: 20
            type: number
            minimum: 1
            maximum: 20
          in: query
          name: maxPageSize
          required: false
          description: The maximum number of depots to return.
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  depots:
                    type: array
                    items:
                      $ref: "#/components/schemas/depotSchema"
                    description: The depots.
                  nextPageToken:
                    description: The next page token.
                    type:
                      - "null"
                      - string
                required:
                  - depots
                  - nextPageToken
                definitions:
                  depotSchema:
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^depots\/[a-zA-Z0-9---_]{1,50}$
                        description: The depot id, in the format `depots/<id>`
                      name:
                        type: string
                        description: The name of the depot.
                      routeOverrides:
                        anyOf:
                          - type: object
                            properties:
                              startTime:
                                type: object
                                properties:
                                  hour:
                                    type: integer
                                    minimum: 0
                                    maximum: 23
                                    description: Hour of the day
                                  minute:
                                    type: integer
                                    minimum: 0
                                    maximum: 59
                                    description: Minute of the hour
                                required:
                                  - hour
                                  - minute
                                additionalProperties: false
                                description: Default route start time.
                              startAddress:
                                type: object
                                properties:
                                  address:
                                    description: The full address.
                                    type:
                                      - string
                                      - "null"
                                  addressLineOne:
                                    description: The first line of the address.
                                    type:
                                      - string
                                      - "null"
                                  addressLineTwo:
                                    description: The second line of the address.
                                    type:
                                      - string
                                      - "null"
                                  latitude:
                                    description: Latitude coordinate of the depot in decimal degrees.
                                    type:
                                      - number
                                      - "null"
                                  longitude:
                                    description: Longitude coordinate of the depot in decimal degrees.
                                    type:
                                      - number
                                      - "null"
                                  placeId:
                                    description: A Google PlaceID identifying the location of the depot.
                                    type:
                                      - string
                                      - "null"
                                  countryCode:
                                    description: The country code of the address.
                                    type:
                                      - string
                                      - "null"
                                required:
                                  - address
                                  - addressLineOne
                                  - addressLineTwo
                                  - latitude
                                  - longitude
                                  - placeId
                                  - countryCode
                                description: The default start address for routes originating from this depot.
                              defaultTimeAtStop:
                                description: Estimated time at stop in seconds.
                                type:
                                  - number
                                  - "null"
                              endAddress:
                                anyOf:
                                  - type: object
                                    properties:
                                      address:
                                        description: The full address.
                                        type:
                                          - string
                                          - "null"
                                      addressLineOne:
                                        description: The first line of the address.
                                        type:
                                          - string
                                          - "null"
                                      addressLineTwo:
                                        description: The second line of the address.
                                        type:
                                          - string
                                          - "null"
                                      latitude:
                                        description: Latitude coordinate of the depot in decimal degrees.
                                        type:
                                          - number
                                          - "null"
                                      longitude:
                                        description: Longitude coordinate of the depot in decimal degrees.
                                        type:
                                          - number
                                          - "null"
                                      placeId:
                                        description: A Google PlaceID identifying the location of the depot.
                                        type:
                                          - string
                                          - "null"
                                      countryCode:
                                        description: The country code of the address.
                                        type:
                                          - string
                                          - "null"
                                    required:
                                      - address
                                      - addressLineOne
                                      - addressLineTwo
                                      - latitude
                                      - longitude
                                      - placeId
                                      - countryCode
                                    description: The default end address for routes originating from this depot (if empty, assume a round-trip).
                                  - type: "null"
                              endTime:
                                anyOf:
                                  - type: object
                                    properties:
                                      hour:
                                        type: integer
                                        minimum: 0
                                        maximum: 23
                                        description: Hour of the day
                                      minute:
                                        type: integer
                                        minimum: 0
                                        maximum: 59
                                        description: Minute of the hour
                                    required:
                                      - hour
                                      - minute
                                    additionalProperties: false
                                    description: Default route end time.
                                  - type: "null"
                              maxStops:
                                description: Max stops assigned to each driver
                                type:
                                  - number
                                  - "null"
                              roadSide:
                                anyOf:
                                  - type: string
                                    enum:
                                      - any
                                      - left_only
                                      - right_only
                                  - type: "null"
                                description: The side of the road drivers should stop at.
                              vehicleType:
                                anyOf:
                                  - type: string
                                    enum:
                                      - bike
                                      - scooter
                                      - car
                                      - small_truck
                                      - truck
                                      - electric_cargo_bike
                                  - type: "null"
                                description: Default vehicle type for new routes from this depot.
                              roundTrip:
                                description: Return to start address at end of route
                                type:
                                  - boolean
                                  - "null"
                            required:
                              - startTime
                              - startAddress
                          - type: "null"
                    required:
                      - id
                      - name
                      - routeOverrides
                    additionalProperties: false
                    description: A depot.
                description: Success
        "400":
          description: Query parameters are invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Query parameters are invalid
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: Unauthorized
        "500":
          description: An internal server error occurred
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: An internal server error occurred
        default:
          description: The default error model
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: The error message.
                  code:
                    type: string
                    description: The error code.
                  param:
                    type: string
                    description: The parameter that caused the error.
                  url:
                    type: string
                    description: The URL with more information about the error.
                required:
                  - message
                description: The default error model
components:
  schemas:
    depotIdSchema:
      type: string
      pattern: ^depots\/[a-zA-Z0-9---_]{1,50}$
    depotSchema:
      type: object
      properties:
        id:
          allOf:
            - $ref: "#/components/schemas/depotIdSchema"
          description: The depot id, in the format `depots/<id>`
        name:
          type: string
          description: The name of the depot.
        routeOverrides:
          anyOf:
            - type: object
              properties:
                startTime:
                  type: object
                  properties:
                    hour:
                      type: integer
                      minimum: 0
                      maximum: 23
                      description: Hour of the day
                    minute:
                      type: integer
                      minimum: 0
                      maximum: 59
                      description: Minute of the hour
                  required:
                    - hour
                    - minute
                  additionalProperties: false
                  description: Default route start time.
                startAddress:
                  type: object
                  properties:
                    address:
                      description: The full address.
                      type:
                        - string
                        - "null"
                    addressLineOne:
                      description: The first line of the address.
                      type:
                        - string
                        - "null"
                    addressLineTwo:
                      description: The second line of the address.
                      type:
                        - string
                        - "null"
                    latitude:
                      description: Latitude coordinate of the depot in decimal degrees.
                      type:
                        - number
                        - "null"
                    longitude:
                      description: Longitude coordinate of the depot in decimal degrees.
                      type:
                        - number
                        - "null"
                    placeId:
                      description: A Google PlaceID identifying the location of the depot.
                      type:
                        - string
                        - "null"
                    countryCode:
                      description: The country code of the address.
                      type:
                        - string
                        - "null"
                  required:
                    - address
                    - addressLineOne
                    - addressLineTwo
                    - latitude
                    - longitude
                    - placeId
                    - countryCode
                  description: The default start address for routes originating from this depot.
                defaultTimeAtStop:
                  description: Estimated time at stop in seconds.
                  type:
                    - number
                    - "null"
                endAddress:
                  anyOf:
                    - type: object
                      properties:
                        address:
                          description: The full address.
                          type:
                            - string
                            - "null"
                        addressLineOne:
                          description: The first line of the address.
                          type:
                            - string
                            - "null"
                        addressLineTwo:
                          description: The second line of the address.
                          type:
                            - string
                            - "null"
                        latitude:
                          description: Latitude coordinate of the depot in decimal degrees.
                          type:
                            - number
                            - "null"
                        longitude:
                          description: Longitude coordinate of the depot in decimal degrees.
                          type:
                            - number
                            - "null"
                        placeId:
                          description: A Google PlaceID identifying the location of the depot.
                          type:
                            - string
                            - "null"
                        countryCode:
                          description: The country code of the address.
                          type:
                            - string
                            - "null"
                      required:
                        - address
                        - addressLineOne
                        - addressLineTwo
                        - latitude
                        - longitude
                        - placeId
                        - countryCode
                      description: The default end address for routes originating from this depot (if empty, assume a round-trip).
                    - type: "null"
                endTime:
                  anyOf:
                    - type: object
                      properties:
                        hour:
                          type: integer
                          minimum: 0
                          maximum: 23
                          description: Hour of the day
                        minute:
                          type: integer
                          minimum: 0
                          maximum: 59
                          description: Minute of the hour
                      required:
                        - hour
                        - minute
                      additionalProperties: false
                      description: Default route end time.
                    - type: "null"
                maxStops:
                  description: Max stops assigned to each driver
                  type:
                    - number
                    - "null"
                roadSide:
                  anyOf:
                    - type: string
                      enum:
                        - any
                        - left_only
                        - right_only
                    - type: "null"
                  description: The side of the road drivers should stop at.
                vehicleType:
                  anyOf:
                    - type: string
                      enum:
                        - bike
                        - scooter
                        - car
                        - small_truck
                        - truck
                        - electric_cargo_bike
                    - type: "null"
                  description: Default vehicle type for new routes from this depot.
                roundTrip:
                  description: Return to start address at end of route
                  type:
                    - boolean
                    - "null"
              required:
                - startTime
                - startAddress
            - type: "null"
      required:
        - id
        - name
        - routeOverrides
      additionalProperties: false
      description: A depot.
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: Use the API key as the username and leave the password empty.
````