Mileage Tracking
Overview
A Business that uses a vehicle for work can deduct the miles it drives for business. To claim the deduction, it needs a record of every trip: when, how far, for what purpose, and in which vehicle. Asset keeps that record and works out the deduction for each business trip.
| Object | What it is |
|---|---|
| Vehicle | A car or truck the Business drives. Every trip belongs to one. |
| Trip | A single journey, with a date, a distance, a purpose, and where it started and ended. |
| Deduction | The amount the Business can claim for a business trip. Asset calculates it from the distance and the mileage rate in force on the trip's date. |
You can get trips into Asset in two ways: create them through the API, or upload the report your customer's mileage app exports and let Asset import it. The Mileage Deduction Report then totals them for a period.
Vehicles
Create a Vehicle before you record trips for it, using Create one or more vehicles. The body is a list of up to 100 Vehicles. Each is created on its own, and the response has the Vehicles created in data and the ones that failed in errors.
| Request Parameter | Description |
|---|---|
description | Required. A name a person will recognize, such as "2022 Ford F-150". |
make, model, year | Optional. |
license_plate, vin | Optional. |
external_id | Optional. Your own identifier for the Vehicle. |
A Vehicle is is_active. A trip can only be added to an active Vehicle, so set is_active to false with Update a vehicle when a vehicle is sold or no longer used. Its existing trips stay. You can also list Vehicles and retrieve one by its ID.
Trips
Record trips with Create one or more trips. The body is a list of up to 100 trips. Each is created on its own, so one failure doesn't stop the others.
curl --request POST \
--url https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/trips \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
{
"vehicle_id": "vhc_GA6EG2qFxA97NZHtxeLPUy",
"trip_date": "2026-04-22",
"distance": 42.5,
"distance_unit": "miles",
"purpose": "business",
"start_address": "123 Main St, San Francisco, CA",
"end_address": "456 Market St, San Francisco, CA",
"notes": "Client lunch meeting"
}
]'| Request Parameter | Description |
|---|---|
vehicle_id | Required. The Vehicle used. It has to be active. |
trip_date | Required. The date of the trip. |
distance | Required. Greater than zero. |
distance_unit | Required. miles or kilometers. |
purpose | Optional. business or personal. |
start_address, end_address | At least one is required. Free text. |
notes | Optional. |
external_id | Optional. Your own identifier. It has to be unique within the Business, and a duplicate is rejected. |
The country sets the unit
Asset reads the country, and for Canada the province, from the trip's address. If it can't find one, it treats the trip as a US trip.
- US trips must be in
miles. - Canadian trips must be in
kilometers.
A trip sent in the wrong unit for its country is rejected. Send a clear address, with a state or province, so Asset reads the country correctly.
Only business trips have a deduction
When purpose is business, Asset works out the deduction and stores it on the trip as amount, with the reason in amount_reason. A personal trip, or a trip with no purpose, has no amount.
| Country | How the deduction is calculated |
|---|---|
| United States | A flat rate for each mile, set for the date of the trip. |
| Canada | Tiered rates. The first part of the calendar year's distance is paid at one rate and the rest at a second rate. Trips in the northern territories use a higher set of rates. |
Because the Canadian rate depends on how far the Business has already driven that year, a trip's amount can change after it is created. When you create, change or delete a business trip in Canada, Asset recalculates the amounts of that trip and all later trips in the same year, in date order. Changing a trip from business to personal clears its amount.
Amounts are calculated with the rates in force when the trip is saved. A later change to the published rates doesn't rewrite trips that were already saved.
Changing and removing trips
- Update a trip changes any of the fields above. If you change an address, Asset reads the country again, and the unit has to fit the new country.
- Delete a trip removes it, and recalculates later Canadian trips.
- List trips for a business can be filtered by
vehicle_id,external_id,purpose, andtrip_date_fromandtrip_date_to, which are both inclusive. The result is paginated.
Import a mileage report
If the Business already tracks its trips in a mileage app, you don't have to re-enter them. Upload the report the app exports with Upload Documents for a Business, setting document_type to mileage.
curl --request POST \
--url https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/document \
--header 'Authorization: Bearer <token>' \
--form 'files=@mileage-report-2026.csv' \
--form 'document_type=mileage'Asset reads MileIQ and Everlance exports directly. A report from another app is read with AI extraction instead, which can be slower and is less reliable for very large reports.
Asset then:
- Creates the Vehicles. A Vehicle that matches one the Business already has, by external ID or by description, is reused, so importing twice doesn't duplicate it.
- Creates the trips. Each one goes through the same rules as a trip created through the API, including the unit rules and the deduction.
- Skips what it can't import. A trip that already exists, or whose Vehicle can't be identified, is skipped.
Trips marked business in the report become business trips with a deduction. In a MileIQ report, a trip marked as anything else, such as commute, becomes a personal trip. In a report from another app, a trip whose purpose isn't clearly business or personal is imported with no purpose, and so has no deduction.
Follow the result on the Document's status. When it is processed, the Document's metadata has a mileage_import summary with created_vehicles, created_trips and skipped_trips. A DOCUMENT_PROCESSED webhook is sent when processing finishes.
Questions? Reach out via our Contact form.