List All Persons
Endpointβ
https://api.verifik.co/v2/face-recognition/persons
This endpoint allows you to bring all the people stored in Verifik for all the collections.
Headersβ
Content-Typeβ
Type: String
Required: Required
Value: application/json
Authorizationβ
Type: String
Required: Required
Value: Bearer <token>
Query Parametersβ
pageβ
Type: Number
Required: No
Page number for pagination (default: 1).
limitβ
Type: Number
Required: No
Number of records per page (default: 10, max: 100).
collectionβ
Type: String
Required: No
Filter by specific collection ID.
statusβ
Type: String
Required: No
Filter by status: active, inactive, pending.
populates[]β
Type: String
Required: No
Optional array of related data to include. Available options: collections, client.
Requestβ
- Node.js
- Python
- PHP
- Go
import axios from 'axios';
const options = {
method: 'GET',
url: 'https://api.verifik.co/v2/face-recognition/persons',
params: {
page: 1,
limit: 10,
status: "active",
"populates[]": ["collections"]
},
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?page=1&limit=10&status=active&populates[]=collections", 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?page=1&limit=10&status=active&populates[]=collections', [
'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?page=1&limit=10&status=active&populates[]=collections"
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
- 400
{
"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": [
{
"_id": "collection_123456789",
"name": "VIP Customers",
"description": "High-value customers"
}
],
"notes": "VIP customer",
"client": "client_123456789",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 1,
"pages": 1
}
}
{
"success": false,
"error": "Invalid query parameters",
"code": "INVALID_PARAMETERS"
}
Featuresβ
- Person List Retrieval: Retrieve all persons with detailed information
- Pagination Support: Navigate through large datasets with page-based pagination
- Filtering Options: Filter by collection, status, and other criteria
- Population Support: Include related collection and client information
- 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