Skip to main content

Update a Person

Update an existing person record in the facial recognition system. You can modify person information including name, images, gender, date of birth, nationality, collections, and notes.

Endpoint

PUT https://api.verifik.co/v2/face-recognition/persons/{id}

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Parameters

NameTypeRequiredDescription
idstringYesThe unique identifier of the person to update

Request Body

NameTypeRequiredDescription
namestringNoFull name of the person
imagesarrayNoBase64-encoded images for recognition
genderstringNoGender of the person (M or F)
date_of_birthstringNoDate of birth of the person (ISO8601)
nationalitystringNoNationality of the person
collectionsarrayNoArray of collection IDs related to this person
notesstringNoAdditional notes about the person

Request

import axios from 'axios';

const personId = "person_123456789";
const options = {
method: 'PUT',
url: `https://api.verifik.co/v2/face-recognition/persons/${personId}`,
data: {
name: "John Doe Updated",
gender: "M",
notes: "Updated VIP customer"
},
headers: {
Accept: 'application/json',
Authorization: 'Bearer <your_token>'
}
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}

Response

{
"success": true,
"data": {
"_id": "person_123456789",
"name": "John Doe Updated",
"gender": "M",
"date_of_birth": {
"year": 1990,
"month": 1,
"day": 15
},
"nationality": "US",
"images": [
"base64_encoded_image_1",
"base64_encoded_image_2"
],
"collections": ["collection_123456789"],
"notes": "Updated VIP customer",
"client": "client_123456789",
"status": "active",
"faceEncodings": [
"face_encoding_1",
"face_encoding_2"
],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-16T14:20:00Z"
}
}

Features

  • Person Updates: Update existing person records with new information
  • Partial Updates: Update only the fields you need to change
  • Image Updates: Add or replace images for face recognition
  • Collection Management: Update collection assignments
  • Structured Response: Organized data format for easy integration
  • Multiple Programming Languages: Support for JavaScript, Python, PHP, and Swift
  • Error Handling: Comprehensive error responses for various scenarios