Skip to content

Data Format Definition

This section outlines the data format of each message type defined in "Data Format Overview".
Current Version: V 1.0.0.

Online/Offline Event

Device status information such as online, offline, and reconnection.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumDevice onlineY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectY
FieldTypeDescription
valueInteger 0 - Offline
1 - Online
2 - Reonline

Example:

json
{
    "productKey": "p12345",
    "deviceKey": "1234567890",
    "type": "ONLINE",
    "createdAt": 1609316592000,
    "ticket": "5f9924d171977c33bc5ad1b1",
    "gateway": {
        "productKey": "p12344",
        "deviceKey": "1234567891"
    },
    "data": {
        "value": 1
    }
}

Device and Module Status

Device and module status information such as battery level, voltage, signal strength, version, ICCID, etc.

FieldTypeDescription
productKeyStringProductKey
deviceKeyStringDeviceKey
typeEnumDevice and module status
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.
ticketStringTicket ID
gatewayJSON ObjectGateway details
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON Object
FieldTypeDescription
packetIdIntegerUplink and downlink data package ID.
kvJSON Object The changed status property.
(battery, voltage, signal_strength, memory_free, rsrp, rsrq, snr, type, version, mcu_version, cell_id, icc_id, mcc, mnc, lac, phone_num, sim_num)
See the List of Status Fields below. The number of reported fields is not fixed.

Example:

json
{
    "productKey": "p12345",
    "deviceKey": "1234567890",
    "type": "STATUS",
    "createdAt": 1609316592000,
    "ticket": "5f9924d171977c33bc5ad1b1",
    "data": {
        "packetId": 3,
        "kv": {"battery": "20", "voltage": "4"}
    }
}

List of Status Fields

CategoryNameKey
Device StatusBattery Levelbattery
Voltagevoltage
Signal Strengthsignal_strength
Free Memory Leftmemory_free
Reference Signal Received Power rsrp
LTE Reference Signal Received Qualityrsrq
Signal to Interference plus Noise Ratiosnr
Module StatusModule Modeltype
Firmware Versionversion
MCU Versionmcu_version
Basestation IDcell_id
ICCIDicc_id
Mobile Country Codemcc
Mobile Network Codemnc
Location Area Codelac
Phone Numberphone_num
SIM Card Numbersim_num
SDK Versionsdk_ver
Positioning Support Featurelocator

Device Command Response Data

The status information of commands issued to the device, including statuses such as success and failure.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumREQACKY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket ID generated by Snowflake algorithm.Y
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectY
FieldTypeDescription
sentAtLong Integer type. Timestamp when the command was sent to the device. Unit: ms.
statusEnum succ - Successful
fail - Failed

Example:

json
{
  "productKey": "p12345",
  "deviceKey": "1234567890",
  "type": "REQACK",
  "createdAt": 1609316592000,
  "ticket": "23924d171977c121325ad1bf",
  "gateway": {
    "productKey": "p12344",
    "deviceKey": "1234567891"
  },
  "data": {
    "sentAt": 1609316592000,
    "status": "succ"
  }
}

Device Information Change

Information about changes to the device, such as addition, modification, deletion, reset, authentication, activation, and de-registration.

FieldNameTypeRequiredDescription
typeEvent typeStringYFixed to META_EVENT
ticketTicket IDStringNThis field is required if the operation type is activation, authentication or de-registration. Otherwise, it is optional.
subtypeType of operation objectStringYFixed to DEVICE, which indicates that the operation applies to device.
operationSpecific operationStringY ADD - Add a device
UPDATE - Update device information
DELETE - Delete a device
RESET - Reset a device
AUTH - Authenticate a device
ACTIVE - Activate a device
LOGOFF - Deregister a device
productKeyProductKeyStringY
deviceKeyDeviceKeyStringY
createdAtTimestamp of the operationLongYInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.
gatewayGateway informationJSON ObjectNGateway information displayed during operations such as resetting/authenticating/deregistering gateway sub-devices.
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectN
Add/Delete/Activate/Authenticate/Deregister a Device
FieldTypeDescription
deviceNameStringDevice name
snStringSN
Modify
FieldTypeDescription
deviceNameJSON ObjectInformation about the modification of the device name
FieldTypeDescription
oldStringPrevious device name
newStringNew device name
snJSON ObjectInformation about the modification of the SN.
FieldTypeDescription
newStringNew device SN
timeOffsetJSON ObjectTime zone modification information
FieldTypeDescription
oldStringPrevious time zone offset
newStringNew time zone offset

