This document outlines an API endpoint for face comparison biometrics, where users can upload one image for comparison with the image on the identity document and receive a response indicating whether they match or not, along with a confidence score. The response includes a success message with a match status and confidence level, or an error message if the comparison was unsuccessful.
POST
{{URL}}/dikript/api/v1/biometrics/identitycomparison
ID TYPE OPTIONS
BVN
PHONENUMBER
FRSC
NIN
Request Body
NOTE
At least one of these parameter type is required
Content-Type: multipart/form-data
Key | Value | Description | Required |
---|---|---|---|
ImageDoc | file | The actual image document could be (jpg, png etc) | |
ImageBase64String | text | Base64 encoded string of the image | |
ImageUrl | text | image url (must be https) | |
idType | text | identity document type for comparison | yes |
idNumber | text | identity document number for comparison | yes |
SDKs
VueJs SDK
https://www.npmjs.com/package/dikript-vue-identity-comparison-sdk
Response Body
{
"status": true,
"message": "Successful",
"code": "200",
"apiVersion": "v1",
"transactionRef": "N202409050346164684",
"data": {
"isMatch": true,
"detail": {
"confidence": 97.389,
"thresholds": {
"_1e3": 62.327,
"_1e4": 69.101,
"_1e5": 73.975
},
"faces1": [
{
"faceRectangle": {
"top": 614,
"left": 276,
"width": 453,
"height": 453
}
}
],
"faces2": [
{
"faceRectangle": {
"top": 614,
"left": 276,
"width": 453,
"height": 453
}
}
]
},
"confidence": 97.389
},
"error": null
}
{
"status":false,
"message": "Unsuccessful",
"code": "400",
"apiVersion": "v1",
"transactionRef": "N202401101345487388",
"data": "",
"error": {
"code": 400,
"message": null
}
}