Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Queries

Vehicle Channels

...

Queries

The query domains for the Fleet API are

developmentb16x17
productionfuse_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.

Fuse.vehicleChannels(<callback>, <options>) 

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.

Callback The callback function will see an array of objects that have the following properties:

channel: "720FD18D-215C-4F23-ABFD-06F62C2808F1" picoId: "Fleet-vehicle7010864A-215C-11E4-B874-136B8A2B85D9" 

...

The following  

fuse_fleet:vehicleStatus()

Queries the fleet for the current vehicle statuses. The function returns an array of vehicle status information (i.e., lastest latest data elements from Carvoyant) :

Fuse.vehicleStatus(<callback>, <options>) 

Callback The callback function will see an array of objects that have with the following properties:

KeyDescription
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)

...

The following function returns an array of vehicle summary information for all the active vehicles in the system.

Fuse.vehicleSummary(<callback>, <options>) 

...

fuse_fleet:vehicleSummary()

Queries the fleet for the latest vehicle summary. The result is an array of objects that have with the following properties:

...

KeyDescription
DTC
  • address — the latest human readable address where the vehicle is located
  • channel — the channel that can be used to communicate with this vehicle
  • deviceId — the Carvoyant device ID in the vehicle
  • fuellevel — current fuel leve
  • heading — current heading
  • label — current label for the vehicle (usually the same as the name below)
  • lastRunningTimestamp — the time the vehicle was last running
  • lastWaypoint — the lastest LatLong coordinates for the vehicle
  • mileage — current odometer reading
  • name — make/model of vehicle based on VIN lookup
  • picoId — the Fuse system identifier for the vehicle
  • profileName — owners name for the vehicle
  • profilePhoto — owners picture for the vehicle
  • running — boolean indicating the current engine status
  • speed — current speed
  • vehicleId — Carvoyant vehicle identifier
  • vin — manufacturer's VIN; owner reported

...

The following function takes a year and month and returns an array of trip summary objects for that month:

Fuse.tripSummaries(<year>, <month>, <callback>, <options>) 

<year> and <month> are strings. Months must be two characters (i.e. "08" for August, not 8).

Callback The callback function will see an array of objects that have the following properties:

Object containing latest code with ID and timestamp
addressLast known address of vehicle
channelVehicle channel
deviceIdCarvoyant device identifier
fuellevelPercentage of fuel remaining (not available on all vehicles)
headingHeading (degrees clockwise from due north)
labelNickname for vehicle (owner assigned)
lastRunningTimestampTimestamp as of last time the vehicle sent an ignitionStatus event of "OFF"
lastWaypointWaypoint as of last time the vehicle sent an ignitionStatus event of "OFF"
makeMake of vehicle as calculated from the VIN
mileageMileage as of last time the vehicle sent an ignitionStatus event of "OFF"
modelModel of vehicle as calculated from the VIN
nameName of vehicle as calculated from the VIN
picoIdThe identifier for the vehicle's pico.
profileNameOwner name for vehicle (currently the same as "label")
profilePhotoPhoto badge for vehicle
speedSpeed as of last time the vehicle sent an ignitionStatus event of "OFF"
vehicleIdCarvoyant vehicleId (presence is a good indication that vehicle is linked to Carvoyant)
vinVehicle Identification Number (owner reported)
yearYear 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:

KeyDescription
costtotal 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

...

The following function takes a year and month and returns an array of fuel summary objects for that month:

...

fuse_fleet:fuelSummary(<year>,

...

<month>

...

<year> and <month> are strings. Months must be two characters (i.e. "08" for August, not 8).

Callback The callback function will see an array of objects that have the following properties:

...

)

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:

KeyDescription
costtotal 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.)

Events

Services