Webhook Data Structures

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/-",
  "FullPlatformUrl": "https://platform.tive.com/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",
    "AlertId": "23a82bc9-e882-4933-800f-041805ab00a5",
    "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
    }
  },
  "CUSTOM_FIELD_1_LABEL": "label1",
  "CUSTOM_FIELD_1_VALUE": "value1",
  "CUSTOM_FIELD_2_LABEL": "label2",
  "CUSTOM_FIELD_2_VALUE": "value2",
  "CUSTOM_FIELD_3_LABEL": "label3",
  "CUSTOM_FIELD_3_VALUE": "value3",
  "CUSTOM_FIELD_4_LABEL": "label4",
  "CUSTOM_FIELD_4_VALUE": "value4",
  "CUSTOM_FIELD_5_LABEL": "label5",
  "CUSTOM_FIELD_5_VALUE": "value5",
}

Template Properties

The fields above are also available as variables when building custom templates. More information can be found in the template variables section.