Data Structures and Properties

The following sections provide examples that show the default data structures available from the Tive API for Device data streams and Alert data streams and how to access each property within the data structures.

Default Template Structure

Device Data Structure

{
  "EntityName": "VD0001",
  "EntryTimeEpoch": 1612465056823,
  "EntryTimeUtc": "2021-02-04T18:57:36.8229403",
  "Cellular": {
    "SignalStrength": "Good",
    "Dbm": -73
  },
  "Temperature": {
    "Celsius": 23,
    "Fahrenheit": 73.4000015258789
  },
  "ProbeTemperature": {
    "Celsius": 32,
    "Fahrenheit": 89.5999984741211
  },
  "Pressure": {
    "Psi": 44.0879020690918,
    "Atmospheric": 3.0000040531158447
  },
  "Humidity": {
    "Percentage": 33.29999923706055
  },
  "Weather": {
    "Temperature": {
      "Celsius": 0,
      "Fahrenheit": 32
    },
    "Wind": null
  },
  "Accelerometer": {
    "G": 4.115822958620668,
    "X": 1.100000023841858,
    "Y": 2.200000047683716,
    "Z": 3.299999952316284
  },
  "Light": {
    "Lux": 133.26
  },
  "MinLight": {
    "Lux": 5.22
  },
  "MaxLight": {
    "Lux": 300
  },
  "Battery": {
    "Percentage": 55,
    "IsCharging": false
  },
  "Shock": {
    "G": 10.656894339940518,
    "X": -10.229999542236328,
    "Y": 0.1899999976158142,
    "Z": -2.9800000190734863
  },
  "ShockTime": "1970-01-01T00:00:00Z",
  "Shipment": {
    "Id": "Public Shipment Id",
    "Description": "Shipment Description",
    "WebhookIds": [],
    "DeviceId": "000000000000000000000001",
    "DeviceIds": [
      "000000000000000000000001"
    ],
    "AutoComplete": false,
    "ShipFromDate": "2021-02-04T18:57:36.823043+00:00",
    "ShipFrom": {
      "Name": null,
      "Latitude": null,
      "Longitude": null,
      "FormattedAddress": null,
      "Address": {
        "Street": "56 Roland Street",
        "Sublocality": "",
        "Locality": "Boston",
        "State": "MA",
        "Country": "USA",
        "ZipCode": "02129"
      },
      "LocationMethod": null,
      "Accuracy": null
    },
    "ShipTo": {
      "Name": null,
      "Latitude": null,
      "Longitude": null,
      "FormattedAddress": null,
      "Address": {
        "Street": "56 Roland Street",
        "Sublocality": "",
        "Locality": "Boston",
        "State": "MA",
        "Country": "USA",
        "ZipCode": "02129"
      },
      "LocationMethod": null,
      "Accuracy": null
    },
    "CustomFields": [
      {
        "Label": "Custom Field Label",
        "Value": "Custom Field Value"
      }
    ],
    "CreatedByUserId": null,
    "CreatedDate": null,
    "UpdatedDate": null,
    "UpdatedByUserId": null,
    "AlertProfileIds": [],
    "AutoCompleteHoursDelay": 1,
    "MeanKineticTemperature": null,
    "StandardDeviation": null,
    "DegreeMinutes": null,
    "SharedUrl": null,
    "Carrier": null,
    "ContainerId": null
  },
  "AccountId": 123,
  "DeviceId": "000000000000000000000001",
  "DeviceName": "VD0001",
  "ShipmentId": "Public Shipment Id",
  "PublicShipmentId": null,
  "Location": {
    "Name": null,
    "Latitude": 42.3983903,
    "Longitude": -71.12880539999999,
    "FormattedAddress": "56 Roland Street, Charlestown, Boston, MA 02129, USA",
    "Address": null,
    "LocationMethod": null,
    "Accuracy": {
      "Meters": null,
      "Kilometers": null,
      "Miles": null,
      "Feet": null
    }
  }
}

Alert Data Structure

