Skip to main content

Lookup a Person by Name

Endpoint

GET https://api.verifik.co/v2/face-recognition/persons/lookup

Finds persons already stored for your client by name (required) and optional date of birth. Use this when create returns 412 person_already_set, or before you enroll, so you can get the person _id and collection code values without running a 1:N face search.

This is a Mongo metadata lookup, not a face match. Digits in name are stripped the same way as create ("Maria 123" becomes "Maria"). Name match is case-insensitive contains (Maria finds Maria Perez Gonzalez). Use at least 3 characters.

Use collections[].code (36-character UUID) as collection_id on face search. Do not send the Mongo collection _id.

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Params

NameTypeRequiredDescription
namestringYesPartial or full name (min 3 characters after stripping digits). Case-insensitive contains.
date_of_birthstringNoYYYY-MM-DD. When set, narrows to that day.
pagenumberNoPage number (default: 1).
limitnumberNoPage size (default: 20, max: 100).

Request

const fetch = require("node-fetch");

async function run() {
const params = new URLSearchParams({
name: "Maria Perez",
date_of_birth: "1994-02-07",
page: "1",
limit: "20",
});

const res = await fetch(`https://api.verifik.co/v2/face-recognition/persons/lookup?${params}`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
});
console.log(await res.json());
}

run();

Response

{
"data": [
{
"_id": "693c646dfd68b59e4e8d1d58",
"name": "Maria Perez",
"date_of_birth": "1994-02-07",
"gender": "F",
"collections": [
{
"_id": "6612a020a55c329bfb3f62e6",
"code": "ed27d231-b437-42c5-94c5-a2130c447d1e",
"name": "CholloApp"
}
]
}
],
"total": 1
}

An unknown name returns 200 with "data": [] and "total": 0. That is not a 404.

Notes

  • Prefer this helper (or the data object on 412 person_already_set) over a 1:N search when you know part of the name and optional date of birth.
  • A first name alone is enough (name=Maria). Add date_of_birth when many people share that given name.
  • POST /v2/face-recognition/persons uniqueness is also name + date of birth in a collection, not face similarity.
  • collections[].code is the value face search expects as collection_id.