Add face

https://api.sciener.com/v3/face/add Add a card into the lock, there are two methods to do it:

(1)Add by APP nearby the lock via bluetooth:

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.

(2)Add by cloud API via gatewayor WiFi lock

If the lock is WiFi lock or it's connected to a gateway, you can add face remotely via this API (with addType=2)

1 Request example

POST, ContentType:application/x-www-form-urlencoded

2 Request parameters

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID, generated by Lock init
nameStringNFace name
faceNumberStringNFace Number
Face Number return by APP SDK;
Don't need this parameter if add face via gateway or WiFi lock
startDateLongYThe time when it becomes valid (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent.
endDateLongYThe time when it is expired (timestamp in millisecond), when startDate and endDate all set to 0 it will be permanent.
typeIntN1-normal,4-cyclic(default value is 1)
cyclicConfigJsonArrayNCyclic operation time setting (need to pass only for cyclic type)
featureDataStringNFace feature data, Gained by Get feature data by photo API,this parameter will be used in remote add face
addTypeIntYMethod:
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.
dateLongYCurrent time (timestamp in millisecond)

Description of parameters in cyclicConfig:

ParameterTypeDescription
startTimeIntThe time when it becomes valid, in minute, for example 480 for 8:00
endTimeIntThe time when it becomes validit is expired, in minute, for example 1080 for 18:00
weekDayIntWeek day:1-7, 1-Monday, 2-Tuesday...7-Sunday

3 Response and example

ParameterTypeDescription
faceIdIntFace ID