{
  "EntityName": "VD0001",
  "PlatformAlertUrl": "d/0037002A3734344807353531/alerts/-",
  "PlatformUserPreferencesUrl": "",
  "AlertDate": "2021-02-04T18:54:38Z",
  "RealDate": "2021-02-04T18:54:38Z",
  "AlertName": "Shock",
  "AlertProfileName": "Location Accuracy Test - Webhook",
  "AlertValue": "1",
  "AlertDisplayValue": "1 shock event",
  "RecoveredAlertDisplayValue": null,
  "RecoveredAlertDate": "0001-01-01T00:00:00",
  "AlertType": "ShockEvents",
  "AlertTypeId": 15,
  "TriggerName": "Shock event",
  "TriggerTransition": "",
  "TriggerValue": "YES",
  "TriggerUnit": "",
  "TriggerDetails": "true",
  "Alert": {
    "AccountId": 123,
    "DeviceId": "000000000000000000000001",
    "DeviceName": "VD0001",
    "EntityName": "VD0001",
    "ShipmentId": null,
    "Details": [
      {
        "Value": {
          "ShockCount": 1
        },
        "DateTime": "2021-02-04T18:54:38Z",
        "Reasons": [
          "Created",
          "Closed"
        ],
        "Location": {
          "Name": null,
          "Latitude": 42.380505,
          "Longitude": -71.079871,
          "FormattedAddress": "56 Roland Street, Massachusetts 02129, United States",
          "Address": null,
          "LocationMethod": null,
          "Accuracy": null
        }
      }
    ],
    "AlertType": "ShockEvents",
    "Trigger": {
      "Id": 9638,
      "type": "Shock",
      "Name": "Shock",
      "Description": null,
      "IsEnabled": true,
      "CreatedByUserId": "79a42304-7584-4d9a-866a-bc5107ee40de",
      "CreatedDate": "2021-01-28T21:26:31.34Z",
      "UpdatedDate": "2021-01-29T19:28:04.853Z",
      "UpdatedByUserId": "79a42304-7584-4d9a-866a-bc5107ee40de"
    },
    "AlertProfileId": 5442,
    "AlertTriggerId": 9638,
    "IsClosed": true
  },
  "EntryTimeEpoch": 1612464878000,
  "EntryTimeUtc": "2021-02-04T18:54:38",
  "Cellular": {
    "SignalStrength": "Fair",
    "Dbm": -86
  },
  "Temperature": {
    "Celsius": 23.38445281982422,
    "Fahrenheit": 74.0920181274414
  },
  "ProbeTemperature": {
    "Celsius": 32,
    "Fahrenheit": 89.5999984741211
  },
  "Pressure": {
    "Psi": 214.87583923339844,
    "Atmospheric": 14.621435165405273
  },
  "Humidity": {
    "Percentage": 26.359960556030273
  },
  "Weather": {
    "Temperature": {
      "Celsius": 3.3800048828125,
      "Fahrenheit": 38.084007263183594
    },
    "Wind": null
  },
  "Accelerometer": {
    "G": 0.9299999962058119,
    "X": 0,
    "Y": 0,
    "Z": 0.9300000071525574
  },
  "Light": {
    "Lux": 181.15
  },
  "MinLight": {
    "Lux": null
  },
  "MaxLight": {
    "Lux": null
  },
  "Battery": {
    "Percentage": 87,
    "IsCharging": false
  },
  "Shock": {
    "G": 51.48000028834013,
    "X": 51.47999954223633,
    "Y": 0,
    "Z": 0
  },
  "ShockTime": "2021-02-04T18:44:36Z",
  "Shipment": null,
  "AccountId": 123,
  "DeviceId": "000000000000000000000001",
  "DeviceName": "VD0001",
  "ShipmentId": null,
  "PublicShipmentId": null,
  "Location": {
    "Name": null,
    "Latitude": 42.380505,
    "Longitude": -71.079871,
    "FormattedAddress": "56 Roland Street, Massachusetts 02129, United States",
    "Address": null,
    "LocationMethod": "cell",
    "Accuracy": {
      "Meters": 22,
      "Kilometers": 0.022,
      "Miles": 0.01367020020629575,
      "Feet": 72.17847769028872
    }
  }
}

Data Properties

The following two sections outline how to access every field available via a webhook payload. Additionally, each line item is how a property should be referenced in your webhook templates.

Device Properties

Accelerometer.X
Accelerometer.Y
Accelerometer.Z
AccountId
Battery.IsCharging
Battery.Percentage
Cellular.Dbm
Cellular.SignalStrength
DeviceId
DeviceName
EntryTime.Epoch
EntryTime.Utc
EntryTime.FormalUtc
Humidity.Percentage
Light.Lux
Location.FormattedAddress
Location.Latitude
Location.Longitude
Location.Accuracy
Location.Accuracy.Meters
Location.Accuracy.Kilometers
Location.Accuracy.Miles
Location.Accuracy.Feet
Pressure.Atmospheric
Pressure.Psi
ShipmentId
Temperature.Celsius
Temperature.Fahrenheit
Weather.Temperature.Celsius
Weather.Temperature.Fahrenheit
Weather.Wind.Degree
Weather.Wind.Speed

Alert Properties

Alert.AccountId
Alert.DeviceId
Alert.DeviceName
Alert.EntityName
Alert.ShipmentId
Alert.AlertType
Alert.AlertProfileId
Alert.AlertTriggerId
Alert.IsClosed
Alert.Trigger.Id
Alert.Trigger.Type
Alert.Trigger.Name
Alert.Trigger.Description
Alert.Trigger.IsEnabled
Alert.Trigger.CreatedByUserId
Alert.Trigger.UpdatedByUserId
Alert.Trigger.CreatedDate
Alert.Trigger.UpdatedDate
# Replace <#> in the following entries with a 0 based index 
# Example: Alert.Details.0.DateTime
Alert.Details.<#>.DateTime
Alert.Details.<#>.Reasons
Alert.Details.<#>.Location.Latitude
Alert.Details.<#>.Location.Longitude
Alert.Details.<#>.Location.FormattedAddress
Alert.Details.<#>.Location.Method
Alert.Details.<#>.Location.Accuracy
Alert.Details.<#>.Location.Accuracy.Meters
Alert.Details.<#>.Location.Accuracy.Kilometers
Alert.Details.<#>.Location.Accuracy.Miles
Alert.Details.<#>.Location.Accuracy.Feet
# Depending on alert value
Alert.Details.<#>.Value.Battery.Percentage
Alert.Details.<#>.Value.Battery.IsCharging
Alert.Details.<#>.Value.Connection
Alert.Details.<#>.Value.Humidity.Percentage
Alert.Details.<#>.Value.Light.Lux
Alert.Details.<#>.Value.Pressure.Psi
Alert.Details.<#>.Value.Pressure.Atmospheric
Alert.Details.<#>.Value.MinutesLate
Alert.Details.<#>.Value.HoursStopped
Alert.Details.<#>.Value.ShockCount
Alert.Details.<#>.Value.Temperature.Celsius
Alert.Details.<#>.Value.Temperature.Fahrenheit