Last Updated on : 2023-06-20 14:54:07download
Send an adding command to a specified access control device to add users in bulk.
POST: /v1.0/access-control/{device_id}/persons
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| device_id | String | uri | true | The ID of a Tuya device. |
Description of body
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| person_list | List | true | The list of users. |
Description of person_list
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| person_id | String | true | The ID of a specified user. | |
| name | String | false | The name of a specified user. | |
| id_card | String | false | The identity card number of the user. | |
| phone | String | false | The mobile phone number. | |
| person_floor | Integer | false | The floor on which the user resides. | |
| secret_key | String | false | The secret key of the user. | |
| refresh_time | Long | false | The time when the QR code is refreshed. Unit: milliseconds. | |
| begin_time | Long | false | The start time of the validity period. Unit: milliseconds. | |
| end_time | Long | false | The end time of the validity period. Unit: milliseconds. | |
| door_time_rule_list | List | false | The time rule of a schedule. | |
| extend | String | false | The extension information. |
Description of door_time_rule_list
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| rule_name | String | false | The name of the time rule. | |
| period | String | false | The cycle when the access is allowed. | |
| allowed_date | String | false | The time period when the access is allowed. | |
| denied_date | String | false | The time period when the access is denied. |
| Parameter name | Type | Description |
|---|---|---|
| result | CmdIssueBatchResultResponse | The returned result. |
Description of result
| Parameter name | Type | Description |
|---|---|---|
| sn_list | List | The command record ID. |
POST: /v1.0/access-control/6ce****/persons
{
"person_list": [
{
"person_id": "123****",
"begin_time": 1582959882104,
"end_time": 1661666512292,
"id_card": "330****",
"name": "zhangsan",
"phone": "135****",
"person_floor": 5,
"secret_key": "abc234****",
"refresh_time": 300000
},
{
"person_id": "123****",
"begin_time": 1582959882104,
"end_time": 1661666512292,
"id_card": "330****",
"name": "zhangsan",
"phone": "135****",
"person_floor": 5,
"secret_key": "abc234****",
"refresh_time": 300000
}
]
}
{
"result": {
"sn_list": [
"133****",
"132****"
]
},
"t": 1561456817168,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback