The Exchange Rates API manages the user’s catalog of USD/MXN conversion rates stored in AutoLog. Because fuel prices in border regions of Mexico are frequently quoted in US dollars, AutoLog needs an accurate exchange rate for each fill-up date to normalise costs to MXN. Users can manually maintain this catalog or pre-fill it using the live DOF lookup endpoint (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.
GET /api/externalrates/dof/{date}). All five endpoints require a valid Authorization: Bearer token.
GET /api/exchangerates
GET /api/exchangerates
Returns every exchange rate record in the user’s catalog, ordered by date. An empty array is returned if no rates have been saved yet.
Auth
Authorization: Bearer <accessToken> — required.
Response fields
Returns an array of exchange rate objects. Each object contains:Unique identifier of the exchange rate record.
The calendar date this rate applies to. Example:
"2024-06-15".The USD-to-MXN conversion rate for that date. Example:
17.35.Response codes
| Code | Meaning |
|---|---|
200 OK | Array of exchange rates returned (may be empty). |
401 Unauthorized | Missing or invalid Bearer token. |
Example
GET /api/exchangerates/date/
GET /api/exchangerates/date/{date}
Returns the exchange rate record that matches a specific calendar date. Use this before creating a fuel log to retrieve the correct rate for the fill-up date.
Auth
Authorization: Bearer <accessToken> — required.
Path parameters
The date to look up, formatted as
YYYY-MM-DD. Example: 2024-06-15.Response fields
Unique identifier of the exchange rate record.
The date this rate applies to.
The USD-to-MXN rate for that date.
Response codes
| Code | Meaning |
|---|---|
200 OK | Exchange rate record found and returned. |
401 Unauthorized | Missing or invalid Bearer token. |
404 Not Found | No exchange rate is stored for the specified date. |
Example
POST /api/exchangerates
POST /api/exchangerates
Saves a new exchange rate entry for a specific date. Returns 201 Created with the persisted record. Dates must be unique — attempting to create a duplicate date will return 400.
Auth
Authorization: Bearer <accessToken> — required.
Request body
The calendar date this rate applies to. Format:
YYYY-MM-DD. Example: "2024-06-15".The USD-to-MXN conversion rate. Must be between
0.01 and 100.00.Response fields
Server-assigned unique identifier for the new record.
The date this rate was saved for.
The stored USD-to-MXN conversion rate.
Response codes
| Code | Meaning |
|---|---|
201 Created | Exchange rate record created. Response body contains the new object. |
400 Bad Request | Missing fields, rate out of range (0.01–100.00), or duplicate date. |
401 Unauthorized | Missing or invalid Bearer token. |
Example
PUT /api/exchangerates/
PUT /api/exchangerates/{id}
Updates an existing exchange rate record. Both the date and the rate value can be changed. Returns 204 No Content on success.
Auth
Authorization: Bearer <accessToken> — required.
Path parameters
The unique identifier of the exchange rate record to update.
Request body
The updated calendar date. Format:
YYYY-MM-DD.The updated USD-to-MXN conversion rate. Must be between
0.01 and 100.00.Response codes
| Code | Meaning |
|---|---|
204 No Content | Exchange rate updated. No body returned. |
400 Bad Request | Missing fields or rate out of allowed range. |
401 Unauthorized | Missing or invalid Bearer token. |
404 Not Found | No exchange rate record with that ID exists. |
Example
DELETE /api/exchangerates/
DELETE /api/exchangerates/{id}
Permanently removes an exchange rate record from the catalog. Fuel log entries that previously used this rate retain their already-normalised MXN values and are not affected.
Auth
Authorization: Bearer <accessToken> — required.
Path parameters
The unique identifier of the exchange rate record to delete.
Response codes
| Code | Meaning |
|---|---|
204 No Content | Exchange rate record deleted. No body returned. |
401 Unauthorized | Missing or invalid Bearer token. |
404 Not Found | No exchange rate record with that ID exists. |