Skip to content

Data Format Definition

This section presents data format of each message type defined in Data Format Overview.
Current Version: v1.0.0.

Online And Offline Event

Reports device status: online, offline, or reconnected.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumONLINEY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product.
deviceKeyStringdeviceKey of gateway device.
dataJSON ObjectN
FieldTypeNote
valueInteger 0 - Offline
1 - Online
2 - Reconnected

Example:

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

Device And Module Status

Reports device status and module status: battery level, voltage, signal strength, firmware version and ICCID.

FieldTypeNote
productKeyStringPK
deviceKeyStringDK
typeEnumSTATUS
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.
ticketStringMessage ID.
gatewayJSON ObjectGateway details.
FieldTypeNote
productKeyStringproductKey of gateway product.
deviceKeyStringdeviceKey of gateway device.
dataJSON Object
FieldTypeNote
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 fields of device status and module status. 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

TypeNameKey
Device StatusBatterybattery
Voltagevoltage
Signal Strengthsignal_strength
Free Memory Leftmemory_free
Reference Signal Receiving Powerrsrp
Reference Signal Receiving Power Under LTErsrq
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 Supportlocator

Device Response

Reports the status of a command issued to the device: successful sending, or failed sending.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumREQACKY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage ID generated by Snowflake algorithm.Y
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product.
deviceKeyStringdeviceKey of gateway device.
dataJSON ObjectY
FieldTypeNote
sentAtLong Timestamp sent to the device. Integer type. Unit: ms.
statusEnum succ - Success
fail - Failure

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

Operations performed on device: added modified deleted, or reset.

FieldNameTypeRequiredNote
typeEvent typeStringYFixed to META_EVENT.
ticketMessage IDStringNThis field is required if the operation type is activation, authentication or de-registration. Otherwise, it is optional.
subtypeType of operation subjectStringYFixed to DEVICE indicating 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 - De-register a device
productKeyPK of the productStringY
deviceKeyUnique device codeStringY
createdAtTimestamp of the operationLongYTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.
gatewayGateway informationJSON ObjectNGateway information will be displayed during operations such as resetting/authenticating/logging off gateway devices.
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
dataJSON ObjectN
Adding/Deleting/Activating/Authenticating/Deregistering a Device
FieldTypeDescription
deviceNameStringDevice name
snStringSN
Modify a Device
FieldTypeDescription
deviceNameJSON ObjectDevice name-related modification
FieldTypeDescription
oldStringPrevious device name
newStringNew device name
snJSON ObjectDevice SN-related modification
FieldTypeDescription
newStringNew device SN
timeOffsetJSON ObjectTime offset-related modification
FieldTypeDescription
oldStringPrevious time offset
newStringtime offset

Example of adding/deleting a device:

json
{
    "productKey": "p11376",
    "deviceKey": "132456",    
    "type": "META_EVENT",
    "subtype": "DEVICE",
    "ticket": "1032330579905388544",
    "operation": "ADD/DELETE",
    "createdAt": 1616375484482,
    "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": "original device name",
            "new": "new device name"
        },
        "sn": {
            "new": "new SN"
        },
        "timeOffset": {
            "old": "+06:00",
            "new": "+08:00"
        }
    }
}

Example of reseting 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 the changes of device binding information sent by terminal user.

FieldNameTypeRequiredNote
productKeyPKStringY
deviceKeyDKStringY
deviceNameDevice nameStringN
typeTypeStringYFixed to ENDUSER
subtypeSub-typeStringYFixed to USER-BIND
ticketMessage IDStringY
createdAtCreation timeLongYOperation timestamp. Unit: ms
data JSON ObjectY
FieldTypeNote
endUserIdStringTerminal user ID
endUserDomainStringTerminal user domain
valueInteger 0 - Delete a device (Unbind device, cancel user account, delete device by sharer, delete device by sharee, delete device from device group)
1 - Add a device (Bind device, share a device, add a device to device group)
2 - Invalidate a device (Reset device)
authStatusIntegerAuthentication status.
1 - True binding
2 - Fake binding
authLevelIntegerAuthentication level.
1 - Owner
2 - Sharer
invalidCauseInteger Deletion/invalid reason
1 - Device is unbound
2 - Device is reset
3 - Sharing has expired
4 - Sharing is canceled
5 - Sharing is overwritten
6 - Device is added to the device group
7 - Device is removed from the device group
8 - Authentication status of the device has changed to fake binding
9 - Authentication status of the device has changed to true binding
10 - Sub-device has disconnected from the gateway
11 - Sub-device has connected to the gateway
12 - User is removed from the family
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 channel when the product data format is set to TSL model or transparent transmission.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumRAWY
subtypeEnumUPLINKY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
ticketStringMessage IDY
dataJSON ObjectY
FieldTypeNote
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 issued through the transparent channel when the product data format is set to TSL model or transparent transmission.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumRAWY
subtypeEnumDOWNLINKY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
dataJSON ObjectY
FieldTypeNote
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-Property

Data reported by the device of the product that TSL data format has been selected.

MATTR READ: TSL-Request of Read

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMATTRY
subtypeEnumREADY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
dataJSON ObjectY
FieldTypeNote
keysarray Set of function 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-Response of Read

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMATTRY
subtypeEnumREADRESPY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
dataJSON ObjectY
FieldTypeNote
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": "0.26",
      "boolKey": false,
      "enumKey": "1"
    }
  }
}

Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.

MATTR WRITE: TSL-Request of Write

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMATTRY
subtypeEnumWRITEY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
dataJSON ObjectY
FieldTypeNote
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-Report of Write

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMATTRY
subtypeEnumREPORTY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
extDataJSON ObjectReserved. Format: Key value pair.N
FieldTypeNote
occurredAtString Reserved. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeNote
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": "0.26",
      "boolKey": false,
      "enumKey": "1"
    }
  }
}

Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumRAWY
subtypeEnumUPLINKY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
gatewayJSON ObjectGateway details. N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
ticketStringMessage IDY
dataJSON ObjectY
FieldTypeNote
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"
  }
}

Remark: The raw field is the base64 encoded string of the data.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumRAWY
subtypeEnumDOWNLINKY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details. N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
dataJSON ObjectY
FieldTypeNote
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"
  }
}

Remark: The raw field is the base64 encoded string of the data.

TSL-Event-Message

Event reported by the device of the product that TSL data format has been selected, with the level defined as INFO.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMEVENTY
subtypeEnumINFOY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.Y
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
extDataJSON ObjectReserved. Format: Key value pair.N
FieldTypeNote
occurredAtString Reserved. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeNote
packetIdInteger Uplink and downlink data package ID
codeString Message code
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": false,
      "enumKey": "1"
    }
  }
}

Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.

TSL-Event-Alert

Event reported by the device of the product that TSL data format has been selected, with the level defined as WARN.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMEVENTY
subtypeEnumWARNY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
extDataJSON ObjectReserved. Format: Key value pair.N
FieldTypeNote
occurredAtString Reserved. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeNote
packetIdInteger Uplink and downlink data package ID
codeString Message code
kvJSON Object Key-value pair

Example

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

Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.

TSL-Event-Fault

Event reported by the device of the product that TSL data format has been selected, with the level defined as ERROR.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMEVENTY
subtypeEnumERRORY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
extDataJSON ObjectReserved. Format: Key value pair.N
FieldTypeNote
occurredAtString Reserved. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeNote
packetIdInteger Uplink and downlink data package ID
codeString Message code
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": "0.26",
      "boolKey": false,
      "enumKey": "1"
    }
  }
}

Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.

TSL-Service-Calling Logs

Service data reported by the device of the product indicating that TSL data format has been selected.

