Retrieve a Person
Endpointโ
GET https://api.verifik.co/v2/face-recognition/persons/{id}
Returns one person by MongoDB _id (the {id} path segment).
Headersโ
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Paramsโ
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Person ID in the URL path (/persons/{id}). |
Requestโ
- Node.js
- PHP
- Python
- Go
const fetch = require("node-fetch");
async function run() {
const id = "person_123456789";
const res = await fetch(`https://api.verifik.co/v2/face-recognition/persons/${id}`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
});
console.log(await res.json());
}
run();
<?php
$id = "person_123456789";
$ch = curl_init("https://api.verifik.co/v2/face-recognition/persons/" . rawurlencode($id));
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"Authorization: Bearer " . getenv("VERIFIK_TOKEN"),
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
import os, requests
person_id = "person_123456789"
url = f"https://api.verifik.co/v2/face-recognition/persons/{person_id}"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}",
}
r = requests.get(url, headers=headers)
print(r.json())
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
url := "https://api.verifik.co/v2/face-recognition/persons/person_123456789"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+os.Getenv("VERIFIK_TOKEN"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
Responseโ
- 200
- 401/403
- 404
- 409
- 500
{
"id": "โฆ",
"data": {
"_id": "person_123456789",
"name": "John Doe",
"gender": "M",
"date_of_birth": { "year": 1990, "month": 1, "day": 15 },
"nationality": "US",
"images": ["<base64>", "<base64>"],
"collections": ["collection_123456789"],
"notes": "VIP customer",
"client": "client_123456789",
"status": "active",
"faceEncodings": ["โฆ", "โฆ"],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "โฆ"
}
}
{
"message": "Authentication required",
"code": "UNAUTHORIZED"
}
or
{
"message": "token_expired",
"code": "FORBIDDEN"
}
{
"error": "Person not found",
"message": "PERSON_NOT_FOUND"
}
{
"message": "Validation message or missing parameter",
"code": "MissingParameter"
}
{
"message": "internal_error",
"code": "ERROR"
}
Notesโ
{id}is the personโs_idreturned from create or list endpoints.- Successful payloads follow The Person Object;
faceEncodingsand other fields depend on enrollment and API version. - 404 indicates no person exists for that ID (or it is outside your client scope).