Retrieve a Person
Endpointβ
https://api.verifik.co/v2/face-recognition/persons/{id}
This endpoint allows you to query a person stored by the primary key.
Headersβ
Content-Typeβ
Type: String
Required: Required
Value: application/json
Authorizationβ
Type: String
Required: Required
Value: Bearer <token>
Parametersβ
idβ
Type: String
Required: Yes
ID of the person that you want to bring the information.
Requestβ
- Node.js
- Python
- PHP
- Go
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/face-recognition/persons/person_123456789',
headers: {
Accept: 'application/json',
Authorization: 'jwt <tu_token>'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
import http.client
conn = http.client.HTTPSConnection("api.verifik.co")
headers = {
'Accept': "application/json",
'Authorization': "JWT token"
}
conn.request("GET", "/v2/face-recognition/persons/person_123456789", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.verifik.co/v2/face-recognition/persons/person_123456789', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'JWT token',
],
]);
echo $response->getBody();
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.verifik.co/v2/face-recognition/persons/person_123456789"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "JWT token")
client := &http.Client{}
res, _ := client.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Responseβ
- 200
- 404
- 401
{
"success": true,
"data": {
"_id": "person_123456789",
"name": "John Doe",
"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": "VIP customer",
"client": "client_123456789",
"status": "active",
"faceEncodings": [
"face_encoding_1",
"face_encoding_2"
],
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}
{
"error": "Person not found",
"message": "PERSON_NOT_FOUND"
}
{
"error": "Unauthorized",
"message": "UNAUTHORIZED"
}
Featuresβ
- Person Retrieval: Retrieve specific person records by unique identifier
- Complete Information: Full person details including images and encodings
- 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