Skip to main content

Vehicle Sensors Services

This page explains the vehicle sensor timeline available in the Fleet API, which sensors are supported, and how to retrieve historical sensor readings.

Supported Sensors

The sensor timeline endpoint supports the following sensor types:

Sensorfilter[sensor] valueDescription
Fuel (CAN bus)FUELFuel level reported via the vehicle's CAN bus
EV BatteryEV_BATTERYState of charge for electric vehicles
EV Charging StatusEV_BATTERY_CHARGING_STATUSWhether the vehicle is currently charging
EV RangeEV_RANGEEstimated remaining range for electric vehicles
EV ConsumptionEV_CONSUMPTIONEnergy consumption for electric vehicles
TaxiTAXITaximeter state, available for supported taxi operators
warning

Sensor availability depends on the hardware installed in the vehicle and the sensors configured for the account. If a sensor is not configured, the endpoint returns no data for that vehicle. Contact your Cartrack account manager if you are unsure which sensors are active.

Which Endpoint Should I Use?

Use the following endpoint to retrieve sensor timeline data for a single vehicle:

How to Retrieve Sensor Timeline Data

  1. Identify the vehicle registration and the sensor type you want to query.
  2. Choose a time range. The range between filter[start_timestamp] and filter[end_timestamp] cannot exceed 31 days.
  3. Call GET /vehicles/{registration}/sensors/timeline with filter[sensor], filter[start_timestamp], and filter[end_timestamp].
  4. Use the value and raw_value fields in each record to interpret the sensor state (see below).
  5. Paginate through results using the page and limit parameters if the response spans multiple pages.

Understanding the Response

Each record in the response contains:

FieldTypeDescription
sensor_idintegerInternal sensor type identifier
sensor_namestringHuman-readable sensor name
sensor_nointegerSensor number assigned to the vehicle
sensor_typestringanalog or digital
event_tsstringTimestamp of the sensor reading
raw_valuestringThe literal value reported by the sensor hardware
valuestringA numeric index mapped from raw_value (see country-specific notes below)

For most sensors, raw_value is the primary field to use. The value field is a positional index into a fixed mapping table defined per sensor type and is most relevant for sensors that report named states (such as the Taxi sensor).

Country-Specific Notes

Portugal — Taxi sensor

Portuguese taxi operators use a taximeter sensor (sensor_no 901) connected to the Cartrack device. The taximeter sends state codes as strings; the API maps these to a numeric value index for consistency.

valueraw_valueMeaning
0DESLIGADOTaximeter off / out of service
1LIVREFree / available for hire
21Hardware-specific taximeter code
33Hardware-specific taximeter code
45Hardware-specific taximeter code
56Hardware-specific taximeter code
6CHardware-specific taximeter code
7PHardware-specific taximeter code
8-Unknown / no data

DESLIGADO (off) and LIVRE (free) are the standard, well-understood states. The exact meaning of the hardware-specific codes (1, 3, 5, 6, C, P) depends on the taximeter model and should be confirmed with the taximeter vendor.