> ## 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 Charges

> Returns the charges for a vehicle.



## OpenAPI

````yaml get /{vin}/charges
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}/charges:
    parameters:
      - $ref: '#/components/parameters/vin'
    get:
      tags:
        - Vehicle Data
      summary: Get Charges
      description: Returns the charges for a vehicle.
      operationId: get-charges
      parameters:
        - $ref: '#/components/parameters/distance_format'
        - $ref: '#/components/parameters/format'
        - schema:
            type: boolean
            default: false
          in: query
          name: superchargers_only
          description: Whether to only include charges from Superchargers.
        - schema:
            type: number
            example: 37.4925
          in: query
          name: origin_latitude
          description: The latitude of the charging station.
        - schema:
            type: number
            example: 121.9447
          in: query
          name: origin_longitude
          description: The longitude of the charging station.
        - schema:
            type: number
            example: 80
          in: query
          name: origin_radius
          description: The radius from the charging station, in meters.
        - schema:
            type: boolean
            default: false
          in: query
          name: exclude_origin
          description: Whether to exclude the charging station.
        - $ref: '#/components/parameters/timezone'
        - $ref: '#/components/parameters/from'
        - $ref: '#/components/parameters/to'
        - schema:
            type: number
            example: 1
          in: query
          name: minimum_energy_added
          description: The minimum energy added to the battery, in kWh.
        - $ref: '#/components/parameters/limit'
      responses:
        '200':
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Charge'
              examples:
                Example 1:
                  value:
                    results:
                      - id: 434159
                        started_at: 1628906796
                        ended_at: 1628911246
                        location: >-
                          South Las Vegas Boulevard, Las Vegas, Nevada 89119,
                          United States
                        latitude: 36.070656
                        longitude: -115.172968
                        is_supercharger: true
                        odometer: 12345.67
                        energy_added: 81.41
                        energy_used: 81.5
                        miles_added: 256
                        miles_added_ideal: 512
                        starting_battery: 11
                        ending_battery: 96
                        cost: 0
          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.
    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.
    timezone:
      name: timezone
      in: query
      schema:
        type: string
        default: UTC
      description: The IANA timezone name.
    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
    limit:
      name: limit
      description: The maximum number of results.
      schema:
        type: number
      in: query
      required: false
      allowEmptyValue: false
      deprecated: false
      example: 10
  schemas:
    Charge:
      type: object
      title: Charge
      properties:
        id:
          type: number
        started_at:
          type: number
        ended_at:
          type: number
        location:
          type: string
        latitude:
          type: number
        longitude:
          type: number
        is_supercharger:
          type: boolean
        odometer:
          type: number
        energy_added:
          type: number
        energy_used:
          type: number
        miles_added:
          type: number
        miles_added_ideal:
          type: number
        starting_battery:
          type: number
        ending_battery:
          type: number
        cost:
          type: number
      required:
        - id
        - started_at
        - ended_at
        - location
        - latitude
        - longitude
        - is_supercharger
        - odometer
        - energy_added
        - energy_used
        - miles_added
        - miles_added_ideal
        - starting_battery
        - ending_battery
        - cost
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````