To verify someone’s fingerprint, you must use the verify operation, whose URL is: https://api.biopassid.com/multibiometrics/verify. The request body is composed of a Person object, that has the fields CustomID, Fingers and Face. The CustomID field must be filled with a string that identifies the person you want to verify the biometry. In the Fingers field, you must put an array that contains all the base64 strings that represents the images of the user’s fingerprints. Lastly, in the Face field, it’s not necessary to fill with anything, since the system will be able to complete the operation even with no face being informed. 

An example of the request body can be seen below: 

{
  "Person": {
    "CustomID": "1234",
    "Fingers": [
        {
            "Finger-1": "SUkqABaNAQCAP4AQOCQWDQeEQmFQuGQ2HQ..."
        }
    ]
  }
}

For the header, just put the content type and your subscription key in place of <API-KEY> in the example below:

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

Lastly, the request must be done, sending the POST method, URL, header, and body as parameters, as shown in the example below, which was written in Python, but can be checked in several other programming languages in our documentation:

import http.client
import json

conn = http.client.HTTPSConnection("hml-api.biopassid.com")
payload = json.dumps({
  "Person": {
    "CustomID": "1234",
    "Fingers": [
      {
        "Finger-1": "SUkqABaNAQCAP4AQOCQWDQeEQmFQuGQ2HQ..."
      }
    ]
  }
})
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"))

After sending the request, if no errors are found, the system will return a message that contains a Person object, with the attributes CustomID, which is informed in the request, Match, which contains the Boolean value indicating whether the given biometry matches with that contained in our database, and a MatchDetails attribute, which is made of two fields:

  1. FaceMatched: Boolean value that says whether the face matched. In the case of a fingerprint exclusive verification, where no face is given, this value is set as false by default;
  2. NonMatchedFingers: An array of strings that contains all the fingerprints that did not matched. This includes fingerprints that were not given in the request. In other words, if only three fingerprints are given, the other seven will by default be returned as false.

The request response for the example shown can be seen below:

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

Note that in the response it was identified that there was a match in the verification, but there was no compatibility in the face, since none was given to the system. Besides that, in the array that contains the fingers that did not matched, all fingers from the second to the tenth were returned, since they were also not given. The first finger, which was informed in the request, was the one that resulted in the match.

At the end of the request, if you receive a message with the response code 200 (OK), this means that your transaction occurred successfully, and the verification was completed. If you receive an error message, make sure the body and request content were filled correctly, along with your subscription key.