https://api.sciener.com/v3/face/add
Add a card into the lock, there are two methods to do it:
You can develop your own APP based on our APP SDK, call Add face method to add a card into the lock, then request this cloud API (with addType=1) to add it to the cloud to facilitate follow-up management.
If the lock is WiFi lock or it's connected to a gateway, you can add face remotely via this API (with addType=2)
The lock feature supports 124-bit locks. Face photo unlocking:
Before delivery, you need to obtain the image information (e.g., width, height, size, type) that can be set within the lock through the lock additional settings information interface.
After adjusting the image, the developer uploads it to their own image server, using the image URL as the input parameter to this interface.
After successfully adding the face, the developer can decide whether to delete the photo from their server.
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxx111curl --location -g --request POST 'https://api.sciener.com/v3/face/add' \2--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \3--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \4--data-urlencode 'lockId=163377' \5--data-urlencode 'name=face' \6--data-urlencode 'startDate=1625025703000' \7--data-urlencode 'endDate=1645025703000' \8--data-urlencode 'type=1' \9--data-urlencode 'featureData=F0E41DEAEDF7F31420D5F6FD0403ECF0F4EEF7E6010BF3E5EDEDE5E6F4ED1006FBEDFF02DFF4F3EB09DEF408D6FEE7061616FFFF0008FCE807F6040DF01116FAFFF112DEF9180600FE00F5F41126FCE70CE0071401F715F9FDDF0EEBFB1CFA0BF112FF0E040619010FFCC6DCFBFFD0FFF5EAF600FEF4081E15FF03ECEF1705FC05E0120AEDFCF304ED16F2DF0610FDF4060FFBE1E70CF0FD10EA04EEEB080E0E1117F5F3EF05010D0E02FB0EEBF70F01101507F6F20CFBFBF8162836010BFAFD0603E7F519EFFEF4D514EAFF0107DFEF05F519FC0A08FC11FEFEF3FC0E00FCFB0602F0F20809F6020EF00E0EFD01F2FEF70723E100F10AFFF6D7EBF5FBF7ECF7' \10--data-urlencode 'addType=2' \11--data-urlencode 'date=1625025703000'| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| lockId | Int | Y | Lock ID, generated by Lock init |
| name | String | N | Face name |
| faceNumber | String | N | Face Number Face Number return by APP SDK; Don't need this parameter if add face via gateway or WiFi lock |
| startDate | Long | Y | The time when it becomes valid (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. |
| endDate | Long | Y | The time when it is expired (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent. |
| type | Int | N | 1-normal,4-cyclic(default value is 1) |
| cyclicConfig | JsonArray | N | Cyclic operation time setting (need to pass only for cyclic type) |
| featureData | String | N | Face feature data, Gained by Get feature data by photo API,this parameter will be used in remote add face |
| url | String | N | The URL of the face image can be transmitted remotely (using addType 2); the 124th bit of the lock feature value indicates support for sending face photos, otherwise it returns "This lock does not support this function". |
| addType | Int | Y | Method: 1-via phone bluetooth,should call APP SDK method to add face first. 2-via gateway or WiFi lock,you can call this api directly if it's a WiFi lock or it's connected to gateway. The default value is 1. |
| date | Long | Y | Current time (timestamp in millisecond) |
Description of parameters in cyclicConfig:
| Parameter | Type | Description |
|---|---|---|
| startTime | Int | The time when it becomes valid, in minute, for example 480 for 8:00 |
| endTime | Int | The time when it becomes validit is expired, in minute, for example 1080 for 18:00 |
| weekDay | Int | Week day:1-7, 1-Monday, 2-Tuesday...7-Sunday |
| Parameter | Type | Description |
|---|---|---|
| faceId | Int | Face ID |
xxxxxxxxxx31{2"faceId": 2242423}