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 Dashboard API aggregates all of a user’s fuel log data into a single, chart-ready summary response. It computes the number of active vehicles, the latest available exchange rate, total spending for the selected month, full historical efficiency data points, annual efficiency comparisons by month, monthly spending history, and exchange rate history — everything the AutoLog frontend needs to render its charts and KPI tiles in one round-trip. All data is scoped to the authenticated user automatically. The vehicleId, month, and year query parameters let the frontend filter the summary to a specific vehicle and/or time period.
All returned efficiency values are in km/L and all cost values are in MXN, regardless of the units originally submitted on fill-up entries.

GET /api/dashboard/summary

GET /api/dashboard/summary Returns a fully aggregated dashboard summary for the authenticated user. All query parameters are optional; omitting them returns data across all vehicles and all recorded time periods.

Auth

Authorization: Bearer <accessToken> — required.

Query parameters

vehicleId
integer
Filter the summary to a single vehicle. When omitted, data from all of the user’s vehicles is aggregated together.
month
integer
Filter spending and efficiency data to a specific calendar month (1 = January … 12 = December). Typically paired with year.
year
integer
Filter data to a specific calendar year, e.g. 2024. When omitted, all years are included.

Response fields

activeVehiclesCount
integer
Total number of vehicles registered to the authenticated user.
latestExchangeRate
number (decimal) | null
The most recently stored USD-to-MXN exchange rate. null if no exchange rate records exist.
totalMonthlySpending
number (decimal)
Sum of all fill-up costs in MXN for the selected month and year. Returns 0 when no logs match the filter.
fullEfficiencyHistory
array
Chronological list of individual fill-up efficiency data points, used to draw a time-series line chart.
annualEfficiencyComparison
array
Month-by-month average fuel efficiency for the selected year, suitable for rendering a bar or column chart comparing performance across months.
monthlySpendingHistory
array
A labeled series of monthly total spending values, used to draw a spending trend chart.
exchangeRateHistory
array
A labeled series of historical USD/MXN exchange rate values, used to draw a rate trend chart.

Response codes

CodeMeaning
200 OKDashboard summary returned.
401 UnauthorizedMissing or invalid Bearer token.

Example — all vehicles, current month

curl -X GET "https://api.autolog.app/api/dashboard/summary?month=6&year=2024" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
{
  "activeVehiclesCount": 2,
  "latestExchangeRate": 17.42,
  "totalMonthlySpending": 3840.50,
  "fullEfficiencyHistory": [
    { "date": "2024-06-03T10:15:00", "kmL": 10.78 },
    { "date": "2024-06-15T08:30:00", "kmL": 10.81 },
    { "date": "2024-06-28T17:00:00", "kmL": 11.02 }
  ],
  "annualEfficiencyComparison": [
    { "year": 2024, "month": 4, "averageKmL": 10.55 },
    { "year": 2024, "month": 5, "averageKmL": 10.73 },
    { "year": 2024, "month": 6, "averageKmL": 10.87 }
  ],
  "monthlySpendingHistory": [
    { "label": "Apr 2024", "value": 3200.00 },
    { "label": "May 2024", "value": 3510.75 },
    { "label": "Jun 2024", "value": 3840.50 }
  ],
  "exchangeRateHistory": [
    { "label": "Jun 01", "value": 17.25 },
    { "label": "Jun 08", "value": 17.31 },
    { "label": "Jun 15", "value": 17.35 },
    { "label": "Jun 22", "value": 17.42 }
  ]
}

Example — single vehicle

curl -X GET "https://api.autolog.app/api/dashboard/summary?vehicleId=1&month=6&year=2024" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Build docs developers (and LLMs) love