The Create Person API allows you to create a new person within the facial recognition system. You can associate a person with their name, images, gender, date of birth, nationality, collections, and additional notes.
To create a new person, make a POST request to the endpoint /v2/face-recognition/persons with the required request body parameters, including the person's name, images, gender, date of birth, nationality, collections, and additional notes.
The API will respond with information about the newly created person, including their unique identifier, name, gender, date of birth, nationality, associated thumbnails, collections, and timestamps. This information can be used for various facial recognition and identification tasks, including managing user profiles and adding individuals to your facial recognition system.
NOTE: The image's parameter is an array in which up to 3 images of the same person can be sent. If they are not the same, the system will not correctly create the user.
For the service to function correctly, you must provide a parameter called collection_id. This parameter is obtained when creating a new collection with the name code. Here is an example of a collection creation response:
{
"data": {
"_id": "65175da13e81e4fabc12345",
"deleted": false,
"name": "Test2",
"description": "Test Collection",
"client": "65175da13e81e4fabc12345",
"code": "dac2c81b-96a6-4f19-ab54-d1a72d55b64b", // Parameter to be sent as collection_id
"updatedAt": "2023-09-29T23:28:33.894Z",
"createdAt": "2023-09-29T23:28:33.894Z",
"__v": 0
}
}
import axios from 'axios';
const options = {
method: 'POST',
url: '<https://api.verifik.co/v2/face-recognition/persons>',
params: {
},
headers: {
Accept: 'application/json',
Authorization: 'jwt <tu_token>'
},
data: {
name: 'Mateo Verifik',
notes: 'Verifik employee',
gender: 'M',
images: ['Base 64 Image'],
collections: ['8e3ee8df-7fb3-av13-8a13-7b00f2beca6a'],
nationality: 'Colombian',
date_of_birth: '1995-05-07'
}
};
try {
notFou const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
{
"data": {
"__v": 0,
"_id": "6517684fe09925fabe13bva9",
"name": "Mateo Verifik",
"notes": "Verifik employee",
"client": "64404b1f9856cc8cebd762e7",
"gender": "M",
"deleted": false,
"createdAt": "2023-09-30T00:14:08.329Z",
"updatedAt": "2023-09-30T00:14:08.329Z",
"thumbnails": [
{
"id": "c1e0fb47-3d7a-4e67-994f-7a3da8be1c88",
"thumbnail": "Base 64 Image"
}
],
"collections": [
"Test"
],
"nationality": "Colombian",
"date_of_birth": "1995-05-07T00:00:00.000Z"
}
}
The Retrieve Face Recognition Persons API allows you to retrieve information about persons stored within the facial recognition system. This API provides details about individuals, including their names, gender, date of birth, nationality, thumbnails, associated collections, and additional notes.
The response contains an array of person objects, each representing an individual in the system. You can iterate through this array to access and utilize the information about each person as needed for your application.