Get Drives
Retrieves an ordered list (last modified first) of drive data. It is important to note that each drive has a created date, which is the date in which the drive was reported by the driver. To check the date in which the drive started/ended, check the drive start/end time field
curl --request GET \
--url https://api.mileiq.com/v1/drives
{
"has_more": false,
"results": [
{
"created": "2024-05-05T16:01:07.768797Z",
"details": {
"classification": "business",
"description": "Lunch with the team at Joe's Diner to discuss the upcoming project.",
"distance": {
"amount": 37.8,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-04-28T16:13:21.035000"
},
"entry": "automatic",
"start": {
"address": {
"city": "San Rafael",
"country": "USA",
"postal_code": "94901",
"state": "CA",
"street": "123 Main St"
},
"lat": "38.11956961882322",
"lon": "-122.57060058961663",
"name": "Home",
"time": "2024-04-28T15:19:14.673000"
},
"toll_fees": {
"amount": 500,
"currency": "USD"
},
"value": {
"amount": 66723,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "4cf8ba59-0bc8-499a-83ea-996e73207b96",
"name": "Huck Finn",
"status": "active",
"timezone_offset": 7
},
"id": "6e1233d6-2e3a-41ef-ac3d-07d3ff86694d",
"modified": "2024-05-05T16:01:07.768803Z",
"review_comments": [
{
"created_at": "2024-05-06T10:30:00Z",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"text": "This drive has been rejected because it was for a lunch outing. Drives to lunch are not considered valid business expenses unless pre-approved for client meetings.",
"user_email": "[email protected]"
}
],
"status": "rejected"
},
{
"created": "2024-05-06T09:30:15.123456Z",
"details": {
"classification": "business",
"description": "Sales visit to XYZ Corp",
"distance": {
"amount": 45.2,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "San Jose",
"country": "USA",
"postal_code": "95110",
"state": "CA",
"street": "789 Tech Blvd"
},
"lat": "37.38605607707434",
"lon": "-121.97696437168137",
"name": "XYZ Corp",
"time": "2024-05-06T09:15:00.000000"
},
"entry": "automatic",
"start": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-05-06T08:00:00.000000"
},
"toll_fees": {
"amount": 0,
"currency": "USD"
},
"value": {
"amount": 79752,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "5df8ba59-1bc8-499a-83ea-996e73207c97",
"name": "Tom Sawyer",
"status": "active",
"timezone_offset": 7
},
"id": "7f1233d6-3e3a-41ef-bc3d-08d3ff86694e",
"modified": "2024-05-06T09:30:15.123456Z",
"review_comments": [],
"status": "approved"
},
{
"created": "2024-05-07T14:20:30.987654Z",
"details": {
"classification": "business",
"description": "Quarterly review meeting with Sarah Johnson, CEO of ABC Industries. Discussed ongoing projects and future collaborations.",
"distance": {
"amount": 62.7,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "Fremont",
"country": "USA",
"postal_code": "94538",
"state": "CA",
"street": "101 Industrial Way"
},
"lat": "37.67856825833634",
"lon": "-122.10093245549243",
"name": "ABC Industries",
"time": "2024-05-07T14:15:00.000000"
},
"entry": "automatic",
"start": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-05-07T13:00:00.000000"
},
"toll_fees": {
"amount": 750,
"currency": "USD"
},
"value": {
"amount": 110552,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "6ef8ba59-2bc8-499a-83ea-996e73207d98",
"name": "Becky Thatcher",
"status": "active",
"timezone_offset": 7
},
"id": "8e1233d6-4e3a-41ef-cc3d-09d3ff86694f",
"modified": "2024-05-07T14:20:30.987654Z",
"review_comments": [
{
"created_at": "2024-05-07T15:30:00Z",
"id": "d47ac10b-58cc-4372-a567-0e02b2c3d481",
"text": "Approved. Excellent documentation of the client meeting and its purpose.",
"user_email": "[email protected]"
}
],
"status": "approved"
},
{
"created": "2024-05-08T11:45:30.123456Z",
"details": {
"classification": "business",
"description": "Meeting with EFG Solutions to discuss potential partnership opportunities. Will present our service offerings and explore integration possibilities.",
"distance": {
"amount": 28.5,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "Redwood City",
"country": "USA",
"postal_code": "94063",
"state": "CA",
"street": "789 Innovation Ave"
},
"lat": "37.56241234567890",
"lon": "-122.32509876543210",
"name": "EFG Solutions",
"time": "2024-05-08T10:15:00.000000"
},
"entry": "manual",
"start": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-05-08T09:30:00.000000"
},
"toll_fees": {
"amount": 0,
"currency": "USD"
},
"value": {
"amount": 50262,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "7gf8ba59-3bc8-499a-83ea-996e73207e99",
"name": "Joe Harper",
"status": "active",
"timezone_offset": 7
},
"id": "9f1233d6-5e3a-41ef-dc3d-10d3ff86695g",
"modified": "2024-05-08T11:45:30.123456Z",
"review_comments": [],
"status": "pending"
}
]
}
Headers
Query Parameters
The number of drives to retrieve
0 < x <= 1000
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
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
Use 'ended' to filter by the date the drive has ended. Use 'modified' to filter by the date the drive was last updated
modified
, ended
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
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
A JSON array of drive data
The response is of type object
.
curl --request GET \
--url https://api.mileiq.com/v1/drives
{
"has_more": false,
"results": [
{
"created": "2024-05-05T16:01:07.768797Z",
"details": {
"classification": "business",
"description": "Lunch with the team at Joe's Diner to discuss the upcoming project.",
"distance": {
"amount": 37.8,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-04-28T16:13:21.035000"
},
"entry": "automatic",
"start": {
"address": {
"city": "San Rafael",
"country": "USA",
"postal_code": "94901",
"state": "CA",
"street": "123 Main St"
},
"lat": "38.11956961882322",
"lon": "-122.57060058961663",
"name": "Home",
"time": "2024-04-28T15:19:14.673000"
},
"toll_fees": {
"amount": 500,
"currency": "USD"
},
"value": {
"amount": 66723,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "4cf8ba59-0bc8-499a-83ea-996e73207b96",
"name": "Huck Finn",
"status": "active",
"timezone_offset": 7
},
"id": "6e1233d6-2e3a-41ef-ac3d-07d3ff86694d",
"modified": "2024-05-05T16:01:07.768803Z",
"review_comments": [
{
"created_at": "2024-05-06T10:30:00Z",
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"text": "This drive has been rejected because it was for a lunch outing. Drives to lunch are not considered valid business expenses unless pre-approved for client meetings.",
"user_email": "[email protected]"
}
],
"status": "rejected"
},
{
"created": "2024-05-06T09:30:15.123456Z",
"details": {
"classification": "business",
"description": "Sales visit to XYZ Corp",
"distance": {
"amount": 45.2,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "San Jose",
"country": "USA",
"postal_code": "95110",
"state": "CA",
"street": "789 Tech Blvd"
},
"lat": "37.38605607707434",
"lon": "-121.97696437168137",
"name": "XYZ Corp",
"time": "2024-05-06T09:15:00.000000"
},
"entry": "automatic",
"start": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-05-06T08:00:00.000000"
},
"toll_fees": {
"amount": 0,
"currency": "USD"
},
"value": {
"amount": 79752,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "5df8ba59-1bc8-499a-83ea-996e73207c97",
"name": "Tom Sawyer",
"status": "active",
"timezone_offset": 7
},
"id": "7f1233d6-3e3a-41ef-bc3d-08d3ff86694e",
"modified": "2024-05-06T09:30:15.123456Z",
"review_comments": [],
"status": "approved"
},
{
"created": "2024-05-07T14:20:30.987654Z",
"details": {
"classification": "business",
"description": "Quarterly review meeting with Sarah Johnson, CEO of ABC Industries. Discussed ongoing projects and future collaborations.",
"distance": {
"amount": 62.7,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "Fremont",
"country": "USA",
"postal_code": "94538",
"state": "CA",
"street": "101 Industrial Way"
},
"lat": "37.67856825833634",
"lon": "-122.10093245549243",
"name": "ABC Industries",
"time": "2024-05-07T14:15:00.000000"
},
"entry": "automatic",
"start": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-05-07T13:00:00.000000"
},
"toll_fees": {
"amount": 750,
"currency": "USD"
},
"value": {
"amount": 110552,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "6ef8ba59-2bc8-499a-83ea-996e73207d98",
"name": "Becky Thatcher",
"status": "active",
"timezone_offset": 7
},
"id": "8e1233d6-4e3a-41ef-cc3d-09d3ff86694f",
"modified": "2024-05-07T14:20:30.987654Z",
"review_comments": [
{
"created_at": "2024-05-07T15:30:00Z",
"id": "d47ac10b-58cc-4372-a567-0e02b2c3d481",
"text": "Approved. Excellent documentation of the client meeting and its purpose.",
"user_email": "[email protected]"
}
],
"status": "approved"
},
{
"created": "2024-05-08T11:45:30.123456Z",
"details": {
"classification": "business",
"description": "Meeting with EFG Solutions to discuss potential partnership opportunities. Will present our service offerings and explore integration possibilities.",
"distance": {
"amount": 28.5,
"discounted": 0,
"units": "mi"
},
"end": {
"address": {
"city": "Redwood City",
"country": "USA",
"postal_code": "94063",
"state": "CA",
"street": "789 Innovation Ave"
},
"lat": "37.56241234567890",
"lon": "-122.32509876543210",
"name": "EFG Solutions",
"time": "2024-05-08T10:15:00.000000"
},
"entry": "manual",
"start": {
"address": {
"city": "San Francisco",
"country": "USA",
"postal_code": "94105",
"state": "CA",
"street": "456 Market St"
},
"lat": "37.74369300370164",
"lon": "-122.43352635850880",
"name": "Office",
"time": "2024-05-08T09:30:00.000000"
},
"toll_fees": {
"amount": 0,
"currency": "USD"
},
"value": {
"amount": 50262,
"currency": "USD"
}
},
"driver": {
"email": "[email protected]",
"id": "7gf8ba59-3bc8-499a-83ea-996e73207e99",
"name": "Joe Harper",
"status": "active",
"timezone_offset": 7
},
"id": "9f1233d6-5e3a-41ef-dc3d-10d3ff86695g",
"modified": "2024-05-08T11:45:30.123456Z",
"review_comments": [],
"status": "pending"
}
]
}