### Start Climate Control and Preconditioning (Bash) Source: https://context7.com/context7/developer_tessie_reference/llms.txt Initiates the vehicle's climate control system and battery preconditioning. Supports starting with default settings or specifying `wait_for_completion=false` for a faster API response. Also includes an example of setting a specific temperature. ```bash # Start climate with default temperature curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ https://api.tessie.com/5YJXCAE43LF123456/command/start_climate # Start climate without waiting for completion (faster response) curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ "https://api.tessie.com/5YJXCAE43LF123456/command/start_climate?wait_for_completion=false" # Example response { "result": true } # Start climate and set temperature curl -X POST -H "Authorization: Bearer $TOKEN" \ https://api.tessie.com/$VIN/command/start_climate curl -X POST -H "Authorization: Bearer $TOKEN" \ "https://api.tessie.com/$VIN/command/set_temperatures?temperature=22" ``` -------------------------------- ### Get Vehicle Data (Bash) Source: https://developer.tessie.com/reference/quick-start Fetches a list of vehicles associated with your Tessie account. Requires an access token. Returns a JSON array of vehicle objects. ```bash https://api.tessie.com/vehicles?access_token=YOUR_TOKEN ``` -------------------------------- ### Get Drivers API Specification (OpenAPI/YAML) Source: https://developer.tessie.com/reference/get-drivers This snippet provides the OpenAPI 3.0 specification in YAML format for the GET /{vin}/drivers endpoint. It details the request path, HTTP method, server URL, authentication requirements (Bearer Token), path parameters (VIN), and the schema for the successful response, including an example of the returned driver data. ```yaml paths: path: /{vin}/drivers method: get servers: - url: https://api.tessie.com request: security: - title: bearerAuth parameters: query: {} header: Authorization: type: http scheme: bearer cookie: {} parameters: path: vin: schema: - type: string required: true description: The associated VIN. deprecated: false query: {} header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: results: allOf: - type: array items: type: object properties: my_tesla_unique_id: type: integer user_id: type: integer user_id_s: type: string driver_first_name: type: string driver_last_name: type: string granular_access: type: object properties: hide_private: type: boolean active_pubkeys: type: array items: type: string public_key: type: string examples: Example 1: value: results: - my_tesla_unique_id: 88888888 user_id: 1234567 user_id_s: '1234567' driver_first_name: Jane driver_last_name: Doe granular_access: hide_private: false active_pubkeys: - >- 043da2708632f7d7c01f6casdf824007465408d475c37a6adfaa19aed565f3e254790c1baaac94ee2c68349642d21e16bf89c70a13019516ed475104c945cb3d53 public_key: '' - my_tesla_unique_id: 99999999 user_id: 123456 user_id_s: '123456' driver_first_name: John driver_last_name: Doe granular_access: hide_private: false active_pubkeys: - >- 04b7f61ba31002e4646f64795asdf2813e72e73159947e2bfa0badad9d42c0e3762e581c5ae58010146ccd9288333ceff26b84e57ae624fc4f7428ee20e719f00d public_key: >- 04b7f61ba31002e4646f64795asdf2813e72e73159947e2bfa0badad9d42c0e3762e581c5ae58010146ccd9288333ceff26b84e57ae624fc4f7428ee20e719f00d description: OK deprecated: false type: path components: schemas: {} ``` -------------------------------- ### Start Vehicle Climate (Bash) Source: https://developer.tessie.com/reference/quick-start Initiates the climate control system for a specified vehicle. Requires the vehicle's VIN and an access token. Returns a success or error message. ```bash https://api.tessie.com/YOUR_VIN/command/start_climate?access_token=YOUR_TOKEN ``` -------------------------------- ### Real-time Telemetry Streaming via WebSocket (Python) Source: https://context7.com/context7/developer_tessie_reference/llms.txt This Python example utilizes the 'websocket-client' library to connect to the Tessie telemetry stream. It defines callback functions to handle incoming messages, errors, and connection events, processing and printing telemetry data, alerts, and status updates. Ensure you have the library installed (`pip install websocket-client`). ```python import websocket import json def on_message(ws, message): data = json.loads(message) if 'data' in data: for field in data['data']: key = field['key'] value = field['value'].get('stringValue') or field['value'].get('locationValue') print(f"{key}: {value}") if 'alerts' in data: for alert in data['alerts']: print(f"Alert: {alert['name']} at {alert['startedAt']}") def on_error(ws, error): print(f"Error: {error}") def on_close(ws, close_status_code, close_msg): print("Connection closed") def on_open(ws): print("Connected to telemetry stream") # Connect with authentication ws = websocket.WebSocketApp( "wss://streaming.tessie.com/5YJXCAE43LF123456?access_token=YOUR_TOKEN", on_message=on_message, on_error=on_error, on_close=on_close, on_open=on_open ) ws.run_forever() ``` -------------------------------- ### POST /{vin}/command/start_climate Source: https://developer.tessie.com/reference/start-climate Starts the climate system and preconditions the battery for the specified vehicle. ```APIDOC ## POST /{vin}/command/start_climate ### Description Starts the climate system and preconditions the battery. ### Method POST ### Endpoint https://api.tessie.com/{vin}/command/start_climate ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN. #### Query Parameters - **wait_for_completion** (boolean) - Optional - Whether to wait for the command to complete before returning a response. Defaults to true. ### Request Example ```json { "wait_for_completion": true } ``` ### Response #### Success Response (200) - **result** (boolean) - Whether the command was successful. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### OpenAPI Specification for Get Driving Path Source: https://developer.tessie.com/reference/get-driving-path This OpenAPI specification defines the GET /{vin}/path endpoint for retrieving a vehicle's driving path. It includes details on request parameters such as VIN, start and end timestamps, and boolean flags for separating drives, simplifying the path, and including details. The response format includes an array of results, with examples showing both detailed data points and simplified coordinates. ```yaml paths: path: /{vin}/path method: get servers: - url: https://api.tessie.com request: security: - title: bearerAuth parameters: query: {} header: Authorization: type: http scheme: bearer cookie: {} parameters: path: vin: schema: - type: string required: true description: The associated VIN. deprecated: false query: from: schema: - type: number required: false description: The start of the timeframe. Unix timestamp in seconds. deprecated: false to: schema: - type: number required: false description: The end of the timeframe. Unix timestamp in seconds. deprecated: false separate: schema: - type: boolean description: Whether the path should be separated by individual drives. default: false simplify: schema: - type: boolean description: >- Whether the path should be simplified to reduce the number of points. default: true details: schema: - type: boolean description: >- Whether the path should include details like timestamps, speeds and headings. default: false header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: results: allOf: - type: array items: {} examples: Example (With Details): value: results: - timestamp: 1728191237 latitude: 40.73061 longitude: -73.935242 heading: 116 battery_level: 79 speed: 18 odometer: 1234.56 autopilot: Standby - timestamp: 1728191268 latitude: 40.73061 longitude: -73.935242 heading: 109 battery_level: 79 speed: 10 odometer: 1235.67 autopilot: Standby - timestamp: 1728191299 latitude: 40.73061 longitude: -73.935242 heading: 118 battery_level: 78 speed: 5 odometer: 1236.78 autopilot: 'Off' Example 1: value: results: - 40.730610,-73.935242 - 40.731610,-73.936242 - 40.732610,-73.937242 description: Success deprecated: false type: path components: schemas: {} ``` -------------------------------- ### OpenAPI Specification for Weather Endpoint Source: https://developer.tessie.com/reference/get-weather This OpenAPI 3.0 specification defines the GET request for retrieving weather information for a vehicle. It includes path parameters, security requirements (bearer token), and a detailed JSON response schema with example data. The endpoint is `/ {vin}/weather` and requires the vehicle's VIN as a path parameter. ```yaml paths: path: /{vin}/weather method: get servers: - url: https://api.tessie.com request: security: - title: bearerAuth parameters: query: {} header: Authorization: type: http scheme: bearer cookie: {} parameters: path: vin: schema: - type: string required: true description: The associated VIN. deprecated: false query: {} header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: location: allOf: - type: string condition: allOf: - type: string temperature: allOf: - type: number feels_like: allOf: - type: number humidity: allOf: - type: integer visibility: allOf: - type: integer pressure: allOf: - type: integer sunrise: allOf: - type: integer sunset: allOf: - type: integer cloudiness: allOf: - type: integer wind_speed: allOf: - type: number wind_direction: allOf: - type: integer examples: Example 1: value: location: Fremont condition: Clear temperature: 22.77 feels_like: 21.26 humidity: 91 visibility: 10000 pressure: 1017 sunrise: 1672757473 sunset: 1672793687 cloudiness: 25 wind_speed: 8.23 wind_direction: 160 description: Success deprecated: false type: path components: schemas: {} ``` -------------------------------- ### Get Charging Invoices (OpenAPI/YAML) Source: https://developer.tessie.com/reference/get-all-charging-invoices Defines the OpenAPI specification for the GET /charging_invoices endpoint. This includes the server URL, authentication method (bearer token), query parameters for filtering (timezone, from, to, vin, format), and the structure of the successful JSON response. ```yaml paths: /charging_invoices: get: servers: - url: https://api.tessie.com request: security: - title: bearerAuth parameters: header: Authorization: type: http scheme: bearer parameters: query: timezone: schema: type: string description: The IANA timezone name. default: UTC from: schema: type: number required: false description: The start of the timeframe. Unix timestamp in seconds. to: schema: type: number required: false description: The end of the timeframe. Unix timestamp in seconds. vin: schema: type: string description: The associated VIN. example: 7SA3ASD6XPF123456 format: schema: type: enum enum: - json - csv required: false description: Whether to output the results in JSON or CSV. default: json response: '200': application/json: schemaArray: - type: object properties: results: allOf: - type: array items: type: object properties: id: type: integer started_at: type: integer ended_at: type: integer invoice_number: type: string vin: type: string location: type: string energy_used: type: integer idle_minutes: type: integer charging_fees: type: number idle_fees: type: integer total_cost: type: number cost_per_kwh: type: number currency: type: string invoice_url: type: string examples: Example 1: value: results: - id: 242345313 started_at: 1699829921 ended_at: 1699833374 invoice_number: 3000P0085545388 vin: 7SA3CBE6XPF123456 location: Yuma, AZ - South Fortuna Road energy_used: 70 idle_minutes: 0 charging_fees: 24.5 idle_fees: 0 total_cost: 24.5 cost_per_kwh: 0.35 currency: USD invoice_url: >- https://tesla.com/teslaaccount/charging/invoice/f4d990ab-f32f-4965-8f61-6e7603714a41 - id: 242281757 started_at: 1699818910 ended_at: 1699821672 invoice_number: 3000P0085503265 vin: 7SA3CBE6XPF123456 location: Tempe, AZ energy_used: 72 idle_minutes: 0 charging_fees: 18.72 idle_fees: 0 total_cost: 18.72 cost_per_kwh: 0.26 currency: USD invoice_url: >- https://tesla.com/teslaaccount/charging/invoice/ae422c93-7e86-43d3-a24f-58f0604a1b06 description: Success deprecated: false type: path components: schemas: {} ``` -------------------------------- ### Start and Stop Vehicle Charging using cURL Source: https://context7.com/context7/developer_tessie_reference/llms.txt Allows for programmatically starting or stopping a vehicle's charging session. This is useful for automated charging based on schedules or external conditions. Requires an API token and VIN. ```bash # Start charging curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ https://api.tessie.com/5YJXCAE43LF123456/command/start_charging # Stop charging curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ https://api.tessie.com/5YJXCAE43LF123456/command/stop_charging # Example response { "result": true } ``` ```bash # Charge during off-peak hours if [ $(date +%H) -ge 22 ] || [ $(date +%H) -lt 6 ]; then curl -X POST -H "Authorization: Bearer $TOKEN" \ https://api.tessie.com/$VIN/command/start_charging else curl -X POST -H "Authorization: Bearer $TOKEN" \ https://api.tessie.com/$VIN/command/stop_charging fi ``` -------------------------------- ### POST /start_steering_wheel_heater Source: https://developer.tessie.com/reference/start-steering-wheel-heater Starts the steering wheel heater. You can optionally wait for the command to complete before receiving a response. ```APIDOC ## POST /{vin}/command/start_steering_wheel_heater ### Description Starts the steering wheel heater. ### Method POST ### Endpoint https://api.tessie.com/{vin}/command/start_steering_wheel_heater ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN. #### Query Parameters - **wait_for_completion** (boolean) - Optional - Whether to wait for the command to complete before returning a response. Defaults to true. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **result** (boolean) - Whether the command was successful. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### GET /firmware_alerts Source: https://developer.tessie.com/reference/get-firmware-alerts Retrieves a list of firmware alerts generated by a specific vehicle, identified by its VIN. ```APIDOC ## GET /{vin}/firmware_alerts ### Description Returns the list of firmware alerts generated by a vehicle. ### Method GET ### Endpoint https://api.tessie.com/{vin}/firmware_alerts ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN. ### Request Example ```json { "example": "No request body needed for this GET request." } ``` ### Response #### Success Response (200) - **results** (array) - An array of firmware alert objects. - **timestamp** (integer) - The timestamp when the alert was generated. - **name** (string) - The name of the firmware alert. - **description** (string) - A description of the alert (can be null). - **recent_fleet_count** (integer) - The count of recent fleet vehicles with this alert. #### Response Example ```json { "results": [ { "timestamp": 1726683716, "name": "VCFRONT_a361_washerFluidLowMomentary", "description": null, "recent_fleet_count": 123456 } ] } ``` ``` -------------------------------- ### OpenAPI Specification for Tessie Vehicle States Endpoint Source: https://developer.tessie.com/reference/get-historical-states This YAML defines the GET request for retrieving vehicle states from the Tessie API. It specifies the path parameters, query parameters for filtering and formatting, and the structure of the JSON response, including example data. ```yaml paths: path: /{vin}/states method: get servers: - url: https://api.tessie.com request: security: - title: bearerAuth parameters: query: {} header: Authorization: type: http scheme: bearer cookie: {} parameters: path: vin: schema: - type: string required: true description: The associated VIN. deprecated: false query: from: schema: - type: number required: false description: The start of the timeframe. Unix timestamp in seconds. deprecated: false to: schema: - type: number required: false description: The end of the timeframe. Unix timestamp in seconds. deprecated: false interval: schema: - type: number description: >- The desired number of seconds between data points. Set to 1 to return all data points. example: 1 condense: schema: - type: boolean description: Whether to condense data output. default: false timezone: schema: - type: string description: The IANA timezone name. default: UTC distance_format: schema: - type: enum enum: - mi - km required: false description: Whether to return data in miles or kilometers. default: mi temperature_format: schema: - type: enum enum: - c - f required: false description: Whether to return data in Fahrenheit or Celsius. default: c format: schema: - type: enum enum: - json - csv required: false description: Whether to output the results in JSON or CSV. default: json header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: results: allOf: - type: array items: $ref: '#/components/schemas/HistoryState' description: '' - type: object properties: results: allOf: - $ref: '#/components/schemas/CondensedHistoryStates' description: '' examples: Example 1: value: results: - id: 9271662515 timestamp: 1644010150 state: online charging_state: Charging shift_state: P version: '2022.4' battery_level: 88 usable_battery_level: 88 battery_range: 266.69 est_battery_range: 221.31 ideal_battery_range: 999 latitude: 40.7484 longitude: 73.9857 elevation: null heading: 213 speed: null power: 0 odometer: 14096.5 charge_rate: 2 charger_actual_current: 12 charger_power: 1 charger_phases: 1 charger_voltage: 118 charge_miles_added_rated: 1.5 charge_miles_added_ideal: 422 is_climate_on: 0 is_preconditioning: 0 battery_heater_on: 0 inside_temp: 37.7 outside_temp: 20.5 left_temp_direction: 0 right_temp_direction: 0 df: 0 dr: 0 ft: 0 pf: 0 pr: 0 rt: 0 locked: 1 fd_window: 0 fp_window: 0 rd_window: 0 rp_window: 0 sentry_mode: 0 valet_mode: 0 - id: 9271668763 timestamp: 1644010160 state: online charging_state: Charging shift_state: P version: '2022.4' battery_level: 88 usable_battery_level: 88 battery_range: 266.69 est_battery_range: 221.31 ideal_battery_range: 999 latitude: 40.7484 longitude: 73.9857 ``` -------------------------------- ### GET /vehicles/{vin}/path Source: https://developer.tessie.com/reference/get-driving-path Fetches the driving path for a specific vehicle VIN. You can specify a start and end time using Unix timestamps. Optional parameters allow for simplifying the path, separating individual drives, and including detailed path information like speed and heading. ```APIDOC ## GET /vehicles/{vin}/path ### Description Returns the driving path of a vehicle during a given timeframe. If no timeframe is specified, returns the driving path for the last 30 days. ### Method GET ### Endpoint https://api.tessie.com/{vin}/path ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN. #### Query Parameters - **from** (number) - Optional - The start of the timeframe. Unix timestamp in seconds. - **to** (number) - Optional - The end of the timeframe. Unix timestamp in seconds. - **separate** (boolean) - Optional - Whether the path should be separated by individual drives. Defaults to `false`. - **simplify** (boolean) - Optional - Whether the path should be simplified to reduce the number of points. Defaults to `true`. - **details** (boolean) - Optional - Whether the path should include details like timestamps, speeds and headings. Defaults to `false`. ### Request Example ```json { "example": "(No request body for GET requests)" } ``` ### Response #### Success Response (200) - **results** (array) - An array containing the path data. The format of the elements depends on the `details` and `simplify` query parameters. #### Response Example ##### Example (With Details) ```json { "results": [ { "timestamp": 1728191237, "latitude": 40.73061, "longitude": -73.935242, "heading": 116, "battery_level": 79, "speed": 18, "odometer": 1234.56, "autopilot": "Standby" }, { "timestamp": 1728191268, "latitude": 40.73061, "longitude": -73.935242, "heading": 109, "battery_level": 79, "speed": 10, "odometer": 1235.67, "autopilot": "Standby" }, { "timestamp": 1728191299, "latitude": 40.73061, "longitude": -73.935242, "heading": 118, "battery_level": 78, "speed": 5, "odometer": 1236.78, "autopilot": "Off" } ] } ``` ##### Example 1 ```json { "results": [ "40.730610,-73.935242", "40.731610,-73.936242", "40.732610,-73.937242" ] } ``` ``` -------------------------------- ### POST /vehicles/{vin}/command/start_climate Source: https://context7.com/context7/developer_tessie_reference/llms.txt Activates the vehicle's climate control system and begins battery preconditioning. ```APIDOC ## Start Climate Control ### Description Start HVAC and battery preconditioning Activates climate control system and begins battery preconditioning for optimal performance and comfort. ### Method POST ### Endpoint `/vehicles/{vin}/command/start_climate` ### Parameters #### Path Parameters - **vin** (string) - Required - The Vehicle Identification Number. #### Query Parameters - **wait_for_completion** (boolean) - Optional - If true, the request will wait for the climate control to start before responding. Defaults to true. #### Request Body None ### Request Example ```bash # Start climate with default temperature curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ https://api.tessie.com/5YJXCAE43LF123456/command/start_climate # Start climate without waiting for completion (faster response) curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ "https://api.tessie.com/5YJXCAE43LF123456/command/start_climate?wait_for_completion=false" ``` ### Response #### Success Response (200) - **result** (boolean) - Indicates whether the command was successful. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### POST /{vin}/command/start_charging Source: https://developer.tessie.com/reference/start-charging Starts charging a vehicle identified by its VIN. You can optionally wait for the charging to complete before receiving a response. ```APIDOC ## POST /{vin}/command/start_charging ### Description Starts charging a vehicle identified by its VIN. You can optionally wait for the charging to complete before receiving a response. ### Method POST ### Endpoint https://api.tessie.com/{vin}/command/start_charging ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN. #### Query Parameters - **wait_for_completion** (boolean) - Optional - Whether to wait for the command to complete before returning a response. Defaults to true. ### Request Body This endpoint does not require a request body. ### Response #### Success Response (200) - **result** (boolean) - Whether the command was successful. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### Stop Vehicle Climate (Bash) Source: https://developer.tessie.com/reference/quick-start Deactivates the climate control system for a specified vehicle. Requires the vehicle's VIN and an access token. Returns a success or error message. ```bash https://api.tessie.com/YOUR_VIN/command/stop_climate?access_token=YOUR_TOKEN ``` -------------------------------- ### OpenAPI Specification for Consumption Since Charge Source: https://developer.tessie.com/reference/get-consumption This OpenAPI specification defines the GET endpoint for retrieving vehicle consumption data since the last charge. It details the path, request parameters (VIN), authentication (Bearer Token), and the JSON response schema, including timestamps, energy usage, and range metrics. The response includes a success example. ```yaml paths: path: /{vin}/consumption_since_charge method: get servers: - url: https://api.tessie.com request: security: - title: bearerAuth parameters: query: {} header: Authorization: type: http scheme: bearer cookie: {} parameters: path: vin: schema: - type: string required: true description: The associated VIN. deprecated: false query: {} header: {} cookie: {} body: {} response: '200': application/json: schemaArray: - type: object properties: last_charge_at: allOf: - type: integer distance_driven: allOf: - type: number battery_percent_used: allOf: - type: integer battery_percent_used_by_driving: allOf: - type: integer rated_range_used: allOf: - type: number rated_range_used_by_driving: allOf: - type: number ideal_range_used: allOf: - type: number ideal_range_used_by_driving: allOf: - type: number energy_used: allOf: - type: number energy_used_by_driving: allOf: - type: number examples: Example 1: value: last_charge_at: 1675940795 distance_driven: 10.4 battery_percent_used: 10 battery_percent_used_by_driving: 4 rated_range_used: 34.57 rated_range_used_by_driving: 16.75 ideal_range_used: 34.57 ideal_range_used_by_driving: 16.75 energy_used: 7.56 energy_used_by_driving: 3.66 description: Success deprecated: false type: path components: schemas: {} ``` -------------------------------- ### POST /{vin}/command/remote_start Source: https://developer.tessie.com/reference/enable-keyless-driving Enables keyless driving for the specified vehicle. The driving session must begin within 2 minutes. ```APIDOC ## POST /{vin}/command/remote_start ### Description Enables keyless driving for the specified vehicle. The driving session must begin within 2 minutes. ### Method POST ### Endpoint https://api.tessie.com/{vin}/command/remote_start ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN. #### Query Parameters - **wait_for_completion** (boolean) - Optional - Whether to wait for the command to complete before returning a response. Defaults to true. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **result** (boolean) - Whether the command was successful. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### Get Vehicle Location Data (Bash) Source: https://context7.com/context7/developer_tessie_reference/llms.txt Retrieves the vehicle's current GPS coordinates, reverse-geocoded street address, and any saved location name. An example demonstrates tracking location changes and extracting specific fields using `jq`. ```bash # Get current location curl -H "Authorization: Bearer YOUR_TOKEN" \ https://api.tessie.com/5YJXCAE43LF123456/location # Example response { "latitude": 37.4929681, "longitude": -121.9453489, "address": "45500 Fremont Blvd, Fremont, California 94538, United States", "saved_location": "Work" } # Track location changes curl -H "Authorization: Bearer $TOKEN" \ https://api.tessie.com/$VIN/location | jq '{lat: .latitude, lng: .longitude, location: .saved_location}' ``` -------------------------------- ### Get Vehicle History Source: https://developer.tessie.com/reference/get-historical-states Fetches historical state data for a specified vehicle. ```APIDOC ## GET /websites/developer_tessie_reference ### Description Retrieves a list of historical states for a vehicle. The response includes detailed information about the vehicle's battery, location, charging status, and more at different points in time. ### Method GET ### Endpoint `/websites/developer_tessie_reference` ### Parameters #### Query Parameters - **id** (number) - Required - The unique identifier of the vehicle. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **results** (array) - An array of historical state objects. - **id** (number) - Unique identifier for the state entry. - **timestamp** (number) - Unix timestamp of the state record. - **state** (string) - The current state of the vehicle (e.g., 'online', 'offline'). - **charging_state** (string) - The current charging status (e.g., 'Charging', 'NotCharging'). - **shift_state** (string) - The current gear selection (e.g., 'P', 'D', 'R'). - **version** (string) - The software version of the vehicle. - **battery_level** (number) - The current battery percentage. - **usable_battery_level** (number) - The usable battery percentage. - **battery_range** (number) - The current estimated driving range in miles. - **est_battery_range** (number) - The estimated driving range based on current conditions in miles. - **ideal_battery_range** (number) - The ideal driving range in miles. - **latitude** (number) - The current latitude of the vehicle. - **longitude** (number) - The current longitude of the vehicle. - **elevation** (number) - The current elevation of the vehicle (nullable). - **heading** (number) - The current direction the vehicle is facing in degrees. - **speed** (number) - The current speed of the vehicle in mph (nullable). - **power** (number) - The current power draw in kW (nullable). - **odometer** (number) - The total mileage of the vehicle. - **charge_rate** (number) - The current charging rate in kW. - **charger_actual_current** (number) - The actual current from the charger in amps. - **charger_power** (number) - The power from the charger in kW. - **charger_phases** (number) - The number of phases for the charger. - **charger_voltage** (number) - The voltage from the charger. - **charge_miles_added_rated** (number) - Rated miles added during the current charging session. - **charge_miles_added_ideal** (number) - Ideal miles added during the current charging session. - **is_climate_on** (number) - Indicates if climate control is active (1 for on, 0 for off). #### Response Example ```json { "results": [ { "id": 9271676809, "timestamp": 1644010170, "state": "online", "charging_state": "Charging", "shift_state": "P", "version": "2022.4", "battery_level": 88, "usable_battery_level": 88, "battery_range": 266.69, "est_battery_range": 221.31, "ideal_battery_range": 999, "latitude": 40.7128, "longitude": 74.006, "elevation": null, "heading": 213, "speed": null, "power": 0, "odometer": 14096.5, "charge_rate": 1, "charger_actual_current": 12, "charger_power": 1, "charger_phases": 1, "charger_voltage": 118, "charge_miles_added_rated": 1.5, "charge_miles_added_ideal": 422, "is_climate_on": 0 } ] } ``` ``` -------------------------------- ### GET /drivers Source: https://developer.tessie.com/reference/get-drivers Retrieves a list of additional drivers associated with a vehicle, identified by its VIN. ```APIDOC ## GET /{vin}/drivers ### Description Returns a list of additional drivers for a given vehicle VIN. ### Method GET ### Endpoint https://api.tessie.com/{vin}/drivers ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN of the vehicle. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **results** (array) - An array of driver objects. - **my_tesla_unique_id** (integer) - The unique Tesla ID for the driver. - **user_id** (integer) - The user ID associated with the driver. - **user_id_s** (string) - The string representation of the user ID. - **driver_first_name** (string) - The first name of the driver. - **driver_last_name** (string) - The last name of the driver. - **granular_access** (object) - Contains granular access settings. - **hide_private** (boolean) - Indicates if private information is hidden. - **active_pubkeys** (array) - A list of active public keys for the driver. - **public_key** (string) - The public key of the driver. #### Response Example ```json { "results": [ { "my_tesla_unique_id": 88888888, "user_id": 1234567, "user_id_s": "1234567", "driver_first_name": "Jane", "driver_last_name": "Doe", "granular_access": { "hide_private": false }, "active_pubkeys": [ "043da2708632f7d7c01f6casdf824007465408d475c37a6adfaa19aed565f3e254790c1baaac94ee2c68349642d21e16bf89c70a13019516ed475104c945cb3d53" ], "public_key": "" }, { "my_tesla_unique_id": 99999999, "user_id": 123456, "user_id_s": "123456", "driver_first_name": "John", "driver_last_name": "Doe", "granular_access": { "hide_private": false }, "active_pubkeys": [ "04b7f61ba31002e4646f64795asdf2813e72e73159947e2bfa0badad9d42c0e3762e581c5ae58010146ccd9288333ceff26b84e57ae624fc4f7428ee20e719f00d" ], "public_key": "04b7f61ba31002e4646f64795asdf2813e72e73159947e2bfa0badad9d42c0e3762e581c5ae58010146ccd9288333ceff26b84e57ae624fc4f7428ee20e719f00d" } ] } ``` ``` -------------------------------- ### POST /command/start_charging and POST /command/stop_charging Source: https://context7.com/context7/developer_tessie_reference/llms.txt These endpoints allow for programmatic control over the vehicle's charging session. You can initiate charging or terminate it as needed. ```APIDOC ## POST /command/start_charging and POST /command/stop_charging ### Description Controls the vehicle's charging session, allowing you to start or stop charging. ### Method POST ### Endpoint `https://api.tessie.com/$VIN/command/start_charging` `https://api.tessie.com/$VIN/command/stop_charging` ### Parameters #### Path Parameters - **VIN** (string) - Required - The Vehicle Identification Number of the Tesla. ### Request Example ```bash # Start charging curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ https://api.tessie.com/5YJXCAE43LF123456/command/start_charging # Stop charging curl -X POST -H "Authorization: Bearer YOUR_TOKEN" \ https://api.tessie.com/5YJXCAE43LF123456/command/stop_charging ``` ### Response #### Success Response (200) - **result** (boolean) - Indicates if the command was successful. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### POST /{vin}/command/share Source: https://developer.tessie.com/reference/share Shares an address, latitude/longitude or video URL to the vehicle. ```APIDOC ## POST /{vin}/command/share ### Description Shares an address, latitude/longitude or video URL to the vehicle. ### Method POST ### Endpoint https://api.tessie.com/{vin}/command/share ### Parameters #### Path Parameters - **vin** (string) - Required - The associated VIN. #### Query Parameters - **wait_for_completion** (boolean) - Optional - Whether to wait for the command to complete before returning a response. Defaults to true. - **value** (string) - Required - A street address, latitude/longitude coordinates or a video URL. - **locale** (string) - Optional - The language and country code locale of the address. Useful for helping addresses translate to the navigation system accurately. Defaults to en-US. ### Request Example ```json { "query": { "vin": "YOUR_VIN", "value": "123 Main St, Anytown, CA", "locale": "en-US" } } ``` ### Response #### Success Response (200) - **result** (boolean) - Whether the command was successful. #### Response Example ```json { "result": true } ``` ```