---
title: Retrieve a driver
description: Retrieve a driver
url: /api/v0.2b/drivers/getDriver
---

# Retrieve a driver

`GET /drivers/{driverId}`

````yaml
openapi: 3.1.0
info:
  title: Spoke API
  version: v0.2b
servers:
  - url: https://api.spoke.com/public/v0.2b
security:
  - BasicAuth: []
paths:
  /drivers/{driverId}:
    get:
      operationId: getDriver
      summary: Retrieve a driver
      tags:
        - Drivers
      parameters:
        - schema:
            type: string
            pattern: ^[a-zA-Z0-9---_]{1,50}$
          in: path
          name: driverId
          required: true
          description: The driver id
      responses:
        "200":
          description: The requested driver
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/driverSchema"
                description: The requested driver
        "400":
          description: ID format is 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: ID format is invalid
                title: The request is 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
        "404":
          description: The provided driver id does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    anyOf:
                      - type: string
                        enum:
                          - Driver not found
                      - type: string
                required:
                  - message
                description: The provided driver id does not exist
                title: Driver not found
        "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}$
    driverIdSchema:
      type: string
      pattern: ^drivers\/[a-zA-Z0-9---_]{1,50}$
    driverSchema:
      type: object
      properties:
        id:
          allOf:
            - $ref: "#/components/schemas/driverIdSchema"
          description: The driver id, in the format `drivers/<id>`
        name:
          description: The name of the driver.
          type:
            - "null"
            - string
        email:
          description: The email of the driver.
          type:
            - "null"
            - string
        phone:
          description: The phone number of the driver.
          type:
            - "null"
            - string
        displayName:
          description: The display name of the driver.
          type:
            - "null"
            - string
        active:
          type: boolean
          description: Whether the driver membership is active or paused. Paused drivers will not be assigned to any routes.
        depots:
          type: array
          items:
            $ref: "#/components/schemas/depotIdSchema"
          description: Depots associated with the driver.
        routeOverrides:
          type: object
          properties:
            startTime:
              anyOf:
                - $ref: "#/components/schemas/timeOfDaySchema"
                - type: "null"
              description: Driver's start time.
            endTime:
              anyOf:
                - $ref: "#/components/schemas/timeOfDaySchema"
                - type: "null"
              description: Driver's end time.
            startAddress:
              anyOf:
                - type: object
                  properties:
                    address:
                      type: string
                      description: The address of the stop.
                    addressLineOne:
                      type: string
                      description: The first line of the address.
                    addressLineTwo:
                      type: string
                      description: The second line of the address.
                    latitude:
                      anyOf:
                        - type: number
                          minimum: -90
                          maximum: 90
                        - type: "null"
                      description: The latitude of the address in decimal degrees.
                    longitude:
                      anyOf:
                        - type: number
                          minimum: -180
                          maximum: 180
                        - type: "null"
                      description: The longitude of the address in decimal degrees.
                    placeId:
                      description: The identifier of the place corresponding to this stop on Google Places
                      type:
                        - string
                        - "null"
                    placeTypes:
                      type: array
                      items:
                        type: string
                      description: Array of strings that is provided by the Google AutoCompleteAPI
                  required:
                    - address
                    - addressLineOne
                    - addressLineTwo
                    - latitude
                    - longitude
                    - placeId
                    - placeTypes
                  additionalProperties: false
                  description: The address of the stop.
                - type: "null"
              description: Driver's start location.
            endAddress:
              anyOf:
                - type: object
                  properties:
                    address:
                      type: string
                      description: The address of the stop.
                    addressLineOne:
                      type: string
                      description: The first line of the address.
                    addressLineTwo:
                      type: string
                      description: The second line of the address.
                    latitude:
                      anyOf:
                        - type: number
                          minimum: -90
                          maximum: 90
                        - type: "null"
                      description: The latitude of the address in decimal degrees.
                    longitude:
                      anyOf:
                        - type: number
                          minimum: -180
                          maximum: 180
                        - type: "null"
                      description: The longitude of the address in decimal degrees.
                    placeId:
                      description: The identifier of the place corresponding to this stop on Google Places
                      type:
                        - string
                        - "null"
                    placeTypes:
                      type: array
                      items:
                        type: string
                      description: Array of strings that is provided by the Google AutoCompleteAPI
                  required:
                    - address
                    - addressLineOne
                    - addressLineTwo
                    - latitude
                    - longitude
                    - placeId
                    - placeTypes
                  additionalProperties: false
                  description: The address of the stop.
                - type: "null"
              description: Driver's end location.
            maxStops:
              anyOf:
                - type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                - type: "null"
              description: Maximum number of Stops the Driver can take in a route.
            drivingSpeed:
              type: string
              enum:
                - slower
                - average
                - faster
              description: The relative driving speed of the driver compared to others.
            deliverySpeed:
              type: string
              enum:
                - slower
                - average
                - faster
              description: The relative delivery speed of the driver compared to others.
            vehicleType:
              anyOf:
                - type: string
                  enum:
                    - bike
                    - scooter
                    - car
                    - small_truck
                    - truck
                    - electric_cargo_bike
                - type: "null"
              description: The vehicle type the driver will be using for deliveries.
          required:
            - startTime
            - endTime
            - startAddress
            - endAddress
            - maxStops
            - drivingSpeed
            - deliverySpeed
            - vehicleType
          description: Settings to override default route settings.
      required:
        - id
        - name
        - email
        - phone
        - displayName
        - active
        - depots
        - routeOverrides
      additionalProperties: false
      description: A driver.
    timeOfDaySchema:
      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: Time of day in hours and minutes. Uses a 24 hour clock.
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: Use the API key as the username and leave the password empty.
````