Facematch service
This service allows to verify if two faces belong to the same person or if a face belongs to a person, performing the analysis of the biometrics provided.
Endpoint
The characteristics of the endpoint for the consumption of the face verification service are listed below.
Facematch
~/api/face/facematch
Parameters
Tag |
Type |
Required |
Description |
ineFront |
file |
yes |
Selfie of the first face to verify or front image of INE document. It have to be type .jpg, jpeg or .png. |
selfie |
file |
yes |
Second face to verify. |
Tag |
Type |
Required |
Description |
ApiKey |
string |
yes |
Company access credentials. |
{
"ApiKey": string,
"ineFront": file,
"selfie": file
}
Response:
Correct
Name |
Type |
Description |
isIdentical |
boolean |
Result of verifying if the faces are of the same person or not. |
confidence |
double |
Value between 0 and 1 with the percent of confidence. En successful results this value must be greater than 0.5. |
{
"isIdentical": boolean,
"confidence": double
}
Error
Tag |
Type |
Description |
code |
string |
Error code. |
message |
string "Error message". |
|
{
"code": "string",
"message": "string"
}
Service messages
Code |
Message |
Descripción |
00 |
{ "isIdentical": True, "confidence": 0.5725 "description: The two faces are the same person } |
Indicates if the request was successful. If all goes well, it will display the data correctly. It is considered successful if the percentage is greater than 0.5 (50% confidence). |
00 |
{ "isIdentical": false, "confidence": 0.09527 "description: The two faces are not the same person } |
Indicates if the request was unsuccessful. If everything goes well, it will show the data well. It is considered as false if it is below 0.5 (below 50% confidence). |
Face001 |
The face image number 2 is required |
Message that will be displayed when image number 2 is not attached |
Face002 |
The face image number 1 is required |
Message that will be displayed when image number 1 is not attached |
Face003 |
The files types allowed are .jpg, .png. |
Message that will be displayed when the service receive a file that is not of type .png or .jpg in any of the parameters |
Face004 |
Invalid apikey |
Message that will be displayed when the service receive an incorrect apikey. |
Face005 |
Server response failed |
Message displayed when there is an error getting the response from the server. |
Face006 |
Response time has exceeded |
Message that is displayed when the server takes a long time to process the response and it fails. |