Example of adding/deleting a device:

json
{
    "productKey": "p11376",
    "deviceKey": "132456",    
    "type": "META_EVENT",
    "subtype": "DEVICE",
    "operation": "ADD/DELETE",
    "createdAt": 1616375484482,
    "ticket": "1032330579905388544",
    "data": {
        "deviceName": "123789",
        "sn": null
    }
}

Example of activating/authenticating/de-registering a device:

json
{
  "productKey": "p11376",
  "deviceKey": "132456",
  "type": "META_EVENT",
  "subtype": "DEVICE",
  "ticket": "1032330579905388544",
  "operation": "AUTH/ACTIVEL/LOGOFF",
  "createdAt": 1616375484482,
  "gateway": {
    "productKey": "p11371",
    "deviceKey": "112456"
  },
  "data": null
}

Example of modifying a device:

json
{
    "productKey": "p11376",
    "deviceKey": "132456",
    "type": "META_EVENT",
    "subtype": "DEVICE",
    "operation": "UPDATE",
    "createdAt": 1616375484482,
    "ticket": "1032330579905388544",
    "data": {
        "deviceName": {
            "old": "Previous device name",
            "new": "New device name"
        },
        "sn": {
            "new": "New SN"
        },
        "timeOffset": {
            "old": "+06:00",
            "new": "+08:00"
        }
    }
}

Example of resetting a device:

json
{
    "productKey": "p11376",
    "deviceKey": "132456",
    "type": "META_EVENT",
    "subtype": "DEVICE",
    "operation": "RESET",
    "createdAt": 1616375484482,
    "data": null,
    "ticket": "1032330579905388544",
    "gateway": {
        "productKey": "p11371",
        "deviceKey": "112456"
    }
}

Device Binding Information Change

Data triggered by changes to end-user device binding information.

FieldNameTypeRequiredDescription
productKeyProductKeyStringY
deviceKeyDeviceKeyStringY
deviceNameDevice nameStringN
typeTypeStringYFixed to ENDUSER
subtypeSub-typeStringYFixed to USER-BIND
ticketTicket IDStringY
createdAtCreation timeLongYOperation timestamp. Unit: ms
data JSON ObjectY
FieldTypeDescription
endUserIdStringEnd user ID
endUserDomainStringEnd user domain
valueInteger 0 - Delete a device (Unbind, de-registered by the user, deleted by sharer, deleted by sharing recipient, and delete a device from group)
1 - Add a device (Bind, share, and add a device to group)
2 - Device expires (Device reset)
authStatusIntegerAuthentication status.
1 - True authentication
2 - Pseudo authentication
authLevelIntegerPermission level.
1 - Owner
2 - Sharer
invalidCauseInteger Reason for deletion/expiration:
1 - Device unbound
2 - Device reset
3 - Sharing expired
4 - Sharing canceled
5 - Sharing overwritten
6 - Device added to the group
7 - Device removed from the group
8 - Changed from true authentication to pseudo authentication for the device
9 - Changed from pseudo authentication to true authentication for the device
10 - Sub-device disconnected from the gateway
11 - Sub-device connected to the gateway
12 - User removed from the home
openIdStringUnique ID of the user from a third-party user platform

Example:

json
{
    "type": "ENDUSER",
    "subtype": "USER-BIND",
    "deviceKey": "132456",
    "productKey": "p11376",
    "createdAt": 1616375484482,
    "deviceName": "device",
    "ticket": "23924d171977c121325ad1bf",
    "data": {
        "endUserId": "11376",
        "endUserDomain": "C.DM.5715.1",
        "value":1
    }
}