FieldTypeNoteRequired
productKeyStringPKY
deviceKeyStringDKY
typeEnumMSERVY
subtypeEnumINPUT/OUTPUTY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.Y
ticketStringMessage IDY
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product
deviceKeyStringdeviceKey of gateway device
extDataJSON ObjectReserved. Format: Key value pair.N
FieldTypeNote
occurredAtString Reserved. This parameter records the actual time the module disconnected from network in timestamp format.
dataJSON ObjectY
FieldTypeNote
packetIdInteger Uplink and downlink data package ID
codeString Service code
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": "0.26",
      "boolKey": false,
      "enumKey": "1"
    }
  }
}

Remark:When the platform pushes messages, the numeric values (INT, FLOAT, DOUBLE, ENUM as defined in the TSL model) are all sent as strings. The recipient can convert them to numeric format as needed based on the TSL model definition.

Device Positioning-Query Positioning Data

Device positioning data sent to the device.

FieldTypeNote
productKeyStringPK
deviceKeyStringDK
typeEnumLOCATION
subtypeEnumQUERY
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.
ticketStringMessage ID
dataJSON Object
FieldTypeNote
packetIdInteger Data package ID
keysArray Set of modes. Can be null.

Example:

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

Device Positioning-Original Data

NMEA protocol-based positioning data reported by the device.

FieldTypeNoteRequired
productKeyStringPK
deviceKeyStringDK
typeEnumLOCATION
subtypeEnumINFO-RAW
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.
ticketStringMessage ID
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product.
deviceKeyStringdeviceKey of gateway device.
dataJSON Object
FieldTypeNote
packetIdInteger Data package ID
rawString Original positioning data. NMEA-0183 protocol-based GNSS sentence format. 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 Data

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

Several INFO-KV messages are returned if the return value is an array.

FieldTypeNoteRequired
productKeyStringPK
deviceKeyStringDK
typeEnumLOCATION
subtypeEnumINFO-KV reports original or parsed positioning data
createdAtLongTimestamp indicating the exact time the message was generated. Type: integer. Unit: ms.
ticketStringMessage ID
gatewayJSON ObjectGateway details.N
FieldTypeNote
productKeyStringproductKey of gateway product.
deviceKeyStringdeviceKey of gateway device.
dataJSON Object
FieldTypeNote
packetIdInteger Data package ID
typeString Positioning method: GP/GL/GA/GN/BD/LBS/WIFI
subTypeString Positioning type: BD/GL (Russia)/GP (America)/GA (Europe)/GN (GP + BD)/LBS/WIFI
kvJSON Object Parsed positioning data. 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",         //Currently used satellites.
            "ggaStatus": "4",           //The positioning quality indicator GGA data is unique.
            "lat": "3959.6107085",      //Latitude (Unit: minute)
            "lng": "11619.6423341",     //Longitude (Unit: minute)
            "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, which is available only for GPS.
            "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: added, modified, or deleted.

FieldNameTypeRequiredNote
typeEvent typeStringYFixed to META_EVENT
subtypeType of operation subjectStringYFixed to PRODUCT indicating that the operation applies to product.
operationSpecific operationStringY ADD - Add a product
UPDATE - Update product information
DELETE - Delete a product
productKeyPKStringY
createdAtTimestamp of the operationLongYUnit: 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 - Custom
3 - JSON (Standard data format)
protocolInteger 1 - MQTT
2 -- LWM2M/CoAP
logoPathStringDownload address of logo
moduleTypeStringModule type
moduleNameStringModule name
moduleIdLongModule ID
allowedLimitIntegerNumber of activation codes
productStatusIntegerProject status.
0 - In development
3 - Published
9 - Error
projectIdLong Project ID
createTimeLong Creation time. Timestamp. Unit: ms.
updateTimeLongModification time. Timestamp. Unit: ms.
itemCodeStringAssociated product category ID obtained with the interface of product category query.
Modify Product Name
FieldTypeNote
productNameJSON ObjectProduct name information
FieldTypeDescription
oldStringPrevious product name
newStringNew product name

Example: Add 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 granted or authorization cancelled.

