Update Card

Last Updated on : 2023-06-20 14:54:13download

Send an update command to a specified access control device to update the specified user's access control card information.

API address

PUT: /v1.0/access-control/{device_id}/persons/{person_id}/card/{card_no}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.
person_idStringuritrueThe ID of a specified user.
card_noStringuritrueThe number of the card to be updated.

Description of body

Parameter nameTypeINRequiredDescription
new_card_noString trueThe new card number.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe command record ID.

Request example

PUT: /v1.0/access-control/6ce****/persons/123****/card/cardNo****
{
  "new_card_no": "newCardNo****"
}

Return example

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

Error code

For more information, see error code.