Device data reported through the transparent transmission channel under the products using either TSL model or the transparent transmission data format.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumRAWY
subtypeEnumUPLINKY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
ticketStringTicket IDY
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
rawString base64 encoded string

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "RAW",
  "subtype": "UPLINK",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "data": {
    "packetId": 3,
    "raw": "YSBtZXNzYWdl"
  }
}

Downlink control command data sent through the transparent transmission channel under the product using either TSL model or transparent transmission data format.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumRAWY
subtypeEnumDOWNLINKY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectY
FieldTypeDescription
rawString base64 encoded string

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "RAW",
  "subtype": "DOWNLINK",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "data": {
    "raw": "YSBtZXNzYWdl"
  }
}

TSL Model - Property

Device uplink and downlink data for the product using the TSL model data format.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMATTRY
subtypeEnumREADY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectY
FieldTypeDescription
keysarray Set of feature IDs.

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MATTR",
  "subtype": "READ",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "data": {
    "keys": [
      "code1",
      "code2"
    ]
  }
}

**MATTR READRESP: TSL Model - **Response to Read Command

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMATTRY
subtypeEnumREADRESPY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
kvJSON Object Property key-value pair

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MATTR",
  "subtype": "READRESP",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "data": {
    "packetId": 3,
    "kv": {
      "numberKey": "10.2",
      "boolKey": true,
      "enumKey": "1"
    }
  }
}

Description: When the Developer Center pushes messages, the numeric field values (defined in the TSL model as INT, FLOAT, DOUBLE, and ENUM) are all pushed as strings. The recipient can convert the values to a numeric format as needed based on the TSL model definition.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMATTRY
subtypeEnumWRITEY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectY
FieldTypeDescription
kvJSON Object Property key-value pair

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MATTR",
  "subtype": "WRITE",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "data": {
    "kv": {
      "code1": "1",
      "code2": "3"
    }
  }
}

MATTR REPORT: TSL Model - Report

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMATTRY
subtypeEnumREPORTY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
extDataJSON ObjectReserved feature information, which is in key-value pair format.N
FieldTypeDescription
occurredAtString Reserved field. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
kvJSON Object Property key-value pair

Example:

json
{
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MATTR",
  "subtype": "REPORT",
  "createdAt": 1609316592000,
  "ticket": "5f9924d171977c33bc5ad1b1",
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "extData": {
    "occurredAt": "1652433712899"
  },
  "data": {
    "packetId": 5,
    "kv": {
      "numberKey": "10.2",
      "boolKey": true,
      "enumKey": "1"
    }
  }
}

Description: When the Developer Center pushes messages, the numeric field values (defined in the TSL model as INT, FLOAT, DOUBLE, and ENUM) are all pushed as strings. The recipient can convert the values to a numeric format as needed based on the TSL model definition.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumRAWY
subtypeEnumUPLINKY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
gatewayJSON ObjectGateway details N
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
ticketStringMessage IDY
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
rawString base64 encoded string

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "RAW",
  "subtype": "UPLINK",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "data": {
    "packetId": 3,
    "raw": "YSBtZXNzYWdl"
  }
}

Description: The transparent transmission data value is Base64 encoded.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumRAWY
subtypeEnumDOWNLINKY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway details N
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON ObjectY
FieldTypeDescription
rawString base64 encoded string

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "RAW",
  "subtype": "DOWNLINK",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "data": {
    "raw": "YSBtZXNzYWdl"
  }
}

Description: The transparent transmission data value is Base64 encoded.

TSL Model - Event Reporting - Information

Event information reported by devices under the product that uses the TSL data format and defines the level as INFO.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMEVENTY
subtypeEnumINFOY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
extDataJSON ObjectReserved feature information, which is in key-value pair format.N
FieldTypeDescription
occurredAtString Reserved filed. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
codeString Message Identifier
kvJSON Object Key-value pair

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MEVENT",
  "subtype": "INFO",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "extData": {
    "occurredAt": "1652433712899"
  },
  "data": {
    "packetId": 3,
    "code": "event_code3",
    "kv": {
      "numberKey": "0.26",
      "boolKey": true,
      "enumKey": "1"
    }
  }
}

