Assign Unlocking Method

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

Assign an unlocking method to a specific user.

API address

POST: /v1.0/devices/{device_id}/door-lock/opmodes/actions/allocate

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.

Description of body

Parameter name Type IN Required Description
user_id String false The user ID.
unlock_list List false The list of unlocking methods.

Description of unlock_list

Parameter name Type IN Required Description
dp_code String false The standard DP code of the unlocking method.
unlock_sn Integer false The number of the unlocking method.

Return parameter

Parameter name Type Description
result Boolean

Request example

POST: /v1.0/devices/vdevo162322644587871/door-lock/opmodes/actions/allocate
{ "user_id": "30665363", "unlock_list": [ { "dp_code": "unlock_password", "unlock_sn": 2 } ] }

Return example

{ "result": true, "t": 1624597643939, "success": true }

Error code

For more information, see error code.