https://api.sciener.com/v3/lock/configurePassageMode
During the specific time period, the lock will remain unlocked until it is manually locked.
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxx101curl --location -g --request POST 'https://api.sciener.com/v3/lock/configurePassageMode' \2--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \3--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \4--data-urlencode 'lockId=163377' \5--data-urlencode 'passageMode=1' \6--data-urlencode 'startDate=480' \7--data-urlencode 'startDate=1080' \8--data-urlencode 'cyclicConfig=[{"isAllDay":2,"startTime":480,"endTime":1080,"weekDays":[1,2]}]' \9--data-urlencode 'type=2' \10--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 |
| passageMode | Int | Y | Passage mode: 1-on, 2-off |
| cyclicConfig | JsonArray | N | Converting 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. |
| autoUnlock | Int | N | Auto unlock:1-on, 2-off, set to 1 then the lock will auto unlock at the time the passage mode start |
| type | Int | Y | Method: 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. |
| date | Long | Y | Current time (timestamp in millisecond) |
Description of parameters in cyclicConfig:
| Parameter | Type | Description |
|---|---|---|
| isAllDay | Int | All Hours: 1-YES, 2-NO, if is all hours, then startDate and endDate params is ignored. |
| 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 |
| weekDays | JsonArray[Int] | Cycle valid days of the week:1-7, e.g. [1,2,3] |
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
xxxxxxxxxx41{2"errcode": 0,3"errmsg": "none error message"4}