Last Updated on : 2023-06-20 14:54:10download
Send an adding command to a specified access control device to add the information about a specified person.
POST: /v1.0/access-control/{device_id}/persons/{person_id}
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| device_id | String | uri | true | The ID of a Tuya device. |
| person_id | String | uri | true | The ID of a specified person. |
Description of body
| Parameter name | Type | IN | Required | Description |
|---|---|---|---|---|
| name | String | false | The name of a specified person. | |
| id_card | String | false | The identity card number of a specified person. | |
| phone | String | false | The mobile phone number. | |
| person_floor | Integer | false | The floor on which the person resides. | |
| secret_key | String | false | The secret key of the person. | |
| refresh_time | Long | false | The time interval when a QR code is refreshed. Unit: milliseconds. | |
| begin_time | Long | false | The start time of a specified validity period. Unit: milliseconds. | |
| end_time | Long | false | The end time of a specified validity period. Unit: milliseconds. | |
| door_time_rule_list | List | false | The time rules of a specified 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 a specified time rule. | |
| period | String | false | The cycle when access is allowed. | |
| allowed_date | String | false | The time period when access is allowed. | |
| denied_date | String | false | The time period when access is denied. |
| Parameter name | Type | Description |
|---|---|---|
| result | CmdIssueResultResponse | The returned result. |
Description of result
| Parameter name | Type | Description |
|---|---|---|
| sn | String | The ID of a specified command record. |
POST: /v1.0/access-control/6ce****/persons/123****
{
"begin_time": 1582959882104,
"end_time": 1661666512292,
"id_card": "330****",
"name": "James",
"phone": "135****",
"person_floor": 5,
"secret_key": "abc123***",
"refresh_time": 300000
}
{
"result": {
"sn": "133****"
},
"t": 1561456817168,
"success": true
}
For more information, see error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback