开发者Skip to main content

  1. 文件
  2. 收费

车辆端点

端点

drivers

GET /api/1/vehicles/{vehicle_tag}/drivers

返回车辆的所有允许的驾驶员。该端点仅供车主使用。

drivers_remove

DELETE /api/1/vehicles/{vehicle_tag}/drivers

取消驾驶员对车辆的访问。共享用户只能删除自己的访问权限。所有者可以删除共享访问权限或自己的访问权限。

eligible_subscriptions

GET /api/1/dx/vehicles/subscriptions/eligibility?vin={vin}

返回符合条件的车辆订阅

eligible_upgrades

GET /api/1/dx/vehicles/upgrades/eligibility?vin={vin}

返回符合条件的车辆升级。

fleet_status

POST /api/1/vehicles/fleet_status

用于检查你的共钥是否已经和提供的车辆相配对。当使用一个车辆识别码(VIN)调用时,也会返回折扣设备数据状态。

fleet_telemetry_config create

POST /api/1/vehicles/fleet_telemetry_config

配置车辆以连接到自托管fleet-telemetry 服务器。 该端点并发度为1(同时调用多个会返回状态429)。 一次调用即可配置多辆车辆。该端点可用于创建或更新配置。

如果未配置任何指定的 VIN,则响应将包含“skipped_vehicles”。 VIN 可能被拒绝的原因:

  • missing_key:您的虚拟钥匙尚未添加到车辆中。 分发您的公钥
  • unsupported_hardware:Pre -2021 Model S 和 X 不受支持。
  • unsupported_firmware:运行固件版本早于 2023.20 的车辆。
  • max_configs:已存在五个配置的车辆。

车辆可以配置为同时向 3 个第三方应用程序传输数据。

fleet_telemetry_config delete

DELETE /api/1/vehicles/{vehicle_tag}/fleet_telemetry_config

Disconnects vehicles to stream telemetry data to self hosted fleet-telemetry server.

fleet_telemetry_config get

GET /api/1/vehicles/{vehicle_tag}/fleet_telemetry_config

Fetches a vehicle's fleet telemetry config. synced set to true means the vehicle has adopted the target config. synced set to false means the vehicle will attempt to adopt the target config when it next establishes a backend connection. Note that if vehicle only allows 3 partners per vehicle for streaming via fleet telemetry. If limit_reached set to true, vehicle has reached max supported applications and new fleet streaming requests cannot be added to the vehicle

fleet_telemetry_config_jws

POST /api/1/vehicles/fleet_telemetry_config_jws

通过接受签名配置令牌,将车辆配置为连接到自托管的 fleet-telemetry 服务器。

不建议直接使用此端点。

配置车辆的推荐方法是通过 vehicle-command 代理调用 fleet_telemetry_config create 端点。这将自动使用配置的私钥对配置进行签名,并将请求转发到此端点。

如果直接使用此端点,则必须使用 NIST P-256 和 SHA-256 使用 Schnorr 签名算法创建 JWS 令牌。

VIN可能会因以下几个原因被拒绝:

  • missing_key: 虚拟钥匙尚未添加到车辆。 分发公钥
  • unsupported_hardware: 不支持2021年之前的Model S和X。
  • unsupported_firmware: 车辆运行的固件版本早于2024.26。

fleet_telemetry_errors

GET /api/1/vehicles/{vehicle_tag}/fleet_telemetry_errors

返回最近车辆上的车队Telemetry错误

list

GET /api/1/vehicles

返回此账户下车辆的列表。默认页面大小为100。

mobile_enabled

GET /api/1/vehicles/{vehicle_tag}/mobile_enabled

返回车辆是否启用移动端设备(如APP)访问。

nearby_charging_sites

GET /api/1/vehicles/{vehicle_tag}/nearby_charging_sites

返回车辆当前位置附近的充电站。

options

GET /api/1/dx/vehicles/options?vin={vin}

返回车辆选项详细信息。(暂未开放,即将推出)

recent_alerts

GET /api/1/vehicles/{vehicle_tag}/recent_alerts

最近警报列表

release_notes

GET /api/1/vehicles/{vehicle_tag}/release_notes

返回固件的版本信息

service_data

GET /api/1/vehicles/{vehicle_tag}/service_data

获取有关车辆维护状态的信息。

share_invites

GET /api/1/vehicles/{vehicle_tag}/invitations

返回车辆的有效共享邀请。这个端点是分页的,每页最多包含25条记录。

share_invites create

POST /api/1/vehicles/{vehicle_tag}/invitations
  • 每个邀请链接仅供一次性使用,并在24小时后过期。
  • 使用邀请的帐户将获得Tesla应用程序对车辆的驾驶员访问权限,从而可以执行以下操作:
    • 查看车辆的实时位置。
    • 发送远程命令。
    • 将用户的特斯拉个人资料下载到车辆
  • 要删除访问权限,请使用撤销API
  • 如果用户没有安装Tesla应用程序,他们将被转跳至网页获得更多指引。
  • 当用户靠近车辆时,可以使用Tesla应用程序将手机设置为钥匙。
  • Tesla应用程序访问权限提供驾驶员权限,但不包含所有所有者功能。
  • 一次最多可以添加五个驾驶员。
  • 该API不需要车辆在线。

share_invites redeem

POST /api/1/invitations/redeem

兑换分享邀请。兑换后,该帐户将可以在Tesla应用程序中访问车辆。

share_invites revoke

POST /api/1/vehicles/{vehicle_tag}/invitations/{id}/revoke

撤销共享邀请。这会使共享无效并使链接无效。

signed_command

POST /api/1/vehicles/{vehicle_tag}/signed_command

向车辆发送特斯拉车辆命令协议。请参阅车辆命令SDK了解更多信息。

subscriptions

GET /api/1/subscriptions

返回此移动设备当前订阅推送通知的车辆列表

subscriptions set

POST /api/1/subscriptions

允许移动设备指定从哪些车辆接收推送通知。当从移动设备呼叫时,仅提供移动设备希望订阅的车辆 ID 就足够了。

vehicle

GET /api/1/vehicles/{vehicle_tag}

返回车辆信息

vehicle_data

GET /api/1/vehicles/{vehicle_tag}/vehicle_data

对车辆进行实时呼叫。如果车辆离线,对于运行固件版本2023.38+的车辆,需要location_data来获取车辆位置。这将导致位置共享图标显示在车辆UI上。

vehicle_subscriptions

GET /api/1/vehicle_subscriptions

返回此移动设备当前订阅推送通知的车辆列表。

vehicle_subscriptions set

POST /api/1/vehicle_subscriptions

允许移动设备指定从哪些车辆接收推送通知。仅提供移动设备希望订阅的车辆ID就足够了。

wake_up

POST /api/1/vehicles/{vehicle_tag}/wake_up

将车辆从睡眠状态唤醒,睡眠状态能最大限度减少闲置能耗。

warranty_details

GET /api/1/dx/warranty/details

返回车辆的保修信息。