Temporary Password Details Interface

Last Updated on : 2023-12-07 03:34:02

Get the details of the temporary password of the door lock

API address

GET: /v1.0/devices/{device_id}/door-lock/template/temp-password/{password_id}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritruedevice id
password_idLonguritruepassword id

Return parameter

Parameter nameTypeDescription
resultTemplatePwdSearchResultVO

Description of result

Parameter nameTypeDescription
expired_timeLongPassword expiration time (milliseconds)
effective_timeLongPassword effective time (milliseconds)
dev_id_listListList of device numbers that can be unlocked
dev_name_listListList of device names that can be unlocked
operateString
  • Action
  • ADD
  • MODIFY
  • DELETE
delivery_statusString
  • Delivery Status
  • ONGOING Delivering
  • SUCCESS
  • FAILED< /li>
snIntegerSerial number of the periodic password
nameStringPassword Name
pwd_idLongPassword number
dev_ackIntegerDevice return status is set according to dp definition
msg_idIntegerPassword information number
gmt_createLongPassword creation time (milliseconds)
pwd_type_codeString
  • Password Type
  • once-one-time-only offline password
  • temp-temp-password (custom password )
passwordStringPassword
pwd_typeInteger
  • Type of current password
  • 0-periodic password
  • 1-one-time password
schedule_detailsListperiodic information, the value may be changed only when the type is periodical password
phoneStringMobile phone number (with country code), for example: 86-15158065546

Description of schedule_details

Parameter nameTypeDescription
effective_timeLongStart time. Stored in minutes, such as "07:30", the value is 7x60+30=450
invalid_timeLongEnd time. Stored in minutes, such as "08:30", the value is 8x60+30=510
working_dayIntegerWeek, each value accumulates:
  • Sunday: 1
  • Monday: 2
  • Tuesday: 4
  • Wednesday : 8
  • Thursday: 16
  • Friday: 32
  • Saturday: 64
time_zone_idString
all_dayBoolean

Request example

GET: /v1.0/devices/6c7129x1yanlxgwx/door-lock/template/temp-password/2876895

Return example

{
    "tid": "f19673593eda11ed84fd2237f0528b74",
    "result": {
        "effective_time": 1664269200,
        "schedule_details": [
            {
                "effective_time": 0,
                "working_day": 127,
                "all_day": false,
                "invalid_time": 1439
            }
        ],
        "pwd_id": 2876895,
        "expired_time": 1666861200,
        "password": "E86342BEF4228A1E741E38A5900FA61A",
        "operate": "CREATE",
        "name": "test9",
        "sn": -1,
        "msg_id": 81,
        "delivery_status": "ONGOING"
    },
    "t": 1664334559805,
    "success": true
}

Error code

For more information, see error code.