Last Updated on : 2023-12-07 03:34:00download
Create an unnamed temporary password for a smart lock.
POST: /v2.0/devices/{device_id}/door-lock/temp-password
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
device_id | String | uri | true | The device ID. |
Description of body
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
password | String | true | Indicates the length of the original password. Valid values:
|
|
effective_time | Long | true | Effective time. The timestamp is in seconds (10-digit). | |
invalid_time | Long | true | Expiration time. The timestamp is in seconds (10-digit). | |
password_type | String | true | The password is encrypted using a ticket . |
|
phone | String | false | The mobile phone number. | |
type | Integer | false | The validity type of password. Valid values:
|
|
time_zone | String | false | The time zone. This field is required if you require schedule tasks. | |
ticket_id | String | true | The ID of the temporary key. | |
schedule_list | List | false | The information about periodic passwords. |
Description of schedule_list
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
effective_time | Long | true | Start time. It is stored in minutes. For example, 07:30 indicates that the value is 450 . Calculation: 7 x 60 + 30 = 450. |
|
invalid_time | Long | true | End time. It is stored in minutes. For example, 08:30 indicates that the value is 510 . Calculation: 8 x 60 + 30 = 510. |
|
working_day | Integer | true | The working days. One week is represented in one byte. bit0 to bit6 respectively represent Sunday to Saturday. 1 means valid, 0 means invalid, and the last digit is represented by 0 . For example, Monday/Tuesday/Friday is represented as 00100110 , which equals to 38 , so the value of working_day is 38. |
Parameter name | Type | Description |
---|---|---|
result | JSONObject |
Description of result
Parameter name | Type | Description |
---|---|---|
id | Long | The password ID. |
POST: /v2.0/devices/vdevo15345926009****/door-lock/temp-password
{
"password": "956FAD7xxxxxx09C68E168B77",
"password_type": "ticket",
"ticket_id": "xxxxxx",
"effective_time": 1579156726,
"invalid_time": 1579243126,
"phone": 11233213,
"time_zone": "",
"schedule_list": [
{
"effective_time": 720,
"invalid_time": 1080,
"working_day": 0
}
]
}
{
"result": {
"id": 124367346
},
"t": 1542626129429,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback