Create connected vehicle
Connect a vehicle to a connectivity provider by using the createConnectedVehicle mutation. This is useful when you want to retrieve live vehicle data directly from the vehicle instead of a route calculation.
Mutation
A vehicle_id and provider are required to create a connected vehicle, along with provider-specific options. The mutation returns a connected vehicle id and an authorization_url, which can be used to complete authorization through the authorizeConnectedVehicle mutation.
Arguments
input· CreateConnectedVehicleInputFields
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· StringOperations can fail. Account for the following error scenarios to handle them correctly. More on errors 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.
Was this content helpful?