Push Method
POST application/json
Push Public parameters
| Parameters | Type | Is it mandatory? | Description | Example |
|---|---|---|---|---|
| dataType | int | mandatory | Data Type 1: Built in data 2: external data 3:Internet data 4:Latitude and longitude data | 1 |
| deviceCode | string | mandatory | Device identification | 251100001T |
| pushTime | int | mandatory | Push Time (second-level timestamp) | 1763086660 |
| data | array | mandatory | Data List | object |
Built-in Data
| Name | Type | mandatory? | Description | Example |
|---|---|---|---|---|
| temperature | double | Yes | Temperature ℃ | 11.1 |
| humidity | double | No | Humidity %RH | 12.2 |
| light | int | No | Light Lux | 200 |
| shock | int | No | Shock Lev | 1 |
| dataTime | int | Yes | Data Time (second-level timestamp) | 1763081891 |
Data push Example
{
"dataType": 0,
"deviceCode": "251100001T",
"pushTime": 1763087080,
"data": [
{
"temperature": 10.1,
"humidity": 10.2,
"light": 200,
"shock": 1,
"dataTime": 1763087382
},
{
"temperature": 10.3,
"humidity": 10.4,
"light": 201,
"shock": 2,
"dataTime": 1763087382
}
]
}
External Probe Data
| Name | Type | mandatory? | Description | Example |
|---|---|---|---|---|
| temperature | double | No | Temperature ℃ | 11.1 |
| humidity | double | No | Humidity %RH | 12.2 |
| dataTime | int | Yes | Data Time (second-level timestamp) | 1763081891 |
External probe data Push Example
{
"dataType": 0,
"deviceCode": "251100001T",
"pushTime": 1763087080,
"data": [
{
"temperature": 10.4,
"humidity": 10.5,
"dataTime": 1763087382
},
{
"temperature": 10.1,
"humidity": 10.2,
"dataTime": 1763088382
}
]
}
Internet Data
| Name | Type | mandatory? | Description | Example |
|---|---|---|---|---|
| rsrp | double | Yes | signal stregth | -65 |
| power | double | yes | Battery level 0%-100% | 73 |
| dataTime | int | yes | Data Time (second-level timestamp) | 1763082090 |
Internet Data Push example
{
"dataType": 0,
"deviceCode": "251100001T",
"pushTime": 1763087080,
"data": [
{
"rsrp": -65,
"power": 73,
"dataTime": 1763082090
}
]
}
Latitude and longitude Data
| Name | Type | mandatory? | Description | Example |
|---|---|---|---|---|
| longitude | double | Yes | Longitude | 113.823095 |
| latitude | double | Yes | Latitude | 34.496953 |
| positionType | int | Yes | Positioning Type 1: Base Station Positioning 2:wifi positioning 3:gps positioning | 1 |
| dataTime | int | Yes | Data Time (second-level timestamp) | 1763082090 |
Latitude and longitude Data Push Example
{
"dataType": 0,
"deviceCode": "251100001T",
"pushTime": 1763087080,
"data": [
{
"longitude": 113.823095,
"latitude": 34.496953,
"positionType": 0,
"dataTime": 1763082090
}
]
}
Recipient response parameters
Notice: Recipient must response in this format, it means success if code shows 200 and msg shows 'ok', all the other reply means failure
| parameters | Type | mandatory | Description | Example | |
|---|---|---|---|---|---|
| code | int | yes | 200 means success, others means failed | 200 | |
| msg | string | yes | Description: reply OK if code is 200, other reply means failure | ok |
Recipient response example
{
"code": 200,
"msg": "ok"
}
