Queries
The query domains for the Fleet API are
development | b16x17 |
---|---|
production | fuse_fleet |
The production version is always pre-pended to the production query domain with a period, so for version 1 of the API would use v1_fuse_trips
as the query domain. In this document we will use the production query domain without the version. See Fuse Base URLs for more information on how to turn the descriptions shown here into a query URL.
fuse_fleet:vehicleChannels()
Query the fleet for a the current vehicle channels. The result is an array of objects that associate a picoId
with the current channel for that vehicle.
You should avoid using the channel as a means of identifying the vehicle since it could change. This function always provides the current mapping from the vehicle canonical name in the system, the picoId
, and the pico channel.
fuse_fleet:vehicleStatus()
Queries the fleet for the current vehicle statuses. The function returns an array of vehicle status information (i.e., latest data elements from Carvoyant) with the following properties:
Key | Description |
---|---|
GEN_DTC | Diagnostic Trouble Codes |
GEN_VOLTAGE | Battery Voltage |
GEN_TRIP_MILEAGE | Trip Mileage (calculate from ignition on to ignition off via GPS) |
GEN_ODOMETER | Vehicle Reported Odometer (not available on all makes and models) |
GEN_WAYPOINT | GPS Location |
GEN_HEADING | Heading (degrees clockwise from due north) |
GEN_RPM | Engine Speed |
GEN_FUELLEVEL | Percentage of Fuel Remaining (not available on all makes and models) |
GEN_FUELRATE | Rate of Fuel Consumption |
GEN_ENGINE_COOLANT_TEMP | Engine Temperature |
GEN_SPEED | Maximum Speed Recorded (since the previous reading) |
fuse_fleet:vehicleSummary()
Queries the fleet for the latest vehicle summary. The result is an array of objects with the following properties:
Key | Description |
---|---|
DTC | Object containing latest code with ID and timestamp |
address | Last known address of vehicle |
channel | Vehicle channel |
deviceId | Carvoyant device identifier |
fuellevel | Percentage of fuel remaining (not available on all vehicles) |
heading | Heading (degrees clockwise from due north) |
label | Nickname for vehicle (owner assigned) |
lastRunningTimestamp | Timestamp as of last time the vehicle sent an ignitionStatus event of "OFF" |
lastWaypoint | Waypoint as of last time the vehicle sent an ignitionStatus event of "OFF" |
make | Make of vehicle as calculated from the VIN |
mileage | Mileage as of last time the vehicle sent an ignitionStatus event of "OFF" |
model | Model of vehicle as calculated from the VIN |
name | Name of vehicle as calculated from the VIN |
picoId | The identifier for the vehicle's pico. |
profileName | Owner name for vehicle (currently the same as "label") |
profilePhoto | Photo badge for vehicle |
speed | Speed as of last time the vehicle sent an ignitionStatus event of "OFF" |
vehicleId | Carvoyant vehicleId (presence is a good indication that vehicle is linked to Carvoyant) |
vin | Vehicle Identification Number (owner reported) |
year | Year of vehicle as calculated from the VIN |
fuse_fleet:tripsSummary(<year>, <month>)
Query fleet for summary of vehicle trips. See the Trips API description for general information about trips.
The parameters are a year given as a four digit string (e.g. "2014") and a month given as a two digit string (e.g. "08" for August)
The result is an array of objects with the following properties:
Key | Description |
---|---|
cost | total cost of all trips |
interval | total length of all trips in seconds |
mileage | total length of all trips in distance units (Fuse is unit agnostic) |
picoId | pico identifier |
trip_count | total number of trips for month |
fuse_fleet:fuelSummary(<year>, <month>)
Query fleet for summary of vehicle fillups. See the Fuel API description for general information about fuel.
The parameters are a year given as a four digit string (e.g. "2014") and a month given as a two digit string (e.g. "08" for August)
The result is an array of objects with the following properties:
Key | Description |
---|---|
cost | total cost of all fillups in the given month |
distance | total distance driven between fillups |
fillups | number of fillups |
picoId | pico identifier |
volume | volume of fillups (e.g. gallons, liters, etc.) |