Mileage
A business mileage log priced at the IRS standard mileage rate, and recording it in the books.
GET /mileage-tripsList mileage tripsPOST /mileage-tripsLog a business tripDELETE /mileage-trips/{trip_id}Delete a tripGET /mileage-summaryMiles and the IRS-rate amount for a periodPOST /mileage-reimbursementsRecord mileage in the books at the IRS rate
List mileage trips
GET /mileage-trips
Sends Vortex-Entity.
Newest first. Requires ledger:read. Each trip shows the IRS business standard mileage rate in force on its date (rate_cents), the amount at that rate to the cent, and whether that year's rates are confirmed in SYNC (rate_confirmed; for a year not yet confirmed, the latest confirmed rate is shown). recorded is true while the trip is part of a reimbursement entry that hasn't been reversed.
Parameters
| Name | In | Type | About |
|---|---|---|---|
start_date | query | string (date) | |
end_date | query | string (date) | |
limit | query | integer | |
starting_after | query | string |
Answers
Log a business trip
POST /mileage-trips
Sends Vortex-Entity.
Logging a trip doesn't change the books. Requires journal:write. project must be an active project (422 unknown_project).
Body
| Field | Type | About |
|---|---|---|
date required | string (date) | |
purpose required | string | Up to 200 characters. |
miles required | string | More than 0 and at most 2,000, with at most one decimal place. |
vehicle | string | Up to 100 characters. |
start_place | string | Up to 200 characters. |
end_place | string | Up to 200 characters. |
project | string |
Answers
- 201 MileageTrip. The trip.
- 4XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
- 5XX Problem. An error. `code` is stable and safe to branch on; `detail` says in plain English what
Delete a trip
DELETE /mileage-trips/{trip_id}
Sends Vortex-Entity.
Requires journal:write. A recorded trip returns 409 trip_recorded; reverse its entry first.
Parameters
| Name | In | Type | About |
|---|---|---|---|
trip_id required | path | string (uuid) |
Answers
Miles and the IRS-rate amount for a period
GET /mileage-summary
Sends Vortex-Entity.
Totals for the trips in the dates, split by rate, and what isn't recorded in the books yet. Requires ledger:read.
Parameters
| Name | In | Type | About |
|---|---|---|---|
start_date required | query | string (date) | |
end_date required | query | string (date) |
Answers
Record mileage in the books at the IRS rate
POST /mileage-reimbursements
Sends Vortex-Entity and Idempotency-Key.
Records every trip not yet recorded, dated on or before through (and on or after start_date when sent), as one journal entry dated through: expense_account_id is debited, one line per project, and credit_account_id is credited with the total. The credit account is the bank it was paid from, a liability for what's owed to the driver, or an owner's equity account. Requires journal:write. Errors: 422 invalid_expense_account, invalid_credit_account, nothing_to_record, or rate_not_confirmed when a trip's year doesn't have confirmed rates in SYNC yet. A retry with the same Idempotency-Key returns the entry already made.
Body
| Field | Type | About |
|---|---|---|
through required | string (date) | |
start_date | string (date) | |
expense_account_id required | string (uuid) | |
credit_account_id required | string (uuid) | |
memo | string | Up to 1000 characters. |