Description: When the Developer Center pushes messages, the numeric field values (defined in the TSL model as INT, FLOAT, DOUBLE, and ENUM) are all pushed as strings. The recipient can convert the values to a numeric format as needed based on the TSL model definition.

TSL Model - Event Reporting - Alert

Select event information reported by devices under products that use the TSL model data format and define the level as WARN.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMEVENTY
subtypeEnumWARNY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
extDataJSON ObjectReserved feature information, which is in key-value pair format.N
FieldTypeDescription
occurredAtString Reserved filed. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
codeString Message indentifier
kvJSON Object Key-value pair

Example

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MEVENT",
  "subtype": "ERROR",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "extData": {
    "occurredAt": "1652433712899"
  },
  "data": {
    "packetId": 3,
    "code": "event_code3",
    "kv": {
      "numberKey": "10.3",
      "boolKey": true,
      "enumKey": "1"
    }
  }
}

Description: When the Developer Center pushes messages, the numeric field values (defined in the TSL model as INT, FLOAT, DOUBLE, and ENUM) are all pushed as strings. The recipient can convert the values to a numeric format as needed based on the TSL model definition.

TSL Model - Event Reporting - Fault

Event information reported by devices under the product that uses the TSL model data format and defines the level as ERROR.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMEVENTY
subtypeEnumERRORY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
extDataJSON ObjectReserved feature information, which is in key-value pair format.N
FieldTypeDescription
occurredAtString Reserved field. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
codeString Message identifier
kvJSON Object Key-value pair

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MEVENT",
  "subtype": "ERROR",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": " 2345678901234"
  },
  "extData": {
    "occurredAt": "1652433712899"
  },
  "data": {
    "packetId": 3,
    "code": "event_code3",
    "kv": {
      "numberKey": "10.3",
      "boolKey": true,
      "enumKey": "1"
    }
  }
}

Description: When the Developer Center pushes messages, the numeric field values (defined in the TSL model as INT, FLOAT, DOUBLE, and ENUM) are all pushed as strings. The recipient can convert the values to a numeric format as needed based on the TSL model definition.

TSL Model - Service Calling Logs

The service data sent by devices under the product that uses the TSL model data format.

FieldTypeDescriptionRequired
productKeyStringProductKeyY
deviceKeyStringDeviceKeyY
typeEnumMSERVY
subtypeEnumINPUT/OUTPUTY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.Y
ticketStringTicket IDY
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
extDataJSON ObjectReserved feature information, which is in key-value pair format.N
FieldTypeDescription
occurredAtString Reserved field. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeDescription
packetIdInteger Uplink and downlink data package ID
codeString Service identifier
kvJSON Object Input parameters

Example:

json
{
  "ticket": "5f9924d171977c33bc5ad1b1",
  "productKey": "p111KY",
  "deviceKey": "1234567890123",
  "type": "MSERV",
  "subtype": "INPUT",
  "createdAt": 1609316592000,
  "gateway": {
    "productKey": "p111KY",
    "deviceKey": "2345678901234"
  },
  "extData": {
    "occurredAt": "1652433712899"
  },
  "data": {
    "packetId": 3,
    "code": "serv_code",
    "kv": {
      "numberKey": "12",
      "boolKey": false
    }
  }
}

Description: When the Developer Center pushes messages, the numeric field values (defined in the TSL model as INT, FLOAT, DOUBLE, and ENUM) are all pushed as strings. The recipient can convert the values to a numeric format as needed based on the TSL model definition.

Device Positioning - Query Positioning Information

The sent downlink data of device positioning.

FieldTypeDescription
productKeyStringProductKey
deviceKeyStringDeviceKey
typeEnumLOCATION
subtypeEnumQUERY
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.
ticketStringTicket ID
dataJSON Object
FieldTypeDescription
packetIdInteger Data package ID
keysArray Collection of setting modes (may be empty)

Example:

