GuidesAPI Reference
API Reference

Gets event history for a device or a shipment

Gets all events for a device or a shipment. A device is identified by the trackingId. For shipments, shipmentId can be used as a trackingId.

The results are listed in descending order based on the timestamp.

An event is uniquely identified by trackingId-ruleId-timestamp key, with an exception of dwelling and stock rule events. Dwelling events also need geofenceId to be specified, whereas for stock events trackingId is not applicable.

A single event can be fetched using ruleId, before and after query parameters.

A time range can be defined with before and after timestamps. The response will contain an array of events that were recorded within the range. The default value for before parameter is the current time, and for the after parameter it is one day in the past from the current time. The after parameter value is not allowed to be earlier than two weeks in the past from the before timestamp, otherwise an error is returned.

If the request is supplied with eventSource query parameter, the response will contain events generated by the defined source only.

If the request is supplied with eventType query parameter, the response will contain events of the specified type only.

If the request is supplied with ruleId query parameter, the response will only contain events for the specified rule ID.

If the request is supplied with initialState query parameter, the response will contain events having the specified initial state.

All the aforementioned query parameters can be combined together.

Path Params
string
required
length between 1 and 50

This is a unique ID associated with the device data in HERE Tracking. The trackingId gets assigned to a device when the device is claimed by a user. Alternatively, a valid shipmentId may be used.

Query Params
number
≥ 1

Milliseconds elapsed since 1 January 1970 00:00:00 UTC. The accepted range is from 1 to the current time.

number
≥ 0

Milliseconds elapsed since 1 January 1970 00:00:00 UTC. The accepted range is from 0 to the current time.

enum

The event source rule type.

enum

Type of the event.

An event is created every time an associated rule or geofence is triggered by a device ingestion. The event type depends on the data the device sends.

Sensors that report numerical data (such as battery, humidity, pressure and temperature sensors), generate an event when the reported sensor reading of the device goes in or out of range, which is configured in the rule. This produces events of BELOW_RANGE, IN_RANGE and ABOVE_RANGE types.

Sensors that report boolean data (such as attach and tamper sensors), generate events when the device transitions from one state to another, either from false to true or vice versa. This produces events of FALSE_TO_TRUE and TRUE_TO_FALSE types. The same event types are also generated by the online rule when the device state changes from offline (when the device has stopped ingesting data) to online (when the device data ingestion has resumed) or vice versa.

The acceleration sensor generates events whenever the reported sensor reading crosses the acceleration threshold (for example, when the device was dropped). This produces events of the type EVENT. Such events are stateless.

Events of INSIDE_GEOFENCE and OUTSIDE_GEOFENCE types are generated when the device enters or exits a geofence associated with the device.

Events of DWELLING_STARTED type are generated when the device has stayed inside an associated geofence for longer than the threshold duration. DWELLING_ENDED type events are generated when dwelling of the device has ended.

Events of DETENTION_STARTED type are generated when the device has been stationary for longer than the threshold duration, regardless whether the device is inside or outside of any geofence. DETENTION_ENDED type events will be generated when the device starts moving again.

Events of UNUTILIZED type are generated when the device has been stationary for longer than the threshold duration. UTILIZED type events are generated when the device starts moving again after having been stationary.

Events of OVERSTOCK, NORMAL_VOLUME and UNDERSTOCK types are generated when the number of assets inside a geofence crosses the minVolume and maxVolume thresholds of an associated stock rule.

Event of SHIPMENT_ESTIMATE_CHANGED is generated when the estimated departure (ETD) or arrival (ETA) times deviate from the original estimates more than the defined threshold.

Events of SHIPMENT_EARLY, SHIPMENT_ON_TIME and SHIPMENT_DELAYED types are generated when a shipment is too early, on time or delayed.

ID of the rule or geofence. Must be a valid UUIDv4.

boolean

Events with the initialState property set as true are generated when the rule is evaluated for the first time. It indicates the fact that this is the initial evaluation state, which would serve as a starting point for the subsequent rule evaluations. The rest of the rule events would represent a transition of a device or a shipment or a geofence from one state to another and their initialState property will be set to false.

string

A token from the previously returned response to retrieve the specified page.

integer
1 to 1000
Defaults to 1000

The number of items to return per page.

string
length ≥ 8

Application identifier. Used together with an external ID to identify a virtual device.

Headers
uuid

ID used for correlating requests within HERE Tracking. Used for logging and error reporting.

Must be a valid UUIDv4.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json