Overview
The dashboard analytics endpoints provide executive insights, consumption trends, distribution analysis, and intelligent alerts for fuel tracking operations. All endpoints support filtering by date range, operational area, fuel type, and other parameters.Common Filter Parameters
Most dashboard endpoints support these query parameters:Start date for filtering (format: YYYY-MM-DD)
End date for filtering (format: YYYY-MM-DD)
Filter by operational area name (partial match)
Filter by fuel type: ACPM, GASOLINA, or EXTRA
Filter by driver name (partial match)
Filter by vehicle plate (partial match)
Filter by fuel station name (partial match)
Get Executive KPIs
Response
Global metrics across all filtered records
Total gallons consumed
Total cost in COP
Total available balance across all fuel stations
Total number of fuel records
Average gallons per refuel
Average cost per gallon
Number of unique vehicles that refueled
Number of unique drivers
Percentage of records missing hourmeter reading
Breakdown by fuel type (keys: ACPM, GASOLINA, EXTRA, etc.)Each fuel type contains:
galones: Total gallonsvalor: Total costcantidad: Number of recordscostoPromedioGalon: Average cost per gallon for this fuel type
Breakdown by operational area and fuel type (only ACPM and GASOLINA)Each area contains fuel types with:
galones: Total gallonsvalor: Total costcostoPromedioGalon: Average cost per gallon
Daily consumption breakdown (keys are dates in YYYY-MM-DD format)Each date contains:
galones: Gallons consumed that dayvalor: Total cost that day
Example
Get Fuel Station Balances
Response
Summary statistics
Total number of active fuel stations
Sum of all balances
Number of stations with negative balance
Number of stations with balance < -500,000 COP
Number of stations with balance between -500,000 and 0
Number of stations with positive balance
Example
Get Consumption Over Time
Response
Array of consumption data points:Date in YYYY-MM-DD format
Fuel type
Total gallons consumed
Total cost in COP
Example
Get Fuel Distribution
Response
Array of fuel type distributions:Fuel type name
Total gallons for this fuel type
Total cost for this fuel type
Percentage of total gallons
Percentage of total cost
Example
Get Consumption by Area
Response
Array of area consumption data:Operational area name
Fuel type
Total gallons
Total cost
Get Top Vehicles
Response
Array of top vehicles (limited to 10):Vehicle plate
Fuel type
Total gallons consumed
Total cost
Get Vehicles by Area
Response
Array of vehicle records:Vehicle plate
Most recent driver name
Date of most recent refuel
Total gallons across all areas
Total cost across all areas
Total number of refuels
Number of different operational areas
Get Consumption by Driver
Response
Array of driver consumption records:Driver name
Fuel type
Total gallons
Total cost
Number of refuels
Get Consumption by Pump
Response
Array of pump consumption records:Fuel station name
Fuel type
Total gallons
Total cost
Get Intelligent Alerts
Alert Types
- SIN_HOROMETRO: Records missing hourmeter readings
- COSTO_ANORMAL: Cost per gallon outside expected range
- SALDO_CRITICO: Balance below -500,000 COP
- CONSUMO_ATIPICO: Consumption > 2 standard deviations above mean
Fuel Price Thresholds
- ACPM: 9,000 - 15,000 COP/gallon
- GASOLINA: 10,000 - 16,000 COP/gallon
- EXTRA: 11,000 - 17,000 COP/gallon
Response
Array of alert objects:Alert type code
Human-readable alert message
Number of records triggering this alert
Alert severity:
warning or errorExample
Response Example
Get Alert Records
Path Parameters
Alert type: SIN_HOROMETRO, COSTO_ANORMAL, SALDO_CRITICO, or CONSUMO_ATIPICO
Response
Array of fullTanqueoRelacion records that match the alert criteria.
Example
Get Detailed Table
Query Parameters
Supports all standard filters plus pagination:Page number
Records per page
Response
Array of fuel records with flagsEach record includes all
TanqueoRelacion fields plus:Pagination metadata (same as list endpoint)
Example
Notes
- All dashboard endpoints filter to
tipo_operacion = 'TANQUEO'(excludes ANTICIPO records) - Dates are inclusive when using
fecha_inicioandfecha_fin - Statistical calculations (standard deviation, averages) exclude null values
- The
vehicles-by-areaendpoint defaults to the last 2 months if no date filter is provided - All monetary values are in Colombian Pesos (COP)
- Saldos-bombas endpoint respects Row Level Security (RLS) based on authenticated user
Related Endpoints
- List Fuel Records - View detailed records
- Get Filter Options - Get available filter values