Update a person in the list

Description

The method updates a person's data in the specified or default list. Access requires a JWT token in the header.

Request format

  • HTTP method: POST
  • URL: /person/update
  • Content-Type: application/json
  • Authorization: required

Request parameters

ParameterTypeWhere passedRequiredDescription
tokenstringHeader✅User JWT token

Request body (JSON)

FieldTypeRequiredDescription
tokenstring✅User JWT token
list_idstring✅Identifier of the person list
person_idstring✅Identifier of the person
fieldsstring[]❌New array of business data strings
drop_imageboolean❌Do not save the image in history
new_list_idstring❌Identifier of a new list for moving the record

Example request (cURL)

curl -X POST "https://api.enface.ai/person/update" 
  -H "Content-Type: application/json" 
  -H "Authorization: Bearer jwt.temporary.token" 
  -d '{
    "token": "jwt.temporary.token",
    "list_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "person_id": "75e55780-8943-11ea-9773-e96daa282099",
    "fields": ["New Name", "New Info"],
    "drop_image": true,
    "new_list_id": "e564e890-893b-11ea-8772-3b4b123daaaa"
  }'

Response examples

Success (200 OK)
{
  "status": "ok"
}
Error (400 Bad Request)
{
  "message": "invalid schema",
  "status": "error"
}
Error (401 Unauthorized)
{
  "message": "access denied",
  "status": "error"
}
Error (404 Not Found)
{
  "message": "item with this id not found",
  "status": "error"
}