Skip to main content
Version: beta

Endpoint Biometría

Endpoint Biometría

EThis endpoint is the API entrypoint and handles all requests to the Apptenticate microservices. These requests must contain at least two parameters: a 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 "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: {URL Base}

Payload for base request

Payload: {'cedula':'Citizen ID',
'image': image} //where the image is a .jpg file

If you want to obtain the transaction ID:

Payload: {'id':True,'cedula':'Citizen ID',
'image': image} //where the image is a .jpg file)

If you want to improve the precision of the life test

Payload: {'cedula':'Citizen ID', 'device':'IOS',// Devices: IOS, ANDROID or DESKTOP
'image': image} //where the image is a .jpg file

Request example

Python

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

# Payload for base request

data = {'cedula':'Cédula del ciudadano'}
files = {'imagen': imagen} # Donde la imagen es un archivo .jpg

# If you want to obtain the transaction ID:

data = {'id':True,'cedula':'Cédula del ciudadano'}
files = {'imagen': imagen} # Donde la imagen es un archivo .jpg)

# If you want to improve the precision of the life test

data = {'cedula':'Cédula del ciudadano', 'dispositivo':'IOS'} # Dispositivos: IOS, ANDROID o DESKTOP
files = {'imagen': imagen} # Donde la imagen es un archivo .jpg

# Send request
response = requests.post(apptenticate_url,data=data,files=files, headers=header)
response = json.loads(response.content)

Response structure

Response format: JSON

Base response

Answer: {
"valid": True or False // Boolean which determines whether the request resulted in a successful validation or not,
"message": "String containing the biomatric validation failure information or null otherwise",
"code": error code (int)
}

Response with transaction ID

Answer: {
"valid": True or False // Boolean which determines whether the request resulted in a successful validation or not,
"message": "String containing the biomatric validation failure information or null otherwise",
"code": error code (int),
"id" : transaction number (int)
}