To perform a person's face verification operation, you must use the verify method, whose URL is: https://api.biopassid.com/multibiometrics/verify. The request body consists of a Person object, which is composed of a CustomID string, that contains a unique value that will be used to identify the user, and a Fingers array, whose items are the images of the person’s face. However, to perform this procedure, only the face biometry will be necessary.

An example of the request body can be seen below:

{
  "Person": {
    "CustomID": "1234",
    "Face": [
      {
        "Face-1": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAYGBgYHBgcIC..."
      }
    ]
  }
}

For the content in the header, insert the content type and the subscription key, as seen in the template below, where the value of <API-KEY> must be replaced by your BioPass ID subscription key:

{
  'Content-Type': 'application/json-patch+json',
  'Ocp-Apim-Subscription-Key': '<API-KEY>'
}

Lastly, in the request, the specification that it’s a POST method, the URL, the header, and the body, all shown above, must be passed as the parameters. An example of how a code that makes this request would look like can be seen below, written in Python, but can be checked in several others programming languages in our documentation:

import http.client
import json

conn = http.client.HTTPSConnection("hml-api.biopassid.com")
payload = json.dumps({
  "Person": {
    "CustomID": "1234",
    "Face": [
      {
        "Face-1": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAYGBgYHBgcIC..."
      }
    ]
  }
})
headers = {
  'Content-Type': 'application/json-patch+json',
  'Ocp-Apim-Subscription-Key': '<API-KEY>'
}
conn.request("POST", "/multibiometrics/verify", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))


The request response will be a JSON message with a Person object containing the fields:

  1. CustomID: String that identifies the person, passed in the request;
  2. Match: Boolean value that shows the operation result, that is, if the biometrics informed corresponds to that of the indicated person;
  3. MatchDetails: An object that contains the info about the biometrics comparison. It is made of two fields:
    1. FaceMatched: Boolean value that informs whether the face matched or not. Its value is set as false by default if there is no face biometrics being received;
    2. NonMatchedFingers: A string array that informs which fingers did not conformed to the indicated biometrics. By default, fingers that were not informed are set in this list.

Therefore, the format of the JSON message can be seen below:

{
    "Person": {
        "CustomID": "1234",
        "Match": true,
        "MatchDetails": {
            "FaceMatched": true,
            "NonMatchedFingers": [
                "Finger-1",
                "Finger-2",
                "Finger-3",
                "Finger-4",
                "Finger-5",
                "Finger-6",
                "Finger-7",
                "Finger-8",
                "Finger-9",
                "Finger-10"
            ]
        }
    }
}

Note that even though no fingerprint biometrics were sent, the system returned as true the value for the face match and, thus, the biometric verification, and returned as false the match for each fingerprint, since none was entered.

In case the message with the code 200 (OK) is returned, this means your request was completed successfully and you can proceed to the next ones.