Get Temporary Passwords

Last Updated on : 2024-01-30 09:31:23download

Get the list of temporary passwords for a smart lock.

API address

GET: /v1.0/devices/{device_id}/door-lock/temp-passwords

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.
validBooleanqueryfalseIndicates whether the password is valid.

Return parameter

Parameter nameTypeDescription
resultListThe returned result.

Description of result

Parameter nameTypeDescription
idLongThe serial number of a specified temporary password.
nameStringThe name of a specified temporary password.
phaseIntegerPassword status. Valid values:
  • Zigbee:
    • 1: to be created
    • 2: normal
    • 3: frozen
    • 4: deleted
    • 5: failed to be created
  • Wi-Fi:
    • 0: deleted
    • 1: to be sent
    • 2: sent
    • 3: to be deleted
  • Bluetooth:
    • 0: deleted
    • 1: to be issued
    • 2: issued
    • 3: to be deleted
    • 7: failed to be sent
effective_timeLongThe effective time. The timestamp is in seconds (10-digit).
invalid_timeLongThe expiration time. The timestamp is in seconds (10-digit).
phoneStringThe mobile phone number.
time_zoneStringThe time zone.
delivery_statusIntegerOperation confirmation status. The value is returned by a Zigbee lock. Valid values:
  • 1: The configuration is in progress.
  • 2: The configuration is successful.
  • 3: The configuration failed.
  • 4: The password already exists.
  • 5: The maximum number of passwords has reached.
  • 6: The validity period overlaps.
schedule_listListThe list of parameters for schedule tasks.

Description of schedule_list

Parameter nameTypeDescription
effective_timeLongStart time. It is stored in minutes. For example, 07:30 indicates that the value is 450. Calculation: 7 x 60 + 30 = 450.
invalid_timeLongEnd time. It is stored in minutes. For example, 07:30 indicates that the value is 450. Calculation: 7 x 60 + 30 = 450.
working_dayIntegerThe 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 38, so the value of working_day is 38.

Request example

GET: /v1.0/devices/vdevo15345926009****/door-lock/temp-passwords?valid=true

Error code

For more information, see error code.