json
{
    "ticket": "5f9924d171977c33bc5ad1b1",
    "productKey": "p111KY",
    "deviceKey": "1234567890123",
    "type": "LOCATION",
    "subtype": "QUERY",
    "createdAt": 1609316592000,
    "data": {
        "packetId": 1,
        "keys": []
    }
}

Device Positioning - Raw Data

Device-reported positioning data based on NMEA protocol.

FieldTypeDescriptionRequired
productKeyStringProductKey
deviceKeyStringDeviceKey
typeEnumLOCATION
subtypeEnumINFO-RAW
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.
ticketStringTicket ID
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON Object
FieldTypeDescription
packetIdInteger Data package ID
rawString Raw positioning data. For GNSS information format, see NMEA-0183 protocol sentence. LBS is custom:
$LBS,<1>,<2>,<3>,<4>,<5>,<6>*hh<\CR><\LF>
<1> - MCC of base station
<2> - MNC of base station
<3> - LAC of base station
<4> - Cell ID of base station
<5> - RxLev of base station
<6> - Reserved

Example:

json
{
    "ticket": "5f9924d171977c33bc5ad1b1",
    "productKey": "p111KY",
    "deviceKey": "1234567890123",
    "type": "LOCATION",
    "subtype": "INFO-RAW",
    "createdAt": 1609316592000,
    "gateway": {
      "productKey": "p12344",
      "deviceKey": "1234567891"
    },
    "data": {
        "packetId": 5,
        "raw": [
            "$GNGGA,095528.000,2318.1133,N,11319.7210,E,1,06,3.7,55.1,M,-5.4,M,,0000*69",
            "$BDGGA,062938.00,3110.4700719,N,12123.2657056,E,1,25,0.6,58.9666,M,0.000,M,99,AAAA*4"
        ]
    }
}

Device Positioning Information

The positioning data reported by the device is parsed by Developer Center based on the NMEA protocol.

The device positioning data supports two methods: GPS and LBS. By default, only GPS data is pushed. If LBS data is required, please contact our sales team.

If the returned data is in array format, it will be sent as multiple INFO-KV entries.

FieldTypeDescriptionRequired
productKeyStringProductKey
deviceKeyStringDeviceKey
typeEnumLOCATION
subtypeEnumINFO-KV reports raw or non-raw positioning data.
createdAtLongInteger type. Timestamp indicating the exact time the message was generated. Unit: ms.
ticketStringTicket ID
gatewayJSON ObjectGateway detailsN
FieldTypeDescription
productKeyStringGateway ProductKey
deviceKeyStringGateway DeviceKey
dataJSON Object
FieldTypeDescription
packetIdInteger Data package ID
typeString Positioning type: GP/GL/GA/GN/BD/LBS/WIFI
subTypeString Positioning subtype: BD/GL (Russia)/GP (America)/GA (Europe)/GN (GP + BD)/LBS/WIFI
kvJSON Object Parsed positioning information. Default coordinate system is wgs84.
ggaStatus: GGA-specific; 0=Initialization; 1=GPS SPS Mode; 2=Differential GPS, SPS Mode; 3=Invalid PPS; 4=Fix RTK; 5=Float RTK; 6=Estimated (dead reckoning) Mode; 7=Manual Input Mode; 8=Simulator Mode; 9=WAAS differential.
lat - Latitude in ddmm.mmmm format. Unit: minute.
lng - Longitude in dddmm.mmmm format. Unit: minute.
hdop - Horizontal accuracy. Range: 0.5 – 99.9.
latType - N (North latitude) or S (South latitude)
lngType - E (East longitude) or W (West longitude)
height - Altitude. Unit: meter.

Example:

json
{
    "ticket": "5f9924d171977c33bc5ad1b1",
    "productKey": "p111KY",
    "deviceKey": "1234567890123",
    "type": "LOCATION",
    "subtype": "INFO-KV",
    "createdAt": 1609316592000,
    "gateway": {
      "productKey": "p12344",
      "deviceKey": "1234567891"
    },
    "data": {
        "packetId": 5,
        "type": "GP/LBS",
        "subType": "BD(GGA)/LBS",
        "kv": {
            "satellites": "40",         //The number of currently used satellites.
            "ggaStatus": "4",           //Fix quality (GGA-specific)
            "lat": "3959.6107085",      //Latitude (Unit: ddmm.mmmmmmm)
            "lng": "11619.6423341",     //Longitude (Unit: ddmm.mmmmmmm)
            "wgs_84": {
                "lat": 39.99351180833333,     //Latitude (Unit: degree)
                "lng": 116.32737223500001     //Longitude (Unit: degree)
            },
            "gcj_02": {
                "lat": 39.994825423430167,     //Latitude (Unit: degree)
                "lng": 116.33351545721269      //Longitude (Unit: degree)
            },
            "bd_09": {
                "lat": 40.00050264255087,    //Latitude (Unit: degree)
                "lng": 116.340146904483      //Longitude (Unit: degree)
            },
            "latType": "N/S",            //Latitude hemisphere
            "lngType": "W/E",            //Longitude hemisphere
            "hdop": "0.99",              //Horizontal dilution of precision
            "accuracy": "550",           //Accuracy, which is available only for LBS.
            "locateTime": 1609316592000, //Positioning time (UTC time).
            "height": "66.7717"          //Altitude (in meters)
        }
    }
}

Product Information Change

Changes in product information: addition, modification, or deletion.

FieldNameTypeRequiredDescription
typeEvent typeStringYFixed to META_EVENT
subtypeOperation object typeStringYFixed to PRODUCT, indicating that the operation applies to product.
operationSpecific operationStringY ADD - Add a product
UPDATE - Update product information
DELETE - Delete a product
productKeyProductKeyStringY
createdAtOperation timestampLongYOperation timestamp (Unit: ms)
dataJSON ObjectYProduct details
Add/Delete a Product
FieldTypeDescription
productNameStringProduct name
productTypeInteger0 - Small batches
1 - Large batches
accessTypeIntegerAccess type.
0 - Device
1 - Gateway
dataFmtInteger 0 - Transparent tansmission/Custom
3 - JSON (Standard data format)
protocolInteger 1 - MQTT
2 -- LwM2M/CoAP
logoPathStringDownload address of logo
moduleTypeStringModule type
moduleNameStringModule name
moduleIdLongModule ID
allowedLimitIntegerThe number of activation codes
productStatusIntegerProject status.
0 - In development
3 - Published
9 - Error
projectIdLong Project ID
createTimeLong Creation time in timestamp. Unit: ms.
updateTimeLongUpdate time in timestamp. Unit: ms.
itemCodeStringAssociated product category ID (obtained through the interface of product category query) .
Modification information of product name
FieldTypeDescription
productNameJSON ObjectInformation about the modification of the product name
FieldTypeDescription
oldStringPrevious product name
newStringNew product name

Example of adding a product:

json
{
    "type": "META_EVENT",
    "subtype": "PRODUCT",
    "operation": "ADD",
    "createdAt": 1616375484482,
    "operator": 1,
    "operatorType": 1,
    "productKey": "p00001",
    "data": {
        "productName": "Product Sample",
        "productType": 0,
        "accessType": 1,
        "netWay": "1",
        "dataFmt": 1,
        "protocol": 1,
        "logoPath": "https://xxxx.com/abcdfg.jpeg",
        "moduleType": null,
        "moduleName": null,
        "moduleId": null,
        "allowedLimit": 3,
        "productStatus": 0,
        "projectId": 1,
        "createTime": 1615787274000,
        "updateTime": 1615789235000,
        "itemCode": "anfang"
    }
}

Example of modifying a product:

json
{
    "type": "META_EVENT",
    "subtype": "PRODUCT",
    "operation": "UPDATE",
    "createdAt": 1616375484482,
    "operator": 1,
    "operatorType": 1,
    "productKey": "p00001",
    "data": {
        "productName": {
            "old": "Previous product name",
            "new": "New product name"
        }
    }
}

Product Authorization Information

Changes in product authorization information: authorization or authorization cancellation.

FieldNameTypeRequiredDescription
typeEvent typeStringYFixed to META_EVENT
subtypeOperation object typeStringYFixed to GRANT_AUTHORIZED, indicating product authorization operations.
operationSpecific operationStringY AUTH - Authorize a product
CANCEL_AUTH - Deauthorize a product
ProductKeyProductKeyStringY
createdAtOperation timestampLongYOperation timestamp (Unit: ms)
dataJSON ObjectYProduct authorization details
Product Authorization/Authorization Cancellation
FieldTypeDescription
productNameStringProduct name
productTypeInteger0 - Small batches
1 - Large batches
accessTypeIntegerAccess type.
0 - Device
1 - Gateway
dataFmtInteger 0 - Transparent transmission/Custom
3 - JSON (Standard data format)
protocolInteger 1 - MQTT
2 -- LwM2M/CoAP
logoPathStringDownload address of logo
moduleTypeStringModule type
moduleNameStringModule name
moduleIdLongModule ID
allowedLimitIntegerThe number of activation codes
productStatusIntegerProject status.
0 - In development
3 - Published
9 - Error
projectIdLong Project ID
createTimeLong Creation time in timestamp. Unit: ms.
updateTimeLongModification time in timestamp. Unit: ms.
itemCodeStringAssociated product category ID (obtained with the interface of product category query).
netWayStringNetwork connection method: 1-Wi-Fi, 2-Cellular network, 3-NB-IoT, 4-BT/BLE

Example of product authorization:

json
{
   "createdAt": 1665280943221,
   "data": {
   	"moduleType": null,
   	"dataFmt": 3,
   	"itemCode": "socket",
   	"logoPath": null,
   	"moduleName": null,
   	"netWay": "2",
   	"productStatus": 0,
   	"allowedLimit": 100,
   	"updateTime": 1665286595000,
   	"productName": "socket",
   	"accessType": 0,
   	"protocol": null,
   	"createTime": 1665285584000,
   	"moduleId": null,
   	"projectId": 11338,
   	"productType": 0
   },
   "operation": "AUTH",
   "productKey": "p119Cx",
   "subtype": "GRANT_AUTHORIZED",
   "type": "META_EVENT"
}

User domain (App) Authorization Information

Changes in User domain (App) authorization information: authorization or authorization cancellation.

FieldNameTypeRequiredDescription
typeEvent typeStringYFixed to META_EVENT
subtypeOperation object typeStringYFixed to GRANT_USER_DOMAIN
operationSpecific operationStringY AUTH - Authorize a User domain(App)
CANCEL_AUTH - Deauthorize a User domain (App)
userDomainUser domain (App)StringY
userDomainIdUser domain IDLongY
createdAtOperation timestampLongYOperation timestamp (Unit: ms)
dataJSON ObjectYApp authorization details
FieldTypeDescription
appNameStringApp name corresponding to the user domain
json
{
 "type": "META_EVENT",
 "subtype": "GRANT_USER_DOMAIN",
 "operation": "AUTH",
 "userDomain": "C.DM.5503.34",

 "userDomainId": 12345645656456,
 "createdAt": 1665280943221,
 "data": {
   "appName": "test"
 }
}

TSL Model Release Information Change

Newly-released TSL model information.

FieldNameTypeRequiredDescription
subtypeOperation object typeStringYFixed to THING_MODEL indicating that the operation subject applies to a TSL model.
operationSpecific operationStringYRELEASE- Release the TSL model
ProductKeyPKStringY
createdAtOperation timestampLongYOperation timestamp (Unit: ms)
data StringY
typeEvent typeJSON ObjectYFixed to META_EVENT
FieldTypeDescription
tslJsonJSON ObjectJSON data after the TSL model is released

Example:

json
{
    "type": "META_EVENT",
    "subtype": "THING_MODEL",
    "operation": "RELEASE",
    "productKey": "p11374",
    "operator": 26984,
    "operatorType": 1,
    "createdAt": 1616375484482,
    "data": {
        "tslJson": {
            "profile": {
              "version": "20210406093313373",
                "productKey": "p1137H"
            },
            "properties": [
                {
                    "code": "202104011545",
                    "dataType": "BOOL",
                    "desc": "",
                    "id": 1,
                    "name": "202104011545",
                    "specs": [
                        {
                            "dataType": "BOOL",
                            "name": "TRUE",
                            "value": "true"
                        },
                        {
                            "dataType": "BOOL",
                            "name": "FALSE",
                            "value": "false"
                        }
                    ],
                    "subType": "RW",
                    "type": "PROPERTY"
                },
                {
                    "code": "202104011700",
                    "dataType": "DOUBLE",
                    "desc": "",
                    "id": 2,
                    "name": "202104011700",
                    "specs": {
                        "max": "2",
                        "min": "1",
                        "step": "1",
                        "unit": "°"
                    },
                    "subType": "RW",
                    "type": "PROPERTY"
                },
                {
                    "code": "202104011501",
                    "dataType": "TEXT",
                    "desc": "",
                    "id": 3,
                    "name": "202104011501",
                    "specs": {
                        "length": 123
                    },
                    "subType": "RW",
                    "type": "PROPERTY"
                }
            ]
        }
    }
}

End-user Information Change

Changes in end-user information: creation, modification, or deletion.

End-user information changes require creating end-user subscriptions via OpenAPI.

FieldNameTypeRequiredDescription
typeEvent typeStringYFixed to ENDUSER
subtypeSubtypeStringY USER-ADD - Add an end-user
USER-UPDATE - Update end-user's information
USER-DELETE - Delete an end-user
ticketTicket IDStringYUnique message code
createdAtCreation timeLongYOperation timestamp (Unit: ms)
data JSON ObjectY
FieldTypeDescription
endUserIdStringEnd-user ID
endUserDomainStringEnd-user domain
internationalCodeStringMobile country code
phoneStringPhone Number
emailStringEmail address
wechatIdStringWeChat ID
openIdStringUnique ID of the user from a third-party user platform

Example:

json
{
    "ticket": "b18be821-5045-4467-801d-ca68c302dc3d",
    "type": "ENDUSER",
    "subtype": "USER-DELETE",
    "createdAt": 1642471712433,
    "data": {
        "endUserId": "C1",
        "endUserDomain": "C.DM.1.15"
    }
}

Rule Engine Event

Rule engine push messages.

FieldNameTypeRequiredDescription
typeEvent typeStringYFixed to CEP_RULE.
subtypeSubtypeStringYFixed to NOTICE.
traceIdAction trace IDStringYAction trace ID.
createdAtCreation TimeLongYOperation timestamp. Unit: ms.
dataJSON ObjectY
FieldTypeDescription
extraStringOptional extension field for custom parameters defined during rule creation.
rawObjectDevice uplink data that triggers the rule.
FieldTypeDescription
ticketStringTicket ID.
productKeyStringProductKey
deviceKeyStringDeviceKey
typeStringMessage type. MATTR: TSL model property. MEVENT: TSL model event.
createdAtLongMessage creation time. Unit: ms
attrsObjectTSL property data that triggers the rule, required when the type is MATTR.
eventsArrayTSL event data that triggers the rule, required when the type is MEVENT.

Example:

json
{
  "traceId": "1228299096116822016",
  "type": "CEP_RULE",
  "subtype": "NOTICE",
  "createdAt": 1713249972992,
  "data": {
    "extra": "{\"key\",\"value\"}",
    "raw": {
      "ticket": "1228217775206039552",
      "productKey": "p113C1",
      "deviceKey": "8686202300000001",
      "type": "MATTR",
      "createdAt": 1713249972997,
      "attrs": {
        "kv": {
          "Temperature": 50,
          "struct": {
            "date": 1690449531456
          },
          "array_int": [1],
          "array_struct": [
            {
              "date": "1690449531456"
            }
          ]
        }
      },
      "events": [
        {
          "code": "BatteryWarning",
          "kv": {
            "Temperature": 50,
            "struct": {
              "date": 1690449531456
            },
            "array_int": [1],
            "array_struct": [
              {
                "date": "1690449531456"
              }
            ]
          }
        }
      ]
    }
  }
}