Skip to main content
GET
/
v1
/
users
/
{user_id}
/
drives
Get User Drives
curl --request GET \
  --url https://api.mileiq.com/v1/users/{user_id}/drives
{
  "results": [
    {
      "distance": {
        "amount": 123,
        "units": "mi"
      },
      "value": {
        "amount": 123,
        "currency": "USD"
      },
      "toll_fees": {
        "amount": 123,
        "currency": "USD"
      },
      "parking_fees": {
        "amount": 123,
        "currency": "USD"
      },
      "description": "<string>",
      "entry": "manual",
      "classification": "business",
      "purpose": "<string>",
      "start": {
        "name": "<string>",
        "lat": "<string>",
        "lon": "<string>",
        "time": "2023-11-07T05:31:56Z",
        "address": {
          "country": "<string>",
          "state": "<string>",
          "city": "<string>",
          "street": "<string>",
          "postal_code": "<string>"
        }
      },
      "end": {
        "name": "<string>",
        "lat": "<string>",
        "lon": "<string>",
        "time": "2023-11-07T05:31:56Z",
        "address": {
          "country": "<string>",
          "state": "<string>",
          "city": "<string>",
          "street": "<string>",
          "postal_code": "<string>"
        }
      },
      "drive_id": 123,
      "created": "2023-11-07T05:31:56Z",
      "modified": "2023-11-07T05:31:56Z",
      "started_at": "2023-11-07T05:31:56Z",
      "ended_at": "2023-11-07T05:31:56Z"
    }
  ],
  "has_more": true
}

Headers

Authorization
string

Query Parameters

classification
enum<string>

Drive classification

Available options:
business,
personal,
all
limit
integer
default:100

The number of drives to retrieve

Required range: 0 < x <= 1000
date_before
string<date-time> | null

The end date of the range to retrieve drives for based on the defined filter_by param. Filter_by needs to be set for this field to be used. Should be in UTC

date_after
string<date-time> | null

The start date of the range to retrieve drives for based on the defined filter_by param. Filter_by needs to be set for this field to be used. Should be in UTC

filter_by
enum<string> | null

Use 'ended' to filter by the date the drive has ended. Use 'modified' to filter by the date the drive was last updated

Available options:
modified,
ended
modified_before
string<date-time> | null

The end date of the range to retrieve drives for. If the drive was reviewed by an admin, this will be the last review date. If not, this will be the same as the date it was reported. [DEPRECATED] Use [date_before, date_after] + filter_by instead

modified_after
string<date-time> | null

The start date of the range to retrieve drives for. If the drive was reviewed by an admin, this will be the last review date. If not, this will be the same as the date it was reported. [DEPRECATED] Use [date_before, date_after] + filter_by instead

Response

Successfully retrieved user drives. Returns paginated list of drives with complete details including locations, distance calculations, monetary values, and trip metadata.

results
DriveSchema · object[]
required

Array of drive objects containing comprehensive trip information including locations, distances, values, and metadata

has_more
boolean
required

Pagination indicator - true if additional drives exist beyond the current result set within the specified filters and date range