Device Reports Common Schema

Common Schema Structure

This document outlines the common schema structure for data reports generated by Sensos devices, including the Sensos Label.

While the basic schema remains consistent, the JSON structure and data fields can be customized according to specific customer requirements. This flexibility allows customers to tailor the data delivery to fit their system's needs.

Below is an example of the common JSON report structure used in data delivery:

Example JSON Report

{
  "messageId": "c961ea64-9e56-4e31-b563-de8ece738370",
  "deviceId": "351521100750611",
  "accountId": "83298196-0d7a-4f45-9a06-a3e92c35a090",
  "timestamp": "2023-03-18T23:56:32Z",
  "type": "SensosLabelMessage",
  "messageCount": 89,
  "device": {
    "partNumber": "SLS-10001F-00-B-00",
    "softwareVersion": "1.4"
  },
  "location": {
    "latitude": 50.00350791,
    "longitude": 22.05932459,
    "accuracy": 568,
    "source": "Cellular",
    "country": "Poland"
  },
  "trigger": {
    "main": "TemperatureAlert",
    "list": [
      "TemperatureAlert",
      "Static",
      "SavedReport"
    ]
  },
  "sensors": {
    "deviceTemperature": 10.0,
    "humidity": 52.3,
    "isSealClosed": true,
    "isLightBreached": false,
    "accelerometer": {
      "xAxis": 0,
      "yAxis": 32,
      "zAxis": 976
    }
  },
  "features": {
    "shock": {
      "timestamp": "2023-03-18T23:56:32Z",
      "counter": 2,
      "magnitude": 12.4,
      "duration": 40,
      "magnitudeThreshold": 10000,
      "durationThreshold": 80
    }
  },
  "battery": {
    "voltage": 2989,
    "percentage": 87
  }
}

Sensos Label Data Report Fields

Field NameDescriptionTypeUnitsDetailed DescriptionNullable
messageIdSensos Label message IDString

A unique ID for a specific message sent from the Sensos label.No
deviceIdSensos Label device IDInteger

The Sensos label ID is its IMEI number, used to identify the specific label sending the message.No
accountIdSensos account IDString

A unique ID for the account the label belongs to.No
timestampMessage timeTimeISO 8601The time the message was created at the label in UTC time zone.No
typeMessage typeString

Fixed string to describe the message type. For Sensos label reports, the type is SensosLabelMessage.No
messageCountMessage counterInteger

Sequence number of the report message, incremented with every report attempt (successful or unsuccessful).No
device.partNumberDevice part numberString

The part number of the Sensos label, for example, "SLS-10001F-00-B-00".No
device.softwareVersionDevice software versionDouble

The software version of the label, for example, "1.4".No
location.latitudeLocation coordinate latitudeFloatDecimal degThe latitude of the device location.Yes
location.longitudeLocation coordinate longitudeFloatDecimal degThe longitude of the device location.Yes
location.accuracyLocation accuracy radiusIntegerMetersThe radius around the device’s location with a probability (typically 67%) determined by the algorithm.Yes
location.sourceThe location sourceString

The location source (Cellular/GPS/Wifi).Yes
location.countryMessage countryString

The country derived from the Mobile Country Code (MCC) as part of the network information.Yes
trigger.mainMessage triggerString

The main reason this report was sent, such as "TemperatureAlert" or "Movement".
All main triggers can be found below.
No
sensors.deviceTemperatureCurrent measured temperatureDecimalCelsiusThe measured temperature, with a range from -30°C to 70°C and a resolution of 0.1°C.Yes
sensors.humidityCurrent measured humidity percentageDecimalPercentageThe measured humidity level, with a range from 0% to 100% and a resolution of 0.1%.Yes
sensors.isSealClosedSeal stateBoolean

The state of the device’s seal: True (Sealed) or False (Tampered).No
sensors.isLightBreachedLight stateBoolean
The state of the device's light sensor: True (Breached) or False (Not breached). The sensor arms in darkness and flags True on the next light exposure, remaining so until it re-arms in the dark. Always False if light sensitivity is not configured.No
trigger.listTrigger listArray

List of all triggers relevant to this report, including the main trigger.No
sensors.xAxis, sensors.yAxis, sensors.zAxisAccelerometer 3D measurementIntegerMiliG (mg)Accelerometer data in 3 axes (X, Y, Z), measured in mg.No
sensors.shock.timestampShock timestampTimeISO 8601The time the shock event was detected, in UTC format.Yes
sensors.shock.counterShock counter for this reportInteger

The total number of shocks detected during an out-of-coverage time that included multiple shock events.Yes
sensors.shock.magnitudeShock magnitudeIntegerMilli-G'sThe magnitude of the detected shock, combining the 3 axes.Yes
sensors.shock.durationShock durationIntegerMillisecondsThe duration of the detected shock.Yes
sensors.shock.magnitudeThresholdShock magnitude thresholdIntegerMilli-G'sThe configured shock magnitude threshold.Yes
sensors.shock.durationThresholdShock duration thresholdIntegerMillisecondsThe configured shock duration thresholdYes
battery.voltageBattery voltageIntegermVThe measured battery voltage in millivolts. Used as a rough estimation of battery health.No
battery.percentageBattery percentageInteger

The estimated battery percentage. This feature is currently in private preview.Yes

Data Properties

Device Main Trigger Types

Activation
Static
Movement
Tampering
Shock
TemperatureAlert
HumidityAlert
StartMovement
Landing
RegainNetwork
SealApplied
TemperatureBackInRange
Takeoff
LightArm
LightBreach

Device Additional Trigger Types (listed under 'trigger.list')

Heartbeat
SavedReport

Did this page help you?