Config the passage mode of a lock

https://api.sciener.com/v3/lock/configurePassageMode

During the specific time period, the lock will remain unlocked until it is manually locked.

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
passageModeIntYPassage mode: 1-on, 2-off
cyclicConfigJsonArrayNConverting a list of records from a JsonArray to a String, please refer to the example above.
Cycle time setting,can only set a maximum of five time periods.
autoUnlockIntNAuto unlock:1-on, 2-off, set to 1 then the lock will auto unlock at the time the passage mode start
typeIntYMethod:
1-via phone bluetooth,you should config via APP SDK before you request this API
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
isAllDayIntAll Hours: 1-YES, 2-NO, if is all hours, then startDate and endDate params is ignored.
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
weekDaysJsonArray[Int]Cycle valid days of the week:1-7, e.g. [1,2,3]

3 Response and example

ParameterTypeDescription
errcodeIntError code
errmsgStringError message