This API call is used to get all events (ELD and Zonar) for all drivers in the given account between the start time and end time.
Required Information | |
---|---|
Name | Description |
action | showopen |
operation | geteldlogs2 |
format | xml |
start | UNIX timestamp (UTC epoch) for the start of the query period. |
Optional Information | |
end | UNIX timestamp (UTC epoch) for the end of the query period. Limited to the maximum number of data. If not specified, left blank, or set to a value greater than 24 hours from the provided start time, a maximum of 24 hours from the provided start time will be returned. |
count | Maximum number of records to return. If not specified or left blank, the first 1000 records in the specified date range will be returned. The maximum number of records that can be returned is 2000. |
tstype | A flag to indicate what the start /end variables represent. Acceptable values are:
creation will be assumed. |
eventtypes | Return only events for certain event type (multiple types separated with commas). If not specified or left blank, all event types will be returned. See ELD Event Types and Codes for applicable event types. |
eventrecordorigins | Set to 1 to return only Driver edited, Dispatcher Suggested. If not specified or left blank, all edits will be returned. |
The count
parameter is applied before eventtypes
. This means that if the call uses count=50
and specified event types, it will pull the first 50 records, then return only the records matching the specified event types within that batch of 50.
Either count
or end
is required for a successful call. The other may be ignored, or both may be used, but at least one must be used.
Example Request
https://omi.zonarsystems.net/interface.php?customer=zzo2544&username=zonar&password=secret.pw.2019&action=showopen&operation=geteldlogs2&format=xml&start=1537910400&end=1537912500&tstype=creation&count=100&eventtypes=1
Data Returned
Name | Description |
---|---|
geteldlogs |
Root element of the response. Root element for list of events. |
Event |
Root element of event values |
DriverId |
Internal database ID for the driver |
TractorNumber |
Asset tractor number |
DriverExternalSystemID |
Driver's external system ID |
EventID |
Event ID in UUID format |
EventType |
ELD event type |
Longitude |
Longitude of event location |
Latitude |
Latitude of event location |
TotalVehicleMiles |
Total vehicle miles |
TotalEngineHours |
Total engine hours |
AccumulatedVehicleMiles |
Accumulated vehicle miles |
ElapsedEngineHours |
Elapsed engine hours |
EventCreationTime |
Event creation time as epoch |
EventInsertionTime |
Most recent event insertion time as epoch in the start/end parameter range. If tstype is creation, this will be empty. |
EventUpdateTime |
Most recent event update time as epoch |
Records |
Root element for list of historical events for this active event |
Record |
Root element of record values |
EventEpoch |
Event time as epoch |
RecordID |
Record core ID |
EventEditEpoch |
Time of event edit as epoch |
EventEditPersonID |
ID of person who edited the event |
See ELD Event Types and Codes for information on possible values for the following five entries. | |
EventRecordOrigin |
Event record origin |
EventRecordStatus |
Event record status |
EventCode |
ELD event code |
DiagCode |
Diagnostic code |
MalCode |
Mal code |
Location |
Human readable location |
OdometerIsManual |
Boolean indicating manual odometer reading |
LocationIsManual |
Boolean indicating manual location entry |
ManualOdometer |
Manually entered odometer value |
ManualLocation |
Manually entered location |
Notes |
Notes |
Example success reply
<geteldlogs TransactionTimestamp="1551229481" AccountCode="abc1234"
RecordCount="8" EventTimespanStart="1537910400"
EventTimespanEnd="1537910500" TsType="creation" Count="500"EventTypes="1"
EventRecordOrigins=""> <Event> <DriverId>2766</DriverId> <TractorNumber>1201991</TractorNumber> <DriverExternalSystemID/> <EventID>4d307474-4415-4b48-aa01-5ee4517ec67c</EventID> <EventType>1</EventType> <Longitude>-122.24731</Longitude> <Latitude>47.437958</Latitude> <TotalVehicleMiles>0</TotalVehicleMiles> <TotalEngineHours/> <AccumulatedVehicleMiles/> <ElapsedEngineHours/>
<EventCreationTime>1537906257</EventCreationTime>
<EventInsertionTime/>
<EventUpdateTime>1537907457</EventUpdateTime >
<Records> <Record> <EventEpoch>1537906257</EventEpoch> <RecordID>4d307474-4415-4b48-aa01-5ee4517ec67c</RecordID> <EventEditEpoch/> <EventEditPersonID/> <EventRecordOrigin>2</EventRecordOrigin> <EventRecordStatus>1</EventRecordStatus> <EventCode>1</EventCode> <DiagCode/> <MalCode/> <Location>2mi SSE WA Tukwila</Location> <OdometerIsManual>false</OdometerIsManual> <LocationIsManual>false</LocationIsManual> <ManualOdometer/> <ManualLocation/> <Notes/> </Record> <Record> <EventEpoch>1537906257</EventEpoch> <RecordID>f2a07079-3c0b-4311-89f2-86ff1a449e50</RecordID> <EventEditEpoch>1537907457</EventEditEpoch> <EventEditPersonID>2766</EventEditPersonID> <EventRecordOrigin>2</EventRecordOrigin> <EventRecordStatus>1</EventRecordStatus> <EventCode>2</EventCode> <DiagCode/> <MalCode/> <Location>2mi SSE WA Tukwila</Location> <OdometerIsManual>false</OdometerIsManual> <LocationIsManual>false</LocationIsManual> <ManualOdometer/> <ManualLocation/> <Notes>Duty Status Edit. OFF->SB</Notes> </Record> </Records> </Event>