This API call returns the total GPS mileage traveled by state for the specified date range. The report summarizes mileage using GPS breadcrumb data and returns the distance traveled within each state during the requested period.
Request Data
The following parameters are available for this request.
Required Information
| Name | Description |
| action | showposition |
| operation | mileage_by_state |
| fromdate | Start date and time in Unix Epoch seconds. Results include events that occurred on or after this time. |
| todate | End date and time in Unix Epoch seconds. Results include events that occurred on or before this time. |
Note: Human-readable dates can be converted to Unix Epoch time using any standard Epoch Timestamp Converter.
Optional Information
| Name | Description |
| limit | Specifies the maximum number of records returned. If omitted, the default value is 10,000 records. |
Example Request
https://omi.zonarsystems.net/interface.php?action=showposition&operation=mileage_by_state&fromdate=1751328000&todate=1751932799&limit=5000
Data Returned
The response contains mileage totals grouped by U.S. state for the requested date range.
Each record represents the total GPS distance traveled within a single state.
Request Parameters
| Name | Description |
| action | Identifies the API action. Must be showposition. |
| operation | Identifies the report being requested. Must be mileage_by_state. |
| fromdate | Beginning of the reporting period in Unix Epoch seconds. |
| todate | End of the reporting period in Unix Epoch seconds. |
| limit | Maximum number of records to return. Defaults to 10,000 if not specified. |
Response Data
The response includes mileage information for each state represented in the selected date range.
Typical response fields include:
| Name | Description |
| State | The U.S. state where mileage was recorded. |
| Distance | Total GPS distance traveled within the state during the reporting period. |
| Unit | The unit of measurement returned (typically Miles or Kilometers, depending on account configuration). |
Notes
- Mileage is calculated using GPS breadcrumb data.
- The report includes only travel that occurred within the specified date range.
- States with no recorded travel during the requested period are not returned.
- If no limit parameter is provided, up to 10,000 records will be returned.
- Large date ranges may return substantial amounts of data. Consider specifying a smaller reporting period or using the limit parameter when appropriate.
Example Success Request
https://omi.zonarsystems.net/interface.php?action=showposition&operation=mileage_by_state&fromdate=1751328000&todate=1751932799
Example Success Response
The exact response format (XML or JSON) depends on your implementation and API version.
Example:
<mileagebystatelist count="3" unit="Miles"><state name="Washington"><distance>1245.60</distance></state><state name="Oregon"><distance>842.17</distance></state><state name="California"><distance>529.94</distance></state></mileagebystatelist>