The External Rates API is a thin proxy that reaches out to Mexico’s SIDOF/SEGOB service — the digital platform of the Diario Oficial de la Federación — and returns the official USD/MXN exchange rate published for a given date. The frontend uses this endpoint to pre-fill the exchange rate field when a user is creating or editing a fuel log, removing the need to look up the rate manually. A validDocumentation 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.
Authorization: Bearer token is required.
The DOF publishes official exchange rates on business days only. Rates are not published on weekends or public holidays in Mexico. Querying one of those dates returns
204 No Content — the frontend should detect this and prompt the user to enter the rate manually or select the nearest available business day.GET /api/externalrates/dof/
GET /api/externalrates/dof/{date}
Queries the SIDOF/SEGOB external service for the official USD-to-MXN exchange rate on the specified date. Returns the rate if one was published, or 204 No Content if the DOF did not publish a rate for that day (weekends, public holidays, or dates before the service’s data window).
Auth
Authorization: Bearer <accessToken> — required.
Path parameters
The date for which to retrieve the official exchange rate, formatted as
YYYY-MM-DD. Example: 2024-06-14.Response fields
When a rate is available (200 OK):
The official USD-to-MXN exchange rate published by the DOF for the requested date. Example:
17.3512.204 No Content with an empty body.
Response codes
| Code | Meaning |
|---|---|
200 OK | DOF published a rate for the requested date. rateValue is returned in the body. |
204 No Content | The DOF has no rate for this date (weekend, public holiday, or out-of-range date). |
401 Unauthorized | Missing or invalid Bearer token. |