FieldNameTypeRequiredNote
typeEvent typeStringYFixed to META_EVENT
subtypeType of operation subjectStringYFixed to GRANT_AUTHORIZED, indicating product authorization operations.
operationSpecific operationStringY AUTH - Authorize a product
CANCEL_AUTH - Deauthorize a product
ProductKeyPKStringY
createdAtTimestamp of the operationLongYUnit: 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 - Custom
3 - JSON (Standard data format)
protocolInteger 1 - MQTT
2 -- LWM2M/CoAP
logoPathStringDownload address of logo
moduleTypeStringModule type
moduleNameStringModule name
moduleIdLongModule ID
allowedLimitIntegerNumber of activation codes
productStatusIntegerProject status.
0 - In development
3 - Published
9 - Error
projectIdLong Project ID
createTimeLong Creation time. Timestamp. Unit: ms.
updateTimeLongModification time. 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:

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 granted or authorization cancelled.

FieldNameTypeRequiredNote
typeEvent typeStringYFixed to META_EVENT
subtypeType of operation subjectStringYFixed 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
createdAtTimestamp of the operationLongYUnit: ms
dataJSON ObjectYApp authorization details
FieldTypeDescription
appNameStringApp name
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.

FieldNameTypeRequiredNote
subtypeType of operation subjectStringYFixed to THING_MODEL indicating that the operation subject applies to a TSL model.
operationSpecific operationStringYRELEASE- Release the TSL model
ProductKeyPKStringY
createdAtTimestamp of the operationLongYUnit: 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"
                }
            ]
        }
    }
}

Terminal User Information Change

Changes in terminal user information: created, modified, or deleted.

FieldNameTypeRequiredNote
typeEvent typeStringYFixed to ENDUSER
subtypeOperation typeStringY USER-ADD - Add a terminal user
USER-UPDATE - Update terminal user information
USER-DELETE - Delete a terminal user
ticketMessage IDStringYUnique message code
createdAtCreation timeLongYTimestamp of the operation. Unit: ms.
data StringY
FieldTypeDescription
endUserIdStringTerminal user ID
endUserDomainStringTerminal user domain
internationalCodeStringInternational telephone code
phoneStringPhone Number
emailStringEmail
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 Information.

FieldNameTypeRequiredNote
typeEvent typeStringYFixed to CEP_RULE.
subtypeSubtypeStringYFixed to NOTICE.
traceIdAction trace IDStringYAction trace ID.
createdAtCreation TimeLongYTimestamp of the operation. Unit: ms.
dataJSON ObjectY
FieldTypeNote
extraStringExtended field.
rawObjectDevice uplink data that triggers the rule.
FieldTypeNote
ticketStringMessage identification code.
productKeyStringProductKey that triggers the rule.
deviceKeyStringDeviceKey that triggers the rule.
typeStringMessage type. MATTR: TSL property. MEVENT: TSL event. ONLINE: Device online and offline. LOCATION: Device location. RESET: Device reset. UNREPORTED: Device not reporting data for a long time.
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.
statusObjectTSL device status data that triggers the rule, required when the type is ONLINE.
locationObjectTSL device location data that triggers the rule, required when the type is LOCATION.

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"
                        }] 
                } 
            }],
                 "status": {
                       "value": 1							// Required. 0: Device offline. 1: Device online
                 },
                 "location": {
                       "GCJ02": "116.4038,39.9148",          // Required. Coordinates in GCJ02 (State Bureau of Surveying and Mapping), with signs (negative values indicate south latitude or west longitude). Longitude first, latitude second, separated by a comma.
                       "BD09": "116.4038,39.9148",           // Required. Coordinates in BD09 (Baidu), with signs (negative values indicate south latitude or west longitude). Longitude first, latitude second, separated by a comma.
                       "WGS84": "116.4038,39.9148"           // Required. Coordinates in WGS84 (GPS), with signs (negative values indicate south latitude or west longitude). Longitude first, latitude second, separated by a comma.
                 }
        } 
    } 
}