openapi: 3.0.0
info:
  title: INVERS Tesla Commands API
  description: |
    The INVERS Tesla Commands API is intended for INVERS customers who need programmatic access to integrate their applications with the INVERS platform.

    The base URL for all endpoints described here is `https://api.invers.com`.
    Learn more in our [Integration Guide](https://developers.invers.com/integration-guide/) and [common API rules](https://developers.invers.com/integration-guide/api-basics/).

    The INVERS Tesla Commands API allows you to send Tesla integration specific requests.
  contact:
    name: INVERS GmbH
    url: https://developers.invers.com/
  version: 1.0.0
  x-api-id: 3da5f460-c98c-11ed-afa1-0242ac120002
  x-audience: external-public
servers:
  - url: https://api.invers.com
    description: INVERS OneAPI
tags:
  - name: Tesla Commands
    description: These resources can be used to send Tesla integration specific requests.
paths:
  /vehicles/{vehicle_id}/tesla-commands/activate-guest-mode:
    parameters:
      - $ref: '#/components/parameters/VehicleIdParameter'
    post:
      summary: Activate guest mode
      operationId: activate-guest-mode
      tags:
        - Tesla Commands
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponseGuestMode'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '502':
          $ref: '#/components/responses/BadGatewayResponse'
        '504':
          $ref: '#/components/responses/GatewayTimeoutResponse'
      security:
        - OAuth2:
            - VEHICLE_COMMANDS
      x-invers-permission: vehicle-commands
      description: |-
        Activates guest mode for the vehicle, restricting access to sensitive features such as key management and other critical vehicle settings.
        For a full list of affected features, please see [Tesla's Commands Documentation](https://developer.tesla.com/docs/fleet-api/endpoints/vehicle-commands#guest-mode).
        We recommend keeping the guest mode active as long as a vehicle is in rental, to protect owner-specific configurations.
        Once the rental period ends, deactivate guest mode to restore full access and control.
  /vehicles/{vehicle_id}/tesla-commands/deactivate-guest-mode:
    parameters:
      - $ref: '#/components/parameters/VehicleIdParameter'
    post:
      summary: Deactivate guest mode
      operationId: deactivate-guest-mode
      tags:
        - Tesla Commands
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponseGuestMode'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '502':
          $ref: '#/components/responses/BadGatewayResponse'
        '504':
          $ref: '#/components/responses/GatewayTimeoutResponse'
      security:
        - OAuth2:
            - VEHICLE_COMMANDS
      x-invers-permission: vehicle-commands
      description: Deactivates guest mode on the vehicle, restoring full access to all vehicle features.
components:
  parameters:
    VehicleIdParameter:
      schema:
        type: string
        example: JQ7RP
        maxLength: 12
      name: vehicle_id
      in: path
      required: true
      description: Vehicle ID of the target vehicle
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /auth/oauth/token
          scopes:
            VEHICLE_COMMANDS: Send commands to vehicle (using vehicle_id)
        authorizationCode:
          authorizationUrl: /auth/oauth/authorize
          tokenUrl: /auth/oauth/token
          scopes:
            VEHICLE_COMMANDS: Send commands to vehicle (using vehicle_id)
  schemas:
    CommandSuccessResponse:
      type: object
      required:
        - vehicle_state
      properties:
        vehicle_state:
          $ref: '#/components/schemas/VehicleState'
    StatePropertyBase:
      type: object
      required:
        - timestamp
        - value
      properties:
        timestamp:
          type: string
          format: date-time
          example: '2021-03-08T10:29:00Z'
          description: UTC time of the value as recorded by the vehicle (or the best approximation thereof).
    EnabledDisabledValue:
      required:
        - value
      properties:
        value:
          type: string
          x-extensible-enum:
            - ENABLED
            - DISABLED
          maxLength: 64
          example: ENABLED
    OnOffValue:
      required:
        - value
      properties:
        value:
          type: string
          description: Either `ON` or `OFF`.
          x-extensible-enum:
            - 'ON'
            - 'OFF'
          maxLength: 64
          example: 'ON'
    AdblueLevelInLiters:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          minimum: 0
          example: 3.7
          description: AdBlue level in liters
    PercentageValue:
      required:
        - value
      properties:
        value:
          type: integer
          minimum: 0
          maximum: 100
          example: 100
          format: int32
          description: Percentage ranging from 0 to 100.
    OnOffSensorFailureValue:
      required:
        - value
      properties:
        value:
          type: string
          description: Can be `ON` `OFF` or `SENSOR_FAILURE`.
          x-extensible-enum:
            - 'ON'
            - 'OFF'
            - SENSOR_FAILURE
          maxLength: 64
          example: 'OFF'
    AltitudeValue:
      required:
        - value
      properties:
        value:
          type: integer
          example: 413
          format: int32
          description: Altitude in meters.
    BrakeFluidDateValue:
      required:
        - value
      properties:
        value:
          type: string
          format: date
          example: '2023-10-18'
          description: The vehicle's brake fluid replacement due date.
    SignalQualityValue:
      required:
        - value
      properties:
        value:
          type: integer
          format: int32
          minimum: 0
          maximum: 5
          example: 3
          description: Value between 0 and 5, where 5 is the highest quality.
    RetractedExtendedValue:
      required:
        - value
      properties:
        value:
          type: string
          description: Either `RETRACTED` or `EXTENDED`.
          x-extensible-enum:
            - RETRACTED
            - EXTENDED
          maxLength: 64
          example: EXTENDED
    CentralLockValue:
      required:
        - value
      properties:
        value:
          type: string
          description: |
            The central lock value is usually `LOCKED` or `UNLOCKED`.
            Because locking and unlocking are physical actions that take time,
            the value may also have other, temporary states:

            * `LOCKED`: The vehicle reports that all doors are locked.

            * `UNLOCKED`: The vehicle reports that at least one door is unlocked.

            * `LOCKING`: A lock command was sent, but the vehicle has not yet
              confirmed the new state.
              * Once the vehicle reports back, the status updates to `LOCKED`.
              * If no update arrives within a few seconds, the status changes to `UNKNOWN`.

            * `UNLOCKING`: An unlock command was sent, but the vehicle has not
              yet confirmed the new state.
              * Once the vehicle reports back, the status updates to `UNLOCKED`.
              * If no update arrives within a few seconds, the status changes to `UNKNOWN`.

            * `UNKNOWN`: The current state of the central lock cannot be
              determined or is implausible. This can happen if:
              * No update is received after a lock/unlock command, or
              * An event contradicts the current state of the central lock (for
                example, someone opens a door while the central lock state is
                `LOCKED`).

            To resolve an `UNKNOWN` state, send the desired lock or unlock
            command again and check whether the displayed value updates.
          x-extensible-enum:
            - LOCKED
            - UNLOCKED
            - LOCKING
            - UNLOCKING
            - UNKNOWN
          maxLength: 64
          example: LOCKED
        value_source:
          type: string
          x-extensible-enum:
            - LAST_COMMAND
            - INTELLIGENT_CENTRAL_LOCK
            - READ_FROM_VEHICLE
          maxLength: 64
          example: READ_FROM_VEHICLE
          description: |
            The `value_source` describes the origin of the central lock
            `value`.

            Depending on the vehicle model, it may or may not be possible to
            read the central lock value directly from the vehicle.

            * `READ_FROM_VEHICLE` is used when the current value is read from
              the vehicle.  In that case, the value is either `LOCKED` or
              `UNLOCKED`.

            * `LAST_COMMAND` is used when the vehicle model doesn't support
              reading the state of the central lock.  The values are simply the
              results of the last command i.e. `LOCKED` if the last central
              lock command was a lock command and `UNLOCKED` if it was
              an unlock command.

            * The value source `INTELLIGENT_CENTRAL_LOCK` is used only when the
              Intelligent Central Lock feature is configured.  In this case,
              sending a lock (unlock) command will change the central lock
              value to `LOCKING` (`UNLOCKING`).

              Once the actual result is read from the vehicle, the value will
              switch to `LOCKED` or `UNLOCKED`, respectively.  In that case,
              the value source will change to `READ_FROM_VEHICLE` to reflect
              that.

              If it cannot be read within a few seconds after the command is
              executed, the value will switch to `UNKNOWN` instead and the
              `value_source` will remain `INTELLIGENT_CENTRAL_LOCK`.
    ConnectedDisconnectedValue:
      required:
        - value
      properties:
        value:
          type: string
          description: Either `CONNECTED` or `DISCONNECTED`.
          x-extensible-enum:
            - CONNECTED
            - DISCONNECTED
          maxLength: 64
          example: CONNECTED
    ChargingValue:
      required:
        - value
      properties:
        value:
          type: string
          description: Either `CHARGING` or `NOT_CHARGING`.
          x-extensible-enum:
            - CHARGING
            - NOT_CHARGING
          maxLength: 64
          example: CHARGING
    ChargingUntilValue:
      required:
        - value
      properties:
        value:
          type: string
          format: date-time
          example: '2022-02-15T15:47:13Z'
          description: UTC time of when the battery will stop charging.
    CloudboxxCardholderCardsValue:
      required:
        - value
      properties:
        value:
          type: object
          description: |
            Contains information about the cards in each slot of the CloudBoxx card holder.
          properties:
            card_1:
              type: string
              description: Either `ABSENT`, `PRESENT` or `NOT_CONFIGURED`.
              x-extensible-enum:
                - ABSENT
                - PRESENT
                - NOT_CONFIGURED
              maxLength: 64
              example: PRESENT
            card_2:
              type: string
              description: Either `ABSENT`, `PRESENT` or `NOT_CONFIGURED`.
              x-extensible-enum:
                - ABSENT
                - PRESENT
                - NOT_CONFIGURED
              maxLength: 64
              example: PRESENT
          example:
            card_1: PRESENT
            card_2: NOT_CONFIGURED
    OpenClosedValue:
      required:
        - value
      properties:
        value:
          type: string
          description: Either `OPEN` or `CLOSED`.
          x-extensible-enum:
            - OPEN
            - CLOSED
          maxLength: 64
          example: CLOSED
    DtcValue:
      required:
        - value
      properties:
        value:
          type: array
          format: date-time
          example:
            - P0198
            - P0400
          description: An array containing the currently active diagnostic trouble codes as string values.
          items:
            type: string
    DriveBatteriesValue:
      required:
        - value
      properties:
        value:
          type: object
          description: |
            Contains information about the battery in each of the vehicle's battery ports.
            Empty ports won't be included.
          properties:
            port_1:
              type: object
              properties:
                average_temperature_in_degrees_celsius:
                  description: The average temperature of the battery in °C.
                  type: number
                  format: double
                  example: 40
                serial_number:
                  type: string
                  description: The serial number of the battery.
                  example: '638612655110928'
                voltage_in_volts:
                  description: The voltage of the battery in volts.
                  type: number
                  format: double
                  example: 10.3
                level_in_percent:
                  description: The level of charge of the battery in percent.
                  type: integer
                  format: int32
                  minimum: 0
                  maximum: 100
                  example: 81
                charge_cycles:
                  description: The number of charge cycles of the battery.
                  type: integer
                  format: int32
                  example: 5
            port_2:
              type: object
              properties:
                average_temperature_in_degrees_celsius:
                  description: The average temperature of the battery in °C.
                  type: number
                  format: double
                  example: 40
                serial_number:
                  type: string
                  description: The serial number of the battery.
                  example: '638612655110928'
                voltage_in_volts:
                  description: The voltage of the battery in volts.
                  type: number
                  format: double
                  example: 10.3
                level_in_percent:
                  description: The level of charge of the battery in percent.
                  type: integer
                  format: int32
                  minimum: 0
                  maximum: 100
                  example: 81
                charge_cycles:
                  description: The number of charge cycles of the battery.
                  type: integer
                  format: int32
                  example: 5
            port_3:
              type: object
              properties:
                average_temperature_in_degrees_celsius:
                  description: The average temperature of the battery in °C.
                  type: number
                  format: double
                  example: 40
                serial_number:
                  type: string
                  description: The serial number of the battery.
                  example: '638612655110928'
                voltage_in_volts:
                  description: The voltage of the battery in volts.
                  type: number
                  format: double
                  example: 10.3
                level_in_percent:
                  description: The level of charge of the battery in percent.
                  type: integer
                  format: int32
                  minimum: 0
                  maximum: 100
                  example: 81
                charge_cycles:
                  description: The number of charge cycles of the battery.
                  type: integer
                  format: int32
                  example: 5
          example:
            port_1:
              average_temperature_in_degrees_celsius: 40
              serial_number: '638612655110928'
              voltage_in_volts: 10.3
              level_in_percent: 81
              charge_cycles: 5
            port_2:
              average_temperature_in_degrees_celsius: 37.7
              serial_number: '638612655110929'
              voltage_in_volts: 10.1
              level_in_percent: 80
              charge_cycles: 5
    DriverSeatOccupiedValue:
      required:
        - value
      properties:
        value:
          type: boolean
          description: The value `true` means the driver seat is occupied. `false` means it is not.
          example: true
    DrivingEnabledValue:
      required:
        - value
      properties:
        value:
          type: boolean
          description: True means you can start the vehicle. False means you cannot.
          example: true
    OilDateValue:
      required:
        - value
      properties:
        value:
          type: string
          format: date
          example: '2023-10-18'
          description: The vehicle's engine oil replacement due date.
    OilKilometersValue:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          example: 4255.8
          description: The remaining distance until the next engine oil replacement is due in kilometers.
    FuelLevelInLiters:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          minimum: 0
          example: 42.1
          description: Fuel level in liters
    GearshiftPositionValue:
      required:
        - value
      properties:
        value:
          type: string
          x-extensible-enum:
            - DRIVE
            - NEUTRAL
            - PARK
            - REVERSE
            - UNSUPPORTED_VALUE
          maxLength: 64
          example: DRIVE
    HdopValue:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          maximum: 99.99
          example: 1.5
    PositionQualityValue:
      required:
        - value
      properties:
        value:
          type: string
          x-extensible-enum:
            - NO_FIX
            - AUTONOMOUS_GNSS_FIX
            - DIFFERENTIAL_GNSS_FIX
            - DEAD_RECKONING_FIX
            - GNSS_DEAD_RECKONING_COMBINED_FIX
          maxLength: 64
          example: NO_FIX
    SatellitesInUseValue:
      required:
        - value
      properties:
        value:
          type: integer
          format: int32
          example: 21
    SpeedValue:
      required:
        - value
      properties:
        value:
          type: integer
          format: int32
          minimum: 0
          example: 0
    HeadingValue:
      required:
        - value
      properties:
        value:
          type: integer
          minimum: 0
          maximum: 360
          example: 37
          format: int32
          description: Heading angle in degree.
    OdometerValue:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          minimum: 0
          example: 100.25
          description: Measured in kilometers.
    OnboardVoltageValue:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          minimum: 0
          example: 12.25
          description: Measured in volts.
    ParkingBrakeValue:
      required:
        - value
      properties:
        value:
          type: boolean
          description: The value `true` means that the parking brake is engaged. `false` means it is not engaged.
          example: true
    PositionValue:
      required:
        - value
      properties:
        value:
          type: object
          description: Position of vehicle (GPS/GLONASS/...).
          required:
            - lat
            - lon
          properties:
            lat:
              minimum: -90
              maximum: 90
              type: number
              example: 50.123
              format: double
              description: Latitude of the position.
            lon:
              minimum: -180
              maximum: 180
              type: number
              example: 7.321
              format: double
              description: Longitude of the position.
    RangeValue:
      required:
        - value
      properties:
        value:
          type: number
          example: 242.32
          format: double
          description: Measured in kilometers.
    SeatbeltsValue:
      required:
        - value
      properties:
        value:
          type: object
          properties:
            front_left:
              description: The status of the seatbelt of the front left seat.
              type: string
              x-extensible-enum:
                - FASTENED
                - NOT_FASTENED
              maxLength: 64
              example: FASTENED
            front_right:
              description: The status of the seatbelt of the front right seat.
              type: string
              x-extensible-enum:
                - FASTENED
                - NOT_FASTENED
              maxLength: 64
              example: FASTENED
            row2_left:
              description: The status of the seatbelt of the left seat in the second row.
              type: string
              x-extensible-enum:
                - FASTENED
                - NOT_FASTENED
              maxLength: 64
              example: FASTENED
            row2_middle:
              description: The status of the seatbelt of the middle seat in the second row.
              type: string
              x-extensible-enum:
                - FASTENED
                - NOT_FASTENED
              maxLength: 64
              example: FASTENED
            row2_right:
              description: The status of the seatbelt of the right seat in the second row.
              type: string
              x-extensible-enum:
                - FASTENED
                - NOT_FASTENED
              maxLength: 64
              example: FASTENED
    ServiceDateValue:
      required:
        - value
      properties:
        value:
          type: string
          format: date
          example: '2023-04-18'
          description: The vehicle's service due date.
    ServiceKilometersValue:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          example: 2455.25
          description: The remaining distance until the next vehicle's service is due in kilometers.
    FuelLevelOrStateOfChargeRawValue:
      properties:
        raw_value:
          type: integer
          format: int32
          example: 123
          description: |
            This is the value for fuel level or state of charge that was actually retrieved or calculated by the telematics unit.
            This value might fall outside of the expected range of 0-100, for several reasons.
            The fuel level in percent for most vehicles with combustion engines is calculated by comparing the size of the fuel tank with the amount of liters currently in the fuel tank.
            If a wrong fuel tank size is configured, this calculation can go wrong and lead to fuel level values much greater than 100 percent.
            Even if the fuel tank size is configured correctly, it is often possible to refuel a vehicle slightly above the 100 percent mark.
            While the latter example is perfectly fine, you can look at values way above 100 in order to catch misconfigurations of the telematics unit.
            If such a case happens, make sure the correct vehicle model was configured during vehicle setup. Contact INVERS Support if you need further assistance.

            We recommend not to use this `raw_value` in your booking process, but rather only to catch misconfigurations.
            Use the `value` (see above) in your booking workflow, as we feel that you should not need to handle misconfigurations or other issues within your booking workflow.
    TelematicsBatteryValue:
      required:
        - value
      properties:
        value:
          type: object
          properties:
            voltage_in_volts:
              description: The voltage of the battery in volts.
              type: number
              format: double
              example: 10.3
            level_in_percent:
              description: The level of charge of the battery in percent.
              type: integer
              format: int32
              minimum: 0
              maximum: 100
              example: 81
            charging_status:
              type: string
              description: The charging status of the battery. It can be either `CHARGING`, `NOT_CHARGING` or `DISCHARGING`.
              x-extensible-enum:
                - CHARGING
                - NOT_CHARGING
                - DISCHARGING
              maxLength: 64
              example: CHARGING
    TelematicsVoltageValue:
      required:
        - value
      properties:
        value:
          type: number
          format: double
          minimum: 0
          example: 5.5
    LockedUnlockedValue:
      required:
        - value
      properties:
        value:
          type: string
          description: Can either be `LOCKED` or `UNLOCKED`.
          x-extensible-enum:
            - LOCKED
            - UNLOCKED
          maxLength: 64
          example: LOCKED
    VehicleKeyValue:
      required:
        - value
      properties:
        value:
          type: string
          x-extensible-enum:
            - ABSENT
            - PRESENT
          maxLength: 64
          example: PRESENT
          description: Either `ABSENT` or `PRESENT`.
    VehicleState:
      type: object
      description: |
        The vehicle state shows the current state of the vehicle and the telematics unit installed in it.
        At certain times, information about a vehicle state property is not provided by the vehicle
        and therefore it will not be shown in the vehicle state data.
        In addition, when a vehicle lacks a certain vehicle state capability,
        the corresponding property will not be included in the vehicle state data of the vehicle.
      properties:
        abs_status:
          description: Indicates whether the ABS is currently enabled.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/EnabledDisabledValue'
        abs_warning_indicator:
          description: |
            Indicates whether the ABS warning light is active. `ON` means the warning is active.
            This indicates an issue with the ABS system.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffValue'
        airbag_warning_indicator:
          description: |
            Indicates whether the airbag warning light is active. `ON` means the warning is active.
            This indicates an issue with the airbag system.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffValue'
        adblue_level_in_liters:
          description: AdBlue level of the vehicle in liters.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/AdblueLevelInLiters'
        adblue_level_in_percent:
          description: AdBlue level of the vehicle in percent.
          required:
            - timestamp
            - value
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/PercentageValue'
        adblue_level_low_indicator:
          description: Indicates whether the AdBlue level is low. `ON` means the AdBlue level is low.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        altitude_in_meters:
          description: Altitude of the vehicle.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/AltitudeValue'
        brake_fluid_due_date:
          description: The due date of the next brake fluid replacement.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/BrakeFluidDateValue'
        brake_fluid_level_low_indicator:
          description: Indicates whether the brake fluid level is low. `ON` means the brake fluid level is low.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        brake_lining_wear_indicator:
          description: Indicates whether the brake lining wear warning is active. `ON` means the warning is active.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        brake_warning_indicator:
          description: |
            Indicates whether the brake warning light is active. `ON` means the warning is active.
            This indicates an issue with the brake system.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        cellular_signal_quality:
          description: Indicates how strong the signal of the cellular connection is.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/SignalQualityValue'
        center_stand_position:
          description: Position of the center stand.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/RetractedExtendedValue'
        central_lock:
          description: State of the central lock.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/CentralLockValue'
        charging_adapter_status:
          description: The status of the vehicle's (hybrid or electric) charging adapter.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/ConnectedDisconnectedValue'
        charging_status:
          description: The charging status of a vehicle's (hybrid or electric) high voltage battery.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/ChargingValue'
        charging_until:
          description: The time at which the battery will stop charging. Can be in the past in case the battery has already stopped charging.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/ChargingUntilValue'
        check_engine_indicator:
          description: Indicates whether the engine should be checked. `ON` means the engine should be checked.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        cloudboxx_cardholder_cards:
          description: Contains information about the cards in each slot of the CloudBoxx card holder.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/CloudboxxCardholderCardsValue'
        convertible_top_status:
          description: State of the vehicle's convertible top.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OpenClosedValue'
        coolant_level_low_indicator:
          description: Indicates whether the coolant level is low. `ON` means the coolant level is low.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        coolant_temperature_high_indicator:
          description: Indicates whether the coolant temperature is high. `ON` means the coolant temperature is high.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        diagnostic_trouble_codes:
          description: A list of the currently active diagnostic trouble codes.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/DtcValue'
        doors_status:
          description: Status of the doors, either `OPEN` when at least one door is open or `CLOSED` if all doors are closed.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OpenClosedValue'
        drive_batteries:
          description: Contains information about the battery/batteries used to drive the electric vehicle.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/DriveBatteriesValue'
        driver_seat_occupied:
          description: Indicates whether the driver seat is currently occupied. `true` means occupied.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/DriverSeatOccupiedValue'
        driving_enabled:
          description: Whether you can start the engine of the vehicle.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/DrivingEnabledValue'
        engine_oil_due_date:
          description: The due date of the next engine oil replacement.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OilDateValue'
        engine_oil_due_in_kilometers:
          description: The remaining distance in kilometers until the next engine oil replacement is due.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OilKilometersValue'
        engine_oil_level_low_indicator:
          description: Indicates whether the engine oil level is low. `ON` means the engine oil level is low.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        engine_oil_quality_in_percent:
          description: Engine oil quality reported as a percentage. The higher the value, the better the quality.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/PercentageValue'
        engine_oil_pressure_low_indicator:
          description: Indicates whether the engine oil pressure is low. `ON` means the engine oil pressure is low.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        epc_warning_indicator:
          description: |
            Indicates whether the EPC warning light is active. `ON` means the warning is active.
            This warning can be caused by various issues with electronic systems of the vehicle.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffValue'
        esp_status:
          description: Indicates whether the ESP is currently enabled.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/EnabledDisabledValue'
        esp_warning_indicator:
          description: |
            Indicates whether the ESP warning light is active. `ON` means the warning is active.
            This indicates an issue with the ESP system.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffValue'
        fuel_level_in_liters:
          description: Fuel level of the vehicle in liters.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/FuelLevelInLiters'
        gearshift_position:
          description: |
            Indicates which gear is selected.

            Note that "normal" gears in vehicles with a manual transmission are not supported.
            These will be ignored completely or mapped to `UNSUPPORTED_VALUE`.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/GearshiftPositionValue'
        gnss_hdop:
          description: The value of the horizontal dilution of the GNSS precision.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/HdopValue'
        gnss_position_fix_quality:
          description: The fix quality of the GNSS position.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/PositionQualityValue'
        gnss_satellites_in_use:
          description: The number of satellites used to compute the GNSS position.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/SatellitesInUseValue'
        gnss_speed_over_ground_in_kph:
          description: The computed speed of the vehicle in kilometers per hour using the GNSS.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/SpeedValue'
        heading_in_degrees:
          description: 'Compass direction in which the vehicle is pointing (North: 0°, East: 90°, etc.)'
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/HeadingValue'
        headlights:
          description: Indicates whether the headlights are switched on or off.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffValue'
        ignition:
          description: |
            The ignition state of the vehicle.

            This usually refers to the state of the ignition switch. It can only be changed by
            the driver, e.g., by turning the key or pressing a button.

            Modern or electric vehicles may not have an ignition switch in the classical sense.
            In that case a comparable value is used to indicate the ignition state, if possible.

            The ignition state can be used to determine if a vehicle is "in use", meaning the
            driver is either actively driving (engines are running) or intending to do so.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffValue'
        mileage_in_kilometers:
          description: How far the vehicle has driven in total. Measured in kilometers.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OdometerValue'
        onboard_voltage_in_volts:
          description: The onboard voltage in volts.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnboardVoltageValue'
        parking_brake_engaged:
          description: Indicates the status of the parking brake.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/ParkingBrakeValue'
        particulate_filter_warning_indicator:
          description: |
            Indicates whether the particulate filter (DPF) warning light is active. `ON` means the warning is active.
            This indicates an issue with the particulate filter system.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffValue'
        position:
          description: Position of the vehicle.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/PositionValue'
        power_steering_failure_indicator:
          description: Indicates whether the power steering is failing. `ON` means the power steering is failing.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        remaining_range_in_kilometers:
          description: An estimate of how far the vehicle can drive with the remaining fuel or battery charge in kilometers.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/RangeValue'
        seatbelts_status:
          description: Contains information about the status of each seatbelt.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/SeatbeltsValue'
        service_due_date:
          description: The due date of the next vehicle service.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/ServiceDateValue'
        service_due_in_kilometers:
          description: The remaining distance in kilometers until next vehicle service is due.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/ServiceKilometersValue'
        speed_in_kph:
          description: The speed of the vehicle in kilometers per hour.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/SpeedValue'
        starter_battery_warning_indicator:
          description: |
            Indicates whether the battery warning light is active. `ON` means the warning is active.
            This indicates an issue with the vehicle's starter battery.
            Potential issues are for example:
              - a low state of charge
              - low power output (voltage)
              - the battery not being charged by the alternator
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        state_of_charge_or_fuel_level_in_percent:
          description: Fuel level of the vehicle in percent or the state of charge for electric vehicles.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/PercentageValue'
            - $ref: '#/components/schemas/FuelLevelOrStateOfChargeRawValue'
        state_of_charge_or_fuel_level_low_indicator:
          description: Indicates whether the fuel level or the state of charge is low. `ON` means the fuel level or the state of charge is low.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        sunroof_status:
          description: The status of a vehicle's sunroof.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OpenClosedValue'
        telematics_unit_backup_battery:
          description: Contains information about the backup battery of the telematics unit.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/TelematicsBatteryValue'
        telematics_unit_supply_voltage_in_volts:
          description: The supply voltage of the telematics unit in volts.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/TelematicsVoltageValue'
        tire_pressure_indicator:
          description: Indicates whether there is an active tire pressure warning. `ON` means there is an active tire pressure warning.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        top_case_lid:
          description: State of the top case lid.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OpenClosedValue'
        top_case_lock:
          description: State of the top case lock.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/LockedUnlockedValue'
        vehicle_key:
          description: State of the vehicle key.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/VehicleKeyValue'
        washer_fluid_level_low_indicator:
          description: Indicates whether the washer fluid level is low. `ON` means the washer fluid level is low.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OnOffSensorFailureValue'
        windows_status:
          description: Indicates whether all windows of the vehicle are closed.
          allOf:
            - $ref: '#/components/schemas/StatePropertyBase'
            - $ref: '#/components/schemas/OpenClosedValue'
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - detail
      properties:
        type:
          type: string
          format: uri-reference
          description: |
            A relative URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferencable and point to a human-readable documentation nor globally unique for the problem type.
          default: about:blank
          example: /problem/connection-error
        type_documentation:
          type: string
          format: url
          description: |
            An URL that points to a human-readable documentation of the problem type. Some explanations of the problem type together with possible solutions can be found there.  Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
          example: https://developers.invers.com/problems/invalid-credentials/
        title:
          type: string
          description: |
            A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
          example: Service Unavailable
        status:
          type: integer
          format: int32
          description: |
            The HTTP status code generated by the origin server for this occurrence of the problem.
          minimum: 100
          maximum: 600
          exclusiveMaximum: true
          example: 503
        detail:
          type: string
          description: |
            A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
          example: Connection to database timed out
        flow_id:
          type: string
          description: |
            The id of the flow that caused this error.  For more information visit [https://developers.invers.com/integration-guide/api-basics/#flow-id](https://developers.invers.com/integration-guide/api-basics/#flow-id).
  responses:
    SuccessResponseGuestMode:
      description: Command successfully sent to vehicle (OK)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CommandSuccessResponse'
          example:
            vehicle_state:
              driving_enabled:
                timestamp: '2020-01-30T13:22:05Z'
                value: true
              position:
                timestamp: '2020-01-30T13:22:05Z'
                value:
                  lat: 50.834
                  lon: 8.0219
              mileage_in_kilometers:
                timestamp: '2020-01-30T13:22:05Z'
                value: 10000
              state_of_charge_or_fuel_level_in_percent:
                timestamp: '2020-01-30T13:22:05Z'
                value: 85
    NotFoundResponse:
      description: |
        The vehicle with the specified `vehicle_id` was not found. See example for more details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: /problems/resource-not-found
            type_documentation: https://developers.invers.com/problems/resource-not-found/
            title: The resource can not be found.
            status: 404
            detail: The vehicle with ID 'JQ7RP' can not be found.
            flow_id: 5e77e3e3-48ab-4955-8ab3-1c62339096ab
    ConflictResponse:
      description: |
        The command cannot be executed.
        See examples for more details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            The command is not supported by the vehicle:
              value:
                type: /problems/vehicle/command-not-supported
                type_documentation: https://developers.invers.com/problems/vehicle/command-not-supported/
                title: The command is not supported by the vehicle.
                status: 409
                detail: The command 'activate-guest-mode' is not supported by the vehicle 'JQ7RP'.
                flow_id: 5e77e3e3-48ab-4955-8ab3-1c62339096ab
            Vehicle is currently shared:
              value:
                type: /problems/vehicle/shared-with-partner
                type_documentation: https://developers.invers.com/problems/vehicle/shared-with-partner
                title: The vehicle is currently shared with a partner.
                status: 409
                detail: The vehicle 'JQ7RP' is currently shared. Only the sharing partner of the vehicle can use this request.
                flow_id: 5e77e3e3-48ab-4955-8ab3-1c62339096ab
    BadGatewayResponse:
      description: |
        The third party API responded with an error. See example for more details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          example:
            type: /problems/third-party/error
            type_documentation: https://developers.invers.com/problems/third-party/error/
            title: An error occurred at a third party API or protocol.
            status: 502
            detail: An error occurred at the Tesla API.
            flow_id: 5e77e3e3-48ab-4955-8ab3-1c62339096ab
    GatewayTimeoutResponse:
      description: |
        The vehicle did not establish a connection or it did not answer in time. See examples for more details.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
          examples:
            The request timed out:
              value:
                type: /problems/vehicle/no-connection
                type_documentation: https://developers.invers.com/problems/vehicle/no-connection/
                title: No connection to vehicle
                status: 504
                detail: The vehicle 'JQ7RP' didn't answer in time.
                flow_id: 5e77e3e3-48ab-4955-8ab3-1c62339096ab
