Update QR code

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.

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
qrCodeIdIntYQR code id, generated by Add QR code
nameStringNQr code name
startDateLongNThe time when it becomes valid (timestamp in millisecond)
endDateLongNThe time when it is expired (timestamp in millisecond)
refreshTimeIntNQR code refresh time, time in minutes
cyclicConfigJSONArray StringNRecurring 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.
dateLongYCurrent time (timestamp in millisecond)
typeIntYQR code types: 1-Time-limited, 2-Permanent, 4-Recurring
changeTypeIntYModification 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:

ParameterTypeDescription
startTimeIntStart time of cyclic, in minutes, for example 480 for 8:00
endTimeIntEnd time of cyclic, in minutes, for example 1080 for 18:00
weekDayIntWeek day, 1-7, 1 for monday and 7 for sunday.

3 Response and example

ParameterTypeDescription
errcodeIntError code
errmsgStringError message
descriptionStringError Description