Skip to main content
POST
/
api
/
v1
/
mileage
Create Mileage Trip
curl --request POST \
  --url https://api.example.com/api/v1/mileage \
  --header 'Content-Type: application/json' \
  --data '
{
  "date": "<string>",
  "miles": 123,
  "purpose": "<string>",
  "assignment_id": 123,
  "origin": "<string>",
  "destination": "<string>",
  "notes": "<string>"
}
'

Request Body

date
string
required
Trip date (YYYY-MM-DD).
miles
integer
required
Distance driven. Must be ≥ 1.
purpose
string
required
Trip purpose: tax_home_visit, work_travel, licensing, personal, or other.
assignment_id
integer
Link to a specific assignment.
origin
string
Starting point (max 200 chars).
destination
string
Ending point (max 200 chars).
notes
string
Additional context (max 1000 chars).

Response

Returns the created trip with status 201.

Errors

StatusCause
400Missing required fields, invalid purpose, miles < 1