Get Unlocking Records

Last Updated on : 2024-05-09 02:45:25download

Get the unlocking records of a smart lock.

API address

GET: /v1.0/devices/{device_id}/door-lock/open-logs

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe device ID.
page_noIntegerquerytrueThe page number.
page_sizeIntegerquerytrueThe number of items returned on each page.
start_timeLongquerytrueThe start time.
end_timeLongquerytrueThe end time.

Return parameter

Parameter nameTypeDescription
resultDoorLockHistoryRes

Description of result

Parameter nameTypeDescription
totalLongThe number of records.
logsListThe list of unlocking records.

Description of logs

Parameter nameTypeDescription
update_timeLongThe time when the status is updated.
statusBaseItemDTOThe list of lock status.

Description of status

Parameter nameTypeDescription
codeStringThe status code. Valid values:
  • unlock_fingerprint: Unlock with fingerprint. The number is assigned by the smart lock.
  • unlock_password: Unlock with password. The number is assigned by the smart lock.
  • unlock_temporary: Unlock with temporary password. The value is the password ID.
  • unlock_dynamic: Unlock with dynamic password. The value is the password ID.
  • unlock_card: Unlock with card. The number is assigned by the smart lock.
  • unlock_face: Unlock with face recognition. The number is assigned by the smart lock.
  • unlock_key: Unlock with mechanical key. The number is assigned by the smart lock.
  • unlock_identity_card: Unlock with identity card. The number is assigned by the smart lock.
  • unlock_emergency: Unlock with emergency password. The number is assigned by the smart lock.
valueObjectThe status value.

Request example

GET: /v1.0/devices/vdevo15345926009****/door-lock/open-logs?page_no=1&page_size=20&start_time=1543213146&end_time=1543213546

Return example

{
    "result": {
        "total": 1,
        "logs": [
            {
                "unlock_name": "",
                "update_time": 1612098422000,
                "user_id": "0",
                "nick_name": "",
                "status": {
                    "code": "unlock_finger",
                    "value": "123456"
                }
            }
        ]
    },
    "t": 1542626129429,
    "success": true
}

Error code

For more information, see error code.