Overview
Your service must provide the endpoints listed below. The customer will configure the device network and server settings from the device UI. Once configured, the device will attempt to connect to your server.
Required API Endpoints
Express.jsBase URL
Use your server IP and port:
http://domainName.com
(replace domainName with your domain name)
Add these routes to your Node.js/Express service. Use the cURL commands below to test quickly.
app.get('/server_status/', async (req, res) => {
try {
let status = 'Ok';
console.log(status);
res.json({ status });
} catch (err) {
res.status(500).json({ error: err.message });
}
});
app.get('/device/:data', async (req, res) => {
try {
let data = req.params.data;
console.log(data);
res.json({ data });
} catch (err) {
res.status(500).json({ error: err.message });
}
});
app.get('/attendance_log/:data', async (req, res) => {
try {
let data = req.params.data;
console.log(data);
res.json({ data });
} catch (err) {
res.status(500).json({ error: err.message });
}
});GET /server_status/
Health check endpoint used by the device.
cURL
curl -X GET "http://yorDomain.com/server_status/"Example Response
{
"status": "Ok"
}GET /device/:data
Device sends data as a URL parameter.
cURL
curl -X GET "http://yorDomain.com/device/:data"Example you will get
{
"cmd": "reg", "sn": "ZYTB121342121", "cpusn": "df6354608b5f3931",
"devinfo": {"modelname": "F610", "usersize": 3000, "fpsize": 3000, "cardsize": 3000, "pwdsize": 3000, "logsize": 231424, "useduser": 5, "usedfp": 5, "usedcard": 0, "usedpwd": 0, "usedlog": 457, "usednewlog": 457, "fpalgo": "thbio3.0", "firmware": "SAWED-3K V10.1", "time": "2025-12-27 08:57:47", "mac": "00-01-A9-1B-56-1B"}
}GET /attendance_log/:data
Attendance log data as a URL parameter.
cURL
curl -X GET "http://yorDomain.com/attendance_log/:data"Example you will get
{
"device_sn": "ZYTB12010891", "count": 1, "logs": [{"enrollid": 1001, "time": "2025-12-27 09:01:55", "event": 0, "saved_at": "2025-12-27 09:01:59"}], "timestamp": "2025-12-27 09:01:59"
}What We need From your end
Operational Notes
Here some basic System steps.
If Your Service Is Offline
-> If your service is offline, the system may auto restart after getting one data and closing the connection to the device.
-> Once your service is online, manually restart the device to ensure it reconnects properly.
If Your Device Is Offline
-> Cheak network connection and server Settings then set them proper.
-> There will be no Data losses.