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": 5678
  }
}

Sensos Label Data Report Fields

Field Name

Description

Type

Units

Detailed Description

Nullable

messageId

Sensos Label message ID

String

-

A unique ID for a specific message sent from the Sensos label.

No

deviceId

Sensos Label device ID

Integer

-

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

No

accountId

Sensos account ID

String

-

A unique ID for the account the label belongs to.

No

timestamp

Message time

Time

ISO 8601

The time the message was created at the label in UTC time zone.

No

type

Message type

String

-

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

No

messageCount

Message counter

Integer

-

Sequence number of the report message, incremented with every report attempt (successful or unsuccessful).

No

device.partNumber

Device part number

String

-

The part number of the Sensos label, for example, "SLS-10001F-00-B-00".

No

device.softwareVersion

Device software version

Double

-

The software version of the label, for example, "1.4".

No

location.latitude

Location coordinate latitude

Float

Decimal deg

The latitude of the device location.

Yes

location.longitude

Location coordinate longitude

Float

Decimal deg

The longitude of the device location.

Yes

location.accuracy

Location accuracy radius

Integer

Meters

The radius around the device’s location with a probability (typically 67%) determined by the algorithm.

Yes

location.source

The location source

String

-

The location source (Cellular/GPS/Wifi).

Yes

location.country

Message country

String

-

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

Yes

trigger.main

Message trigger

String

-

The main reason this report was sent, such as "TemperatureAlert" or "Movement". All main triggers can be found below.

No

sensors.deviceTemperature

Current measured temperature

Decimal

Celsius

The measured temperature, with a range from -30°C to 70°C and a resolution of 0.1°C.

Yes

sensors.humidity

Current measured humidity percentage

Decimal

Percentage

The measured humidity level, with a range from 0% to 100% and a resolution of 0.1%.

Yes

sensors.isSealClosed

Seal state

Boolean

-

The state of the device’s seal: True (Sealed) or False (Tampered).

No

trigger.list

Trigger list

Array

-

List of all triggers relevant to this report, including the main trigger.

No

sensors.xAxis, sensors.yAxis, sensors.zAxis

Accelerometer 3D measurement

Integer

MiliG (mg)

Accelerometer data in 3 axes (X, Y, Z), measured in mg.

No

sensors.shock.timestamp

Shock timestamp

Time

ISO 8601

The time the shock event was detected, in UTC format.

Yes

sensors.shock.counter

Shock counter for this report

Integer

-

The total number of shocks detected during an out-of-coverage time that included multiple shock events.

Yes

sensors.shock.magnitude

Shock magnitude

Integer

Milli-G's

The magnitude of the detected shock, combining the 3 axes.

Yes

sensors.shock.duration

Shock duration

Integer

Milliseconds

The duration of the detected shock.

Yes

sensors.shock.magnitudeThreshold

Shock magnitude threshold

Integer

Milli-G's

The configured shock magnitude threshold.

Yes

sensors.shock.durationThreshold

Shock duration threshold

Integer

Milliseconds

The configured shock duration threshold

Yes

battery.voltage

Unloaded battery voltage

Integer

mV

The measured battery voltage in millivolts. Used as a rough estimation of battery health.

No


Data Properties

Device Main Trigger Types

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

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

Heartbeat
SavedReport