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.

AutoLog maintains a user-managed catalog of daily USD to MXN exchange rates. When you log a fuel fill-up that was paid in US dollars, you supply the exchange rate that applied on that day — and that rate is multiplied by your USD cost to produce the normalized TotalCostMxn stored with the fuel log. Keeping your exchange rate catalog current ensures that spending analytics and monthly totals reflect accurate peso amounts.

DOF Integration

Rather than requiring you to look up and type rates manually, AutoLog can fetch the official daily rate published by Mexico’s Diario Oficial de la Federación (DOF/SEGOB) — the same authoritative source used by banks and the Mexican federal government. The external rate lookup is exposed at:
GET /api/externalrates/dof/{date}
where {date} is formatted as YYYY-MM-DD. The Angular frontend calls this endpoint when you open the “Add Exchange Rate” form and uses the returned value to pre-fill the rate field for the selected date. You can accept the official DOF rate or override it with a rate from your own bank or currency exchange.
The DOF external endpoint is a convenience lookup only — it does not automatically save a rate to your catalog. You must submit a POST /api/exchangerates request (or confirm through the UI form) to persist the rate.

CreateExchangeRateRequest Fields

FieldTypeRequiredConstraintsDescription
dateDateOnlyYesThe calendar date the rate applies to. Send as YYYY-MM-DD.
usdToMxnRatedecimalYes0.01 – 100.00The USD to MXN exchange rate for that date, e.g. 17.2500
DateOnly values must be sent in ISO 8601 date format: YYYY-MM-DD. For example, June 15 2025 should be sent as "2025-06-15". Do not include a time component.

ExchangeRateResponse Fields

FieldTypeDescription
idintUnique identifier for this rate record
dateDateOnlyThe date the rate applies to (returned as YYYY-MM-DD)
usdToMxnRatedecimalThe USD to MXN rate stored with 4 decimal places

Example Request

{
  "date": "2025-06-15",
  "usdToMxnRate": 17.2500
}
Example response:
{
  "id": 42,
  "date": "2025-06-15",
  "usdToMxnRate": 17.2500
}

API Endpoints

GET /api/exchangerates

Returns all exchange rate records in the catalog.

GET /api/exchangerates/date/{date}

Looks up a stored exchange rate by specific date (YYYY-MM-DD).

POST /api/exchangerates

Saves a new exchange rate entry. Returns 201 Created with the saved record.

PUT /api/exchangerates/{id}

Updates an existing exchange rate record. Returns 204 No Content.

DELETE /api/exchangerates/{id}

Deletes an exchange rate record by ID. Returns 204 No Content.

GET /api/externalrates/dof/{date}

Fetches the official DOF rate for a given date without persisting it.

Quick Reference

MethodPathDescription
GET/api/exchangeratesList all stored rates
GET/api/exchangerates/date/{date}Get a stored rate by date
POST/api/exchangeratesCreate a new rate record
PUT/api/exchangerates/{id}Update a rate record
DELETE/api/exchangerates/{id}Delete a rate record
GET/api/externalrates/dof/{date}Fetch live DOF rate (read-only)
Exchange Rate API Reference

Build docs developers (and LLMs) love