FreshlianceFreshliance
Tracker document
Gateway document
  • English
  • 简体中文
Tracker document
Gateway document
  • English
  • 简体中文
  • API introduction

    • Overview
    • Parameter
    • Signature
    • Rules
    • Error code
  • API list

    • User information
    • User device
    • Device trip
    • Trip data
    • Device group
    • Grouped device
    • Configuration template
  • Webhook introduction

    • Webhook

Push Method

POST application/json

Push Public parameters

ParametersTypeIs it mandatory?DescriptionExample
dataTypeintmandatoryData Type
1: Built in data
2: external data
3:Internet data
4:Latitude and longitude data
1
deviceCodestringmandatoryDevice identification251100001T
pushTimeintmandatoryPush Time (second-level timestamp)1763086660
dataarraymandatoryData Listobject

Built-in Data

NameTypemandatory?DescriptionExample
temperaturedoubleYesTemperature ℃11.1
humiditydoubleNoHumidity %RH12.2
lightintNoLight Lux200
shockintNoShock Lev1
dataTimeintYesData 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

NameTypemandatory?DescriptionExample
temperaturedoubleNoTemperature ℃11.1
humiditydoubleNoHumidity %RH12.2
dataTimeintYesData 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

NameTypemandatory?DescriptionExample
rsrpdoubleYessignal stregth-65
powerdoubleyesBattery level 0%-100%73
dataTimeintyesData 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

NameTypemandatory?DescriptionExample
longitudedoubleYesLongitude113.823095
latitudedoubleYesLatitude34.496953
positionTypeintYesPositioning Type
1: Base Station Positioning
2:wifi positioning
3:gps positioning
1
dataTimeintYesData 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

parametersTypemandatoryDescriptionExample
codeintyes200 means success, others means failed200
msgstringyesDescription: reply OK if code is 200, other reply means failureok

Recipient response example

{
  "code": 200,
  "msg": "ok"
}