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)
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxxcurl --location -g --request POST 'https://api.sciener.com/v3/face/add' \--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \--data-urlencode 'lockId=163377' \--data-urlencode 'name=face' \--data-urlencode 'startDate=1625025703000' \--data-urlencode 'endDate=1645025703000' \--data-urlencode 'type=1' \--data-urlencode 'featureData=F0E41DEAEDF7F31420D5F6FD0403ECF0F4EEF7E6010BF3E5EDEDE5E6F4ED1006FBEDFF02DFF4F3EB09DEF408D6FEE7061616FFFF0008FCE807F6040DF01116FAFFF112DEF9180600FE00F5F41126FCE70CE0071401F715F9FDDF0EEBFB1CFA0BF112FF0E040619010FFCC6DCFBFFD0FFF5EAF600FEF4081E15FF03ECEF1705FC05E0120AEDFCF304ED16F2DF0610FDF4060FFBE1E70CF0FD10EA04EEEB080E0E1117F5F3EF05010D0E02FB0EEBF70F01101507F6F20CFBFBF8162836010BFAFD0603E7F519EFFEF4D514EAFF0107DFEF05F519FC0A08FC11FEFEF3FC0E00FCFB0602F0F20809F6020EF00E0EFD01F2FEF70723E100F10AFFF6D7EBF5FBF7ECF7' \--data-urlencode 'addType=2' \--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 |
| 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 |
xxxxxxxxxx{"faceId": 224242}