WiFi scale server
  1. Interaction Interfaces Between Torre Devices and the Server
WiFi scale server
  • Interaction Interfaces Between V2.0/V3.0 Devices and the Server
    • Device Registration and Network Configuration
      POST
    • Device Configuration Sync
      GET
    • Get Update Firmware Version Information
      POST
    • Upload Smart Scale Data
      POST
    • Batch Upload Smart Scale Data
      POST
    • Get Update Firmware Version Information-v2.0
      POST
  • Interaction Interfaces Between Torre Devices and the Server
    • Device Registration and Network Configuration
      POST
    • Device Configuration Sync
      POST
    • Get Update Firmware Version Information
      POST
    • Upload Smart Scale Data
      POST
  1. Interaction Interfaces Between Torre Devices and the Server

Upload Smart Scale Data

POST
/lefu/wifi/torre/record

Request

Body Params application/json
sn
string 
required
Device SN number
type
string 
required
Product model
mac
string 
required
MAC address
Match pattern:
([A-Fa-f0-9]{2}[:]){5}[A-Fa-f0-9]{2}
bat
string 
required
Device battery level
scaleType
integer 
required
scaleType is used to distinguish different device types. Different devices call different algorithms to calculate indicators such as body fat. The specific rules are as follows:

scaleType=0, using a four-electrode AC single-frequency algorithm;

scaleType=1, eight-electrode AC algorithm, bhProduc=1

scaleType=2, eight-electrode AC algorithm, bhProduc=7

scaleType=3, eight-electrode AC algorithm, bhProduc=3

scaleType=4, eight-electrode AC algorithm, bhProduc=4

scaleType=5, eight-electrode AC algorithm, bhProduc=5

scaleType=6, eight-electrode AC algorithm, bhProduc=6

scaleType=90, using a four-electrode AC dual-frequency algorithm
list
array[object (TorreWeightDataVO) {6}] 
required
List of data
memberid
string 
required
Member ID, corresponding to the user table's uid
userid
string 
required
Account ID, corresponding to the user table's account_id
weight
number 
required
Weight (note: unit is standardized to KG)
timestamp
integer <int64>
required
Weight measurement timestamp (in seconds)
heartRate
integer 
optional
Heart rate
data
array[object (ImpedanceVO) {1}] 
required
The hardware requires this packaging format
Encrypted impedance value (Ohms)
When scaleType=0: indicates a 4-electrode device (1 encrypted impedance value per data set)
Array[0]: Encrypted impedance
When scaleType=1: indicates an 8-electrode device (10 encrypted impedance values per data set)
Array[0]: Segment - 20kHz right arm impedance
Array[1]: Segment - 100kHz right arm impedance
Array[2]: Segment - 20kHz left arm impedance
Array[3]: Segment - 100kHz left arm impedance
Array[4]: Segment - 20kHz trunk impedance
Array[5]: Segment - 100kHz trunk impedance
Array[6]: Segment - 20kHz right leg impedance
Array[7]: Segment - 100kHz right leg impedance
Array[8]: Segment - 20kHz left leg impedance
Array[9]: Segment - 100kHz left leg impedance
Example
{
    "bat": "0.32",
    "list": [
        {
            "data": [
                {
                    "impedance": "920589"
                },
                {
                    "impedance": "1362155467"
                },
                {
                    "impedance": "545131847"
                },
                {
                    "impedance": "1349479251"
                },
                {
                    "impedance": "14200493"
                },
                {
                    "impedance": "1075847155"
                },
                {
                    "impedance": "837069015"
                },
                {
                    "impedance": "1088164826"
                },
                {
                    "impedance": "569400741"
                },
                {
                    "impedance": "537580203"
                }
            ],
            "heartRate": 81,
            "memberid": "9216776f-2a35-4ca1-8427-668087a47ed8",
            "timestamp": 1730893791,
            "userid": "d0f404d2-4db8-4302-b95b-1e7267c330a7",
            "weight": 69.3
        }
    ],
    "mac": "CF:E8:05:08:13:BA",
    "scaleType": 5,
    "sn": "CFE8050813BA",
    "type": "LEFU-CF577"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/lefu/wifi/torre/record' \
--header 'Content-Type: application/json' \
--data-raw '{
    "bat": "0.32",
    "list": [
        {
            "data": [
                {
                    "impedance": "920589"
                },
                {
                    "impedance": "1362155467"
                },
                {
                    "impedance": "545131847"
                },
                {
                    "impedance": "1349479251"
                },
                {
                    "impedance": "14200493"
                },
                {
                    "impedance": "1075847155"
                },
                {
                    "impedance": "837069015"
                },
                {
                    "impedance": "1088164826"
                },
                {
                    "impedance": "569400741"
                },
                {
                    "impedance": "537580203"
                }
            ],
            "heartRate": 81,
            "memberid": "9216776f-2a35-4ca1-8427-668087a47ed8",
            "timestamp": 1730893791,
            "userid": "d0f404d2-4db8-4302-b95b-1e7267c330a7",
            "weight": 69.3
        }
    ],
    "mac": "CF:E8:05:08:13:BA",
    "scaleType": 5,
    "sn": "CFE8050813BA",
    "type": "LEFU-CF577"
}'

Responses

🟢200Success
application/json
Body
data
object (XinmiaoDeviceHistoryData) 
optional
accountId
string 
optional
User ID (identified by email)
uid
string 
optional
User ID
scaleType
integer 
optional
0 = four electrodes, 1 = eight electrodes
heartRate
integer 
optional
Heart rate
timestamp
integer <int64>
optional
Weight measurement timestamp in UTC (e.g., 1599534596000)
Weight measurement timestamp in UTC
impedance
integer <int64>
optional
Trunk impedance
z100KhzLeftArmEnCode
integer <int64>
optional
100KHz left arm impedance encrypted value (value uploaded by the device)
z100KhzLeftLegEnCode
integer <int64>
optional
100KHz left leg impedance encrypted value (value uploaded by the device)
z100KhzRightArmEnCode
integer <int64>
optional
100KHz right arm impedance encrypted value (value uploaded by the device)
z100KhzRightLegEnCode
integer <int64>
optional
100KHz right leg impedance encrypted value (value uploaded by the device)
z100KhzTrunkEnCode
integer <int64>
optional
100KHz trunk impedance encrypted value (value uploaded by the device)
z20KhzLeftArmEnCode
integer <int64>
optional
20KHz left arm impedance encrypted value (value uploaded by the device)
z20KhzLeftLegEnCode
integer <int64>
optional
20KHz left leg impedance encrypted value (value uploaded by the device)
z20KhzRightArmEnCode
integer <int64>
optional
20KHz right arm impedance encrypted value (value uploaded by the device)
z20KhzRightLegEnCode
integer <int64>
optional
20KHz right leg impedance encrypted value (value uploaded by the device)
z20KhzTrunkEnCode
integer <int64>
optional
20KHz trunk impedance encrypted value (value uploaded by the device)
errorCode
integer 
optional
The firmware on the device has been written successfully; this parameter is for compatibility with existing devices.
text
string 
optional
The firmware on the device has been written successfully; this parameter is for compatibility with existing devices.
Examples
{
    "code": 200,
    "errorCode": 0,
    "text": "success"
}
Previous
Get Update Firmware Version Information
Built with