Mutation
创建联网车辆
使用 createConnectedVehicle 变更将车辆连接到连接服务提供商。当您希望直接从车辆获取实时车辆数据,而不是依赖路线计算时,此操作非常有用。
变更
创建联网车辆需要 vehicle_id 和 provider,以及特定于提供商的 options。该变更会返回联网车辆的 id 和 authorization_url,可用于通过 authorizeConnectedVehicle 变更完成授权。
参数
input· CreateConnectedVehicleInput字段
id· IDvehicle_id· IDstatus· ConnectedVehicleStatusConnectedVehicleStatus enum values
pending_authorizationVehicle was added to the Chargetrip Connect platform but not yet authorized
authorizedVehicle was authorized. Chargetrip can retrieve data on behalf of the user
pending_removalPending vehicle removal
removedVehicle was removed and access has been revoked
provider· CarConnectivityProviderCarConnectivityProvider enum values
Enodescope· ConnectScopeConnectScope enum values
locationVehicle location, applicable for: Enode
charge_stateCharge state, applicable for: Enode
odometerOdometer reading, applicable for: Enode
label· Stringvin· String操作可能会失败。请考虑以下错误场景以正确处理。有关错误的更多信息 here.
auth_token_expired- The token you provided is expired.
auth_token_invalid- The token you provided is invalid.
connect_provider_not_allowed- The Connect provider $PROVIDER is not configured for your client id. Please contact customer support to enable it!
connected_vehicle_per_make_limit_reached- The maximum number of vehicles per make ($LIMIT) was reached.
connected_vehicle_removal_not_allowed- You cannot remove a vehicle with status $STATUS.
enode_proxy_exception- Enode remote did throw an exception that could not be handled.
new_connected_vehicle_invalid_options_enode- Provided options are invalid. Enode requires the following options: redirect_uri, scope.
operation_not_allowed- You are not allowed to execute this operation. Enable it for the current application in the dashboard or reach out to customer support.
rate_limit_exceeded- Rate limit exceeded.
vehicle_already_connected- This vehicle has already been connected to a provider for this user.
此内容是否有帮助?