Skip to content

Face Enrollment

Enroll face for face recognition.

Authorization

This endpoint requires a API token as Bearer in the Authorization header. Go to Authorization guide for details.

Request (POST)

POST https://api.biometrysolutions.com/api-gateway/enroll/face

Headers

  • Authorization* - Your API Token.
  • X-User-Fullname* - Pass the full name of end-user that consented to store his biometric data.
  • X-Request-User-Provided-ID (Session id) - Include the session ID to link transactions within a unified group.

Parameters

  • face* (Image file) - Image of a passport or driver’s license, make sure its a jpeg, png, or jpg. Required parameter.
  • is_document (boolean) - A flag indicating whether the uploaded image is a document (passport or driver’s license). Required if document is being uploaded.

Output Data

  • code:
    • 0 - means the successful result.
    • 1 - if there is no face, too small or bad quality.
    • 2 - if found more than one face.
    • 3 - if face is not centered.
  • description - The description of the enrolling result.

Responses

The object with message field.

  • message - Message with the status of processed audio.
  • data - The object with the following fields:
    • enrollment_result - This object describes the result of the face enrolling process.
    • document_auth - Describes what kind of document was uploaded and its details. Will not be present if is_document form value is not set to true.

Response sample:

{
"data": {
"enrollment_result": {
"code": 0,
"description": "Successful check"
},
"document_auth": {
"document_type": "National Identification Card",
"country_code": "KGZ",
"nationality_code": "KGZ",
"nationality_name": "KYRGYZSTANI",
"sex": "MALE",
"first_name": "JOHN",
"father_name": "JOHAN",
"last_name": "DOE",
"expiry_date": "2028-08-01",
"document_number": "ID0123456",
"birth_date": "2002-04-09",
"portrait_photo": "",
"signature": "",
"document_category": "National Identification Card",
"issuing_state": "Not available",
"front_document_type_id": "",
"contains_rfid": false
}
},
"message": "face enrolled successfully"
}

Sample

Request
curl --location 'https://api.biometrysolutions.com/api-gateway/enroll/face' \
--header 'X-User-Fullname: John Doe' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhbGciO...ANYea8r2xOG-Urc' \
--form 'face=@"[path_to_image_file]/face.png"
Response
{
"data": {
"enrollment_result": {
"code": 0,
"description": "Successful check"
}
},
"message": "face enrolled successfully"
}