Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/JReyna217/AutoLog/llms.txt

Use this file to discover all available pages before exploring further.

The AutoLog dashboard gives you an at-a-glance summary of your vehicle’s performance and fuel spending without any manual calculation. It pulls from your logged fill-ups and exchange rate records to surface key metrics — including total monthly spending, fuel efficiency trends, and the latest USD/MXN rate — and prepares ready-to-render data series for four distinct charts. All data is scoped to the authenticated user and can be filtered to a specific vehicle, month, and year.

Dashboard Summary Metrics

The single GET /api/dashboard/summary endpoint returns a DashboardSummaryResponse object containing both scalar KPIs and chart-ready data arrays.

Scalar KPIs

FieldTypeDescription
activeVehiclesCountintTotal number of vehicles registered to the authenticated user
latestExchangeRatedecimal?The most recently recorded USD/MXN rate in the exchange rate catalog. null if no rates have been saved.
totalMonthlySpendingdecimalSum of TotalCostMxn across all fill-ups for the selected vehicle in the target month and year

Chart Data Arrays

fullEfficiencyHistoryFuelPointDto[]

A chronological series of fuel efficiency data points used to render a line chart of km/L over time. Each point is calculated from a fill-up where DistanceTraveledKm > 0.
FieldTypeDescription
dateDateTimeThe date and time of the fill-up
kmLdecimalFuel efficiency for that fill-up, calculated as DistanceTraveledKm / VolumeLiters, rounded to 2 decimal places

annualEfficiencyComparisonMonthlyAverageDto[]

A grouped series for a year-over-year bar chart comparing average monthly efficiency. Each entry represents one calendar month across all logged years.
FieldTypeDescription
yearintThe calendar year
monthintThe calendar month (1–12)
averageKmLdecimalAverage km/L across all fill-ups in that month and year, rounded to 2 decimal places

monthlySpendingHistoryChartDataPointDto[]

A time-ordered series of total monthly fuel spending in MXN, suitable for a bar or area chart showing spending trends.
FieldTypeDescription
labelstringMonth label formatted as MM/YYYY, e.g. "06/2025"
valuedecimalTotal TotalCostMxn for all fill-ups in that month

exchangeRateHistoryChartDataPointDto[]

The 30 most recent exchange rate records ordered chronologically, used to render a USD/MXN trend line chart.
FieldTypeDescription
labelstringDate formatted as dd/MM/yyyy, e.g. "15/06/2025"
valuedecimalThe USD/MXN exchange rate recorded for that date

Query Parameters

The summary endpoint accepts optional query parameters to filter results by vehicle, month, and year.
ParameterTypeRequiredDescription
vehicleIdintNoFilter all data to a specific vehicle. If omitted, the first vehicle on the user’s account is used.
monthintNoTarget month for TotalMonthlySpending (1–12). Defaults to the month of the most recent fill-up.
yearintNoTarget year for TotalMonthlySpending. Defaults to the year of the most recent fill-up.
Example request for vehicle 3, showing data for March 2025:
GET /api/dashboard/summary?vehicleId=3&month=3&year=2025
Always pass vehicleId when your user has more than one registered vehicle. Without it, the dashboard defaults to the first vehicle returned by the database, which may not be the one you want to analyze. Combine vehicleId with month and year to drill into any specific billing period.
Passing a vehicleId that belongs to a different user will result in an error response. The dashboard service verifies vehicle ownership against the authenticated user’s JWT claims before querying any fuel log data.

API Endpoint

MethodPathDescription
GET/api/dashboard/summaryFetch the full dashboard summary for the authenticated user
Dashboard API Reference

Build docs developers (and LLMs) love