https://api.sciener.com/v3/qrCode/update
Update the QR code's name, validity period, and cycle settings; the type cannot be updated.
When changeType=0, the QR code is modified using cloud-based methods.
When changeType=1, the QR code needs to be modified via Bluetooth using the APPSDK first, and then this interface is called.
When changeType=2, calling this interface will directly modify the QR code in the lock through the gateway.
POST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxx71curl --location -g --request POST 'https://api.sciener.com/v3/qrCode/update' \2--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \3--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \4--data-urlencode 'qrCodeId=34242' \5--data-urlencode 'startDate=1625025703000' \6--data-urlencode 'endDate=1645025703000' \7--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 |
| qrCodeId | Int | Y | QR code id, generated by Add QR code |
| name | String | N | Qr code name |
| startDate | Long | N | The time when it becomes valid (timestamp in millisecond) |
| endDate | Long | N | The time when it is expired (timestamp in millisecond) |
| refreshTime | Int | N | QR code refresh time, time in minutes |
| cyclicConfig | JSONArray String | N | Recurring 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. |
| date | Long | Y | Current time (timestamp in millisecond) |
| type | Int | Y | QR code types: 1-Time-limited, 2-Permanent, 4-Recurring |
| changeType | Int | Y | Modification methods: 1- Modify via APP Bluetooth. You must modify via APP Bluetooth first before calling this interface. 2- Modify remotely via gateway or WiFi lock. If it is a WiFi lock or connected to a gateway, you can pass to 2 and directly call this interface to modify from the lock. 0- Cloud method. If left blank, the default is 0, which modifies from the cloud. |
cyclicConfig:
| Parameter | Type | Description |
|---|---|---|
| startTime | Int | Start time of cyclic, in minutes, for example 480 for 8:00 |
| endTime | Int | End time of cyclic, in minutes, for example 1080 for 18:00 |
| weekDay | Int | Week day, 1-7, 1 for monday and 7 for sunday. |
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
| description | String | Error Description |
xxxxxxxxxx51{2"errcode": 0,3"errmsg": "none error message",4"description": "表示成功或是"5}