Skip to main content
Version: 3.0.0

Biometric Identification Service (BIS)

POST

  https://api.apptenticate.com/api/v3/biometrics/nationals/


Autenticación

Use your JWT obtained from the authentication process to make requests to this endpoint.

The response will be 401 unauthorized if the JWT is expired. In this case you will have to obtain a new JWT.


This endpoint receives all requests directed to the SIB Biometrics microservice that allows Panamanian citizens to be biometrically verified. These requests must contain at least two parameters: the citizen's ID and a .jpg image of the citizen's face. In the end, the electoral court service will respond if this face corresponds to the indicated ID.

** NOTE **

• The response may be 401 unauthorized if the JWT token must be refreshed.

• The image sent in jpg format must not exceed 2MB.

• If you want to obtain the transaction ID in the response, you must indicate "return_id": "True" in the JSON of the request.

• If you wish to improve the accuracy of the life test (if this service is contracted), the device type must be indicated in the JSON of the request. These can be "DESKTOP", "IOS" or "ANDROID" and the way to specify it would be "device":"IOS", for example.

Request structure - method: POST

Ruta: api/biometrics/nationals/

Payload for base request:

Payload: {
'citizen_id':'Cédula del ciudadano',
'selfie': imagen
} // (where the image is a .jpg archive)

If you want to obtain the transaction ID:

Payload: {
'return_id':True,
'citizen_id':'Cédula del ciudadano',
'selfie': imagen
} //where the image is a .jpg archive)

If you want to enhance the accuracy for liveness:

Payload: {
'citizen_id':'Cédula del ciudadano',
'device':'IOS', // Devices: IOS, ANDROID or DESKTOP
'selfie': imagen
} // (where the image is a .jpg archive)

Request examples

Python

# JWT Token
header = { 'Authorization': 'Bearer {}'.format(token) }

# Payload for base request
data = { 'citizen_id': 'Cédula del ciudadano'}
files = { 'selfie': imagen } # where the image is a .jpg archive

# If you want to obtain the transaction ID:
data = { 'return_id': True,'citizen_id': 'Cédula del ciudadano' }
files = { 'selfie': imagen } # where the image is a .jpg archive

# If you want to enhance the accuracy for liveness:
data = { 'citizen_id': 'Cédula del ciudadano', 'device':'IOS' }

# Devices: IOS, ANDROID or DESKTOP
files = { 'selfie': imagen } # where the image is a .jpg archive

# Envío de request
response = requests.post(
apptenticate_url,
data=data,
files=files,
headers=header
)
response = json.loads(response.content)

Response structure

Response format: JSON

Base response:

Response: {
"valid": True o False, // Boolean that determines if the response is valid
"error": "String with error description",
"details": "String specifying the error, or a key-value pair detailing whether any of the parameters are invalid and the error",
"error_code": error (int)
}

Adicionalmente a la respuesta, se envía el status code correspondiente al outcome de la operación.

• Response with transaction ID:


Answer: {
"valid": True or False, // Boolean which determines whether the request resulted in a successful validation or not
"error": "String with short description of the error",
"details": "A string specifying the error, or a key-value pair detailing whether any of the parameters are invalid and the error",
"error_code": error code (int),
"id": transaction number (int),
}

Rejection codes

CodeMessage
601Operator does not exist in the database.
602Citizen is under 12 years of age.
603Citizen is deceased.
604Citizen with invalid registration.
605Unrecognized citizen.
606ID field comes blank.
607Citizen not found.