The operation to edit someone’s biometric data is done via the update method, whose URL is https://api.biopassid.com/multibiometrics/update. The request body consists of a Person object, containing the CustomID of the person you want to update, and at least one item in the field Fingers or Face, which consists of an array of base64 strings representing the images of the fingerprints and face of the user, respectively. An example of how the body of this request would look like can be seen below:

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

In the header, you must insert the content type and your subscription key, replacing <API-KEY>, as shown in the example below:

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

Lastly, you must do the request, specifying it’s a PUT method, the URL, the header, and the body, as in the example below, written in Python, but that can be seen 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",
    "Face": [
      {
        "Face-1": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAYGBgYHBgcIC..."
      }
    ]
  }
})
headers = {
  'Content-Type': 'application/json',
  'Ocp-Apim-Subscription-Key': '<API-KEY>'
}
conn.request("PUT", "/multibiometrics/update", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

After making the request, in case there is no errors, you will be returned a message that consists of a Person object, with the fields ClientID, which consists of the identifier for the client in our database, a CustomID, which is the identifier for the user updated in the request, and a BioPass ID, the identifier of the person in the system.

In case an error is returned, make sure your request was filled correctly, according to the examples. An error could be returned if there is not at least one fingerprint or face being given, or if the subscription key is not filled properly. If you receive the response code 200 (OK), this means your request was done successfully and you can proceed with the next ones. Below you can see the answer from the system for the request done in the example:

{
    "Person": {
        "ClientID": "1628692218558x176807293303153250",
        "CustomID": "1234",
        "BioPassID": "1648"
    }
}