Change the period of validity of a face data

https://api.sciener.com/v3/face/changePeriod

Change the period of validity of face data , there are two methods to do it:

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

You can develop your own APP based on our APP SDK,call Modify a face's validity method to change it in the lock, then request this API ( with type=1) to sync it to cloud.

(2) Change by cloud API via gateway or WiFi lock

If the lock is WiFi lock or it's connected to a gateway, you can change it remotely,just request this API ( with type=2) .

1 Request example

2 Request parameters

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID, generated by Lock init
faceIdIntYFace ID, generated from Add face API
startDateLongYThe time when it becomes valid (timestamp in millisecond), you can't change it to permanent
endDateLongYThe time when it is expired (timestamp in millisecond), you can't change it to permanent
cyclicConfigStringNRecurring time period, the valid time period of each week day must be the same, for example:
[{"weekDay":1, "startTime":480,"endTime":1080},{"weekDay":2, "startTime":480,"endTime":1080}] for valid from 8:00 to 18:00 in Monday and Tuesday.
typeIntYMethod:
1-via phone bluetooth, you should call APP SDK method 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
errcodeIntError code
errmsgStringError message