Skip to main content
Omnitracs Knowledge Base

Driver->DriverOdometers

DriverOdometers (Driver Function) 

This function returns the beginning and ending odometer readings to the nearest tenth of a mile for all drivers at a specified depot and date. This function is only enabled for tractors using Omnitracs transportation services.

The response is returned as an array of all drivers who logged driving time on the specified day, tractors driven by that driver on that day, and the time segments when the driver was logged in on that tractor. Time segments that start before, or end after, the specified day will be included in the response.

If the driver conducted off-duty driving during the specified day, the off-duty time segments are not shown; as a result, multiple time segments in which the driver was logged in may be displayed. For a sample response with multiple driving segments, see DriverOdometers Response Example.

XML Request

The DriverOdometers function takes two parameters.

Depot Type Description
Integer An integer identifying the depot to which a driver belongs
Date dateTime The time (expressed as the local time at the driver's depot) for which the odometer information is requested
  
<soap:Body>  
    <DriverOdometers xmlns="http://www.omnitracs.com">  
        <request>  
            <Depot>int</Depot>  
            <Date>dateTime</Date>  
        </request>  
    </DriverOdometers>  
</soap:Body>  

XML Response

The DriverOdometers function returns the following values:

Parameter Type Description
DriverCount Integer The number of drivers at the requested depot
TimeZone String The time zone of the requested depot
Drivers Array An array of driver IDs with associated tractor and odometer data
DriverId String A driver's ID
Tractors Array An array of tractors associated with this driver ID
TractorId String The tractor currently assigned to that driver
StartTime dateTime The date and time the starting odometer reading occurred for a logged-in driver
EndTime dateTime The date and time the ending odometer reading occurred for a logged-in driver
StartOdometer Integer The starting odometer reading, to the nearest tenth of a mile
EndOdometer Integer The ending odometer reading, to the nearest tenth of a mile
  
<soap:Body>  
    <DriverOdometersResponse xmlns="http://www.omnitracs.com">  
        <DriverOdometersResult>  
            <DriverCount>int</DriverCount>  
            <TimeZone>string</TimeZone>  
            <Drivers>  
                <DriverOdometersDriverData>  
                    <DriverId>String</DriverId>  
                    <Tractors>  
                        <DriverOdometersTractorData>  
                            <TractorId>String</TractorId>  
                            <Odometers>  
                                <DriverOdometersData>  
                                    <StartTime>dateTime</StartTime>  
                                    <EndTime>dateTime</EndTime>  
                                    <StartOdometer>Integer</StartOdometer>  
                                    <EndOdometer>Integer</EndOdometer>  
                                </DriverOdometersData>  
                            </Odometers>  
                        </DriverOdometersTractorData>  
                        <DriverOdometersTractorData>  
                            <TractorId>String</TractorId>  
                            <Odometers>  
                                <DriverOdometersData>  
                                    <StartTime>dateTime</StartTime>  
                                    <EndTime>dateTime</EndTime>  
                                    <StartOdometer>Integer</StartOdometer>  
                                    <EndOdometer>Integer</EndOdometer>  
                                </DriverOdometersData>  
                            </Odometers>  
                        </DriverOdometersTractorData>  
                    </Tractors>  
                </DriverOdometersDriverData>  
                <DriverOdometersDriverData>  
                    <DriverId>String</DriverId>  
                    <Tractors>  
                        <DriverOdometersTractorData>  
                            <TractorId>String</TractorId>  
                            <Odometers>  
                                <DriverOdometersData>  
                                    <StartTime>dateTime</StartTime>  
                                    <EndTime>dateTime</EndTime>  
                                    <StartOdometer>Integer</StartOdometer>  
                                    <EndOdometer>Integer</EndOdometer>  
                                </DriverOdometersData>  
                            </Odometers>  
                        </DriverOdometersTractorData>  
                    </Tractors>  
                </DriverOdometersDriverData>  
            </Drivers>  
        </DriverOdometersResult>  
    </DriverOdometersResponse>  
</soap:Body>  

DriverOdometers Response Example

  • Was this article helpful?