Biometric Identification Service (BIS Plus)
POSThttps://api.apptenticate.com/api/v3/biometrics/nationals/
Authentication
Use your JWT obtained from the authentication process to make requests to this endpoint.
The response will be 401 unauthorized if the JWT has expired. In such case, you should obtain a new JWT.
This endpoint handles all requests directed to the SIB Biometric microservice, which allows biometric verification of Panamanian citizens. These requests must contain at least two parameters: the citizen's ID card and a .jpg image of their face. Ultimately, the Electoral Tribunal service will respond whether this face matches the provided ID card.
NOTE
• The response may be 401 unauthorized if the JWT token needs to be refreshed.
• The image sent in jpg format must not exceed 2MB.
• If you wish to receive the transaction ID in the response, you must specify "return_id": "True" in the request JSON.
• If you want to improve the accuracy of the proof of life (if this service is contracted), you must specify the device type in the request JSON. These can be "DESKTOP", "IOS", or "ANDROID", and the way to specify it would be "device":"IOS", for example.
Request Structure - method: POST
• Base request payload:
Payload: {
'citizen_id':'Citizen's ID',
'selfie': image
} // (where the image is a .jpg file)
• If you want to get the transaction ID:
Payload: {
'return_id':True,
'citizen_id':'Citizen's ID',
'selfie': image
} // (where the image is a .jpg file)
• If you want to improve the accuracy of the proof of life:
Payload: {
'citizen_id':'Citizen's ID',
'device':'IOS', // Devices: IOS, ANDROID, or DESKTOP
'selfie': image
} // (where the image is a .jpg file)
Request Examples
# JWT Token
header = { 'Authorization': 'Bearer {}'.format(token) }
# Base request payload
data = { 'citizen_id': 'Citizen's ID'}
files = { 'selfie': image } # Where the image is a .jpg file
# If you want to get the transaction ID:
data = { 'return_id': True,'citizen_id': 'Citizen's ID' }
files = { 'selfie': image } # Where the image is a .jpg file
# If you want to improve the accuracy of the proof of life
data = { 'citizen_id': 'Citizen's ID', 'device':'IOS' }
# Devices: IOS, ANDROID, or DESKTOP
files = { 'selfie': image } # Where the image is a .jpg file
# Sending request
response = requests.post(
apptenticate_url,
data=data,
files=files,
headers=header
)
response = json.loads(response.content)
Response Structure
• Base Response:
Response: {
"valid": True or False, // Boolean determining if the request resulted in a successful validation or not
"code": error code (int),
"message": "String with brief description of the error",
"sib_id": transaction number (int),
"data": {
"citizen_id": "Citizen's ID",
"name": "Citizen's first names",
"lastname": "Citizen's last names",
"gender": "Citizen's gender",
"birthplace": "Citizen's place of birth" (str),
"birthdate": "Citizen's date of birth" (str),
"expiration_date": "ID card expiration date" (str),
"signature": "Image of the citizen's signature as it appears on the ID card" (base64),
}
}
In addition to the response, the corresponding status code for the operation outcome is sent.
• Response with Transaction ID:
Response: {
"valid": True or False, // Boolean determining if the request resulted in a successful validation or not
"code": error code (int),
"message": "String with brief description of the error",
"sib_id": transaction number (int),
"data": {
"citizen_id": "Citizen's ID",
"name": "Citizen's first names",
"lastname": "Citizen's last names",
"gender": "Citizen's gender",
"birthplace": "Citizen's place of birth" (str),
"birthdate": "Citizen's date of birth" (str),
"expiration_date": "ID card expiration date" (str),
"signature": "Image of the citizen's signature as it appears on the ID card" (base64),
}
"id": transaction number (int),
}
Rejection Codes
| Code | Message |
|---|---|
601 | Operator does not exist in the database. |
602 | Citizen is under 12 years of age. |
603 | Citizen is deceased. |
604 | Citizen with invalid registration. |
605 | Unrecognized citizen. |
606 | ID field comes blank. |
607 | Citizen not found. |