Basic Information

Detailed Information

Report Data

The TimeInZone Datatype

The following datatype will be JSONified and returned for methods which retrieve values.

public class TimeInZoneResults
{
publicUInt64AccountId; // The AccountId associated with the Device
publicUInt64DeviceId; // The DeviceId (Serial#) associated with the Device
publicStringDeviceName; // The Device Name matched with the DeviceID
publicUInt64AlertId; // The AlertID associated with the Geofence/Radius Zone
publicStringAlertName; // The name of the Alert that defines the Geofence/Radius Zone
publicDateTimeEntered; // The time the Device ENTERED the Geofence/Radius Zone
publicDateTime?Exited; // The time the Device EXITED the Geofence/Radius Zone. NOTE: If the device has not yet exited the ZONE at time of report, this will return NULL but TOTAL TIME will reflect time 'up to the END DATE PARAMETER of the report'
publicUInt64TotalSeconds; // The total SECONDS in zone.
}

The TimeInZone Method

The following list provides a reference for all valid /TimeInZone HTTP requests.

  • GET v1/TimeInZoneReport/{id}?from={from}&to={to}&devices={devices}&UTCoffset={UTCoffset}&alerts={alerts}&interpolate={interpolate}&CompletedResultSets={CompletedResultSets}&account={account}&fobBased={fobBased}

    Summary: Retrieve a report that is run immediately and returned as soon as possible. These reports are typically limited to a small range or timespan.

    Returns:

    Parameters:

    • id: The AccountId associated with API caller (FromUri)
    • from: The DateTime to begin report. If no FROM/TO dates passed in, default is last 24 hours. (FromUri)
    • to: The DateTime to end report. If no FROM/TO dates passed in, default is last 24 hours. (FromUri)
    • devices: A comma-separated list of DeviceIds to lookup for a report. If this is not specified, reports will run for all devices visible to the account. (FromUri)
    • UTCoffset: (Optional) UTC offset to return results in. Default is CENTRAL TIME. (see https://24timezones.com/time-zones for example strings: "UTC-6" for minus 6 or "UTC%2b6" for plus 6) (FromUri)
    • alerts: A comma-separated list of AlertIds (aka ZoneIDs) to lookup for a report. If this is not specified, reports will run for all Geofence/Radius Alerts visible to the account. (FromUri)
    • interpolate: (Optional, true by default) This option 'interpolates' time in zone by looking at data before and after the specified windows. (FromUri)
    • CompletedResultSets: (Optional) When TRUE, only records whose ENTERED/EXIT times fall within the API's START and END times are returned. Default is FALSE. (FromUri)
    • account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid). (FromUri)
    • fobBased: (Optional) If this bool parameter is set to TRUE, the method will return some additional result elements: Driver, Driver EIN and FOB. This option is for FOB drivers only. (FromUri)