> ## Documentation Index
> Fetch the complete documentation index at: https://developer.tessie.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Drives

> Returns the drives for a vehicle.



## OpenAPI

````yaml get /{vin}/drives
openapi: 3.0.0
info:
  title: Tessie API
  version: 1.0.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: The Tesla management platform.
  contact:
    name: Tessie
    url: https://tessie.com
    email: support@tessie.com
  x-logo:
    url: ''
  termsOfService: https://tessie.com/terms
servers:
  - url: https://api.tessie.com
security:
  - bearerAuth: []
tags:
  - name: Driver Management
    description: Driver management endpoints
  - name: Telemetry Configuration
    description: Vehicle telemetry configuration endpoints
  - name: Vehicle Commands
    description: Vehicle command endpoints
  - name: Vehicle Data
    description: Vehicle data endpoints
paths:
  /{vin}/drives:
    parameters:
      - $ref: '#/components/parameters/vin'
    get:
      tags:
        - Vehicle Data
      summary: Get Drives
      description: Returns the drives for a vehicle.
      operationId: get-drives
      parameters:
        - $ref: '#/components/parameters/distance_format'
        - $ref: '#/components/parameters/temperature_format'
        - $ref: '#/components/parameters/from'
        - $ref: '#/components/parameters/to'
        - $ref: '#/components/parameters/timezone'
        - schema:
            type: number
            example: 37.4925
          in: query
          name: origin_latitude
          description: The latitude of the starting point.
        - schema:
            type: number
            example: 121.9447
          in: query
          name: origin_longitude
          description: The longitude of the starting point.
        - schema:
            type: number
            example: 80
          in: query
          name: origin_radius
          description: The radius from the starting point, in meters.
        - schema:
            type: boolean
            default: false
          in: query
          name: exclude_origin
          description: Whether to exclude the starting point.
        - schema:
            type: number
            example: 37.4925
          in: query
          name: destination_latitude
          description: The latitude of the ending point.
        - schema:
            type: number
            example: 121.9447
          in: query
          name: destination_longitude
          description: The longitude of the ending point.
        - schema:
            type: number
            example: 80
          in: query
          name: destination_radius
          description: The included radius from the ending point, in meters.
        - schema:
            type: boolean
            default: false
          in: query
          name: exclude_destination
          description: Whether to exclude the ending point.
        - schema:
            type: string
            example: Work
          in: query
          name: tag
          description: The tag associated with the drive.
        - schema:
            type: boolean
            default: false
          in: query
          name: exclude_tag
          description: Whether to exclude the tag.
        - schema:
            type: string
            example: John
          in: query
          name: driver_profile
          description: The driver profile associated with the drive.
        - schema:
            type: boolean
            default: false
          in: query
          name: exclude_driver_profile
          description: Whether to exclude the driver profile.
        - $ref: '#/components/parameters/format'
        - schema:
            type: number
            example: 0.1
          in: query
          name: minimum_distance
          description: The minimum distance driven, in miles.
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Drive'
              examples:
                Example 1:
                  value:
                    results:
                      - id: 1363162
                        started_at: 1628960959
                        ended_at: 1628970656
                        starting_location: >-
                          8055 Dean Martin Drive, Las Vegas, Nevada 89139,
                          United States
                        starting_latitude: 36.042928
                        starting_longitude: -115.187801
                        ending_location: Cataba Road, Hesperia, California 92344, United States
                        ending_latitude: 34.42468
                        ending_longitude: -117.385746
                        starting_battery: 97
                        ending_battery: 21
                        average_inside_temperature: 20.23
                        average_outside_temperature: 34.94
                        average_speed: 73
                        max_speed: 90
                        rated_range_used: 230.45
                        odometer_distance: 185.9
                        autopilot_distance: 174.6
                        energy_used: 73.28
                        tag: Personal
          description: Success
components:
  parameters:
    vin:
      name: vin
      description: The associated VIN.
      schema:
        type: string
      in: path
      required: true
      deprecated: false
      x-last-modified: 1643747623235
      example: 5YJXCAE43LF123456
    distance_format:
      name: distance_format
      in: query
      required: false
      schema:
        type: string
        default: mi
        enum:
          - mi
          - km
      description: Whether to return data in miles or kilometers.
    temperature_format:
      name: temperature_format
      in: query
      required: false
      schema:
        type: string
        default: c
        enum:
          - c
          - f
      description: Whether to return data in Fahrenheit or Celsius.
    from:
      name: from
      description: The start of the timeframe. Unix timestamp in seconds.
      schema:
        type: number
      in: query
      required: false
      allowEmptyValue: false
      deprecated: false
      example: 1643747642
      x-last-modified: 1643747658888
    to:
      name: to
      description: The end of the timeframe. Unix timestamp in seconds.
      schema:
        type: number
      in: query
      required: false
      allowEmptyValue: false
      deprecated: false
      example: 1643747642
      x-last-modified: 1643747664858
    timezone:
      name: timezone
      in: query
      schema:
        type: string
        default: UTC
      description: The IANA timezone name.
    format:
      name: format
      in: query
      required: false
      schema:
        type: string
        enum:
          - json
          - csv
        default: json
      description: Whether to output the results in JSON or CSV.
    limit:
      name: limit
      description: The maximum number of results.
      schema:
        type: number
      in: query
      required: false
      allowEmptyValue: false
      deprecated: false
      example: 10
  schemas:
    Drive:
      type: object
      title: Drive
      required:
        - id
        - started_at
        - ended_at
        - starting_location
        - starting_latitude
        - starting_longitude
        - ending_location
        - ending_latitude
        - ending_longitude
        - starting_battery
        - ending_battery
        - rated_range_used
        - odometer_distance
        - energy_used
        - tag
      properties:
        id:
          type: number
        started_at:
          type: number
        ended_at:
          type: number
        starting_location:
          type: string
        starting_latitude:
          type: number
        starting_longitude:
          type: number
        ending_location:
          type: string
        ending_latitude:
          type: number
        ending_longitude:
          type: number
        starting_battery:
          type: number
        ending_battery:
          type: number
        average_inside_temperature:
          type: number
        average_outside_temperature:
          type: number
        average_speed:
          type: number
        max_speed:
          type: number
        rated_range_used:
          type: number
        odometer_distance:
          type: number
        autopilot_distance:
          type: number
          x-stoplight:
            id: txyrdfzgk6qn8
          nullable: true
        energy_used:
          type: number
        tag:
          type: string
          nullable: true
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````