Add Face Data

Last Updated on : 2023-06-15 05:23:33

Send an adding command to a specified access control device to add the information about a specified face. The maximum number of queries per second (QPS) for a single account to call this API is 5.

API address

POST: /v1.0/access-control/{device_id}/persons/{person_id}/faces/{face_id}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.
person_idStringuritrueThe ID of a specified person.
face_idStringuritrueThe face ID.

Description of body

Parameter nameTypeINRequiredDescription
urlString trueThe URL of a specified face image.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe command record ID.

Request example

POST: /v1.0/access-control/6ce****/persons/123****/faces/faceId****
{
  "url": "http://****.jpg"
}

Return example

{
    "result": {
        "sn": "133****"
    },
    "t": 1561456817168,
    "success": true
}

Error code

For more information, see error code.