For AI agents: a documentation index is available at /llms.txt. Not every documentation page on this site has a clean Markdown version; pages that provide one include a <link rel="alternate" type="text/markdown"> in their HTML.

Following the acquisition, Onfido is now known as Entrust.Read more
Onfido LogoOnfido Logo

Developers

Query INE Database task

Start here

This guide presents a technical overview of the Query INE Database task, available for integration through Workflow Studio.

Query INE Database - solution overview

Financial service providers operating in Mexico are supervised and governed by the Comisión Nacional Bancaria y de Valores (CNBV), which enforces strict anti–money laundering (AML) and know your customer (KYC) regulations.

To help our customers navigate and comply with these regulations, Entrust offers an identity verification solution enabling regulated entities in Mexico to meet CNBV onboarding requirements. Full details of this market-ready solution can be found here in our dedicated product guide.

To complement Entrust's market-ready solution for Mexico, customers are also able to implement Mexican voter ID verification through our Query INE Database task.

Query INE Database task

The Query INE Database task verifies an applicant's Mexican voter ID (Credencial para Votar) against Mexico's National Electoral Institute (INE) database. It compares the identity data extracted from an identity document - and optionally a biometric face capture - with the official INE records.

Connecting to the INE Biometric Database requires prior approval from Mexico's National Electoral Institute (INE), granted only to authorized financial service providers. As part of this approval, INE issues dedicated credentials for accessing the database. Contact the support team to arrange these credentials and enable INE verification in both Sandbox and Production environments.

This task is only applicable to Mexican INE voter ID documents. The applicant must grant explicit consent for the INE database query before the task can run.

When included in a Studio workflow, the Query INE Database task takes as input the applicant's identity document information extracted during document capture and Optical Character Recognition (OCR) processing, together with an optional biometric face capture.

The task submits the applicant's identity data to Mexico's INE database, where each available data point (such as elector key, OCR number, the applicant’s name) is independently compared against the official record.

If a face capture has been provided, the applicant's photograph is also matched against the image stored in the INE database. Once all comparisons have been completed, the task produces an overall verification result along with a detailed breakdown of the outcome for each individual comparison.

Query INE Database task inputs

The table below outlines the applicant details (both mandatory and optional) that map as inputs to the Query INE Database task:

InputRequiredDescription
ineConsentGrantedYesApplicant's consent to query the INE database. Must be true.
versionNumberYesThe issue (version) number printed on the credential.
mrzLine1No*First MRZ line of the document; the OCR number and CIC are extracted from it.
personalNumberNo*OCR number, used when MRZ data is not available.
documentNumberNoCIC, only used when mrzLine1 is not provided.
claveDeElectorNoThe 18-character elector key.
curpNoThe applicant's CURP.
firstNameNoApplicant's first name.
fatherNameNoPaternal surname.
motherNameNoMaternal surname.
registrationDateNoRegistration date (ISO-8601).
issueDateNoIssue date (ISO-8601).
faceCaptureNoFace capture reference; enables the face comparison.

* mrzLine1 takes precedence: when provided, the OCR number and CIC are extracted from it and personalNumber / documentNumber are ignored. When mrzLine1 is not provided, personalNumber is required (and documentNumber may supply the CIC). A mrzLine1 value that does not contain a << separator followed by digits fails validation - there is no fallback to personalNumber.

Several Query INE inputs can be populated using outputs from a preceding Document Report task or Document Report Instant task. The following tables describe the mappings between each task's outputs and the corresponding Query INE inputs.

Inputs from the Document Report task

Document Report OutputQuery INE input
document report -> properties -> Document numbersDocument Numbers
document report -> properties -> MRZ line1MRZ Line 1
document report -> properties -> Version numberVersion Number
document report -> properties -> Document numberDocument Number
document report -> properties -> Father nameFather Name
document report -> properties -> First nameFirst Name
document report -> properties -> Issuing dateIssue Date
document report -> properties -> Mother nameMother Name
document report -> properties -> Personal numberPersonal Number

Inputs from the Document Report Instant task

Document Instant OutputQuery INE input
document report instant -> properties -> MRZ line1MRZ Line 1
document report instant -> properties -> Version numberVersion Number
document report instant -> properties -> Clave de electorClave de elector
document report instant -> properties -> CurpCURP
document report instant -> properties -> Document numberDocument Number
document report instant -> properties -> Father nameFather Name
document report instant -> properties -> First nameFirst Name
document report instant -> properties -> Issuing dateIssue Date
document report instant -> properties -> Mother nameMother Name
document report instant -> properties -> Personal numberPersonal Number
document report instant -> properties -> First issue dateRegistration Date

Result logic

The task result is either:

  • clear - every applicable identity comparison (and the face comparison, if performed) matched
  • consider - one or more comparisons did not match

Task breakdowns and property descriptions

Breakdown or propertyDescription
properties.registration_typeThe registration type held by INE (string value returned by the provider; empty when not available)
properties.lost_or_theft_reportThe lost/theft report type held by INE (string value returned by the provider; empty when no report exists)
breakdown.identity_data_comparisonPer-field match results. The issue_number, elector_key and ocr comparisons are always evaluated. The first_name, parental_surname, maternal_surname, registration_year, issue_year and curp comparisons are only included when the corresponding input was supplied
breakdown.face_comparisonFace match result with score and threshold (present only when a face capture was supplied)

Below is an example of the breakdowns returned by the Query INE Database task, including all supported fields returned in the properties attribute:

json
1{
2 "result": "consider",
3 "properties": {
4 "registration_type": "VIGENTE",
5 "lost_or_theft_report": ""
6 },
7 "breakdown": {
8 "face_comparison": {
9 "result": "clear",
10 "breakdown": {
11 "face_match": {
12 "result": "clear",
13 "properties": { "threshold": 0.9, "score": 0.97 }
14 }
15 }
16 },
17 "identity_data_comparison": {
18 "result": "consider",
19 "breakdown": {
20 "first_name": { "result": "clear" },
21 "elector_key": { "result": "consider" },
22 "ocr": { "result": "clear" }
23 }
24 }
25 }
26}

Task configuration

The minimum face-match score can be optionally configured for the Query INE Database task in the Workflow Builder:

INE configuration example

OptionDefaultDescription
biometricMatchThreshold90Minimum face-match score (0–100) for the face comparison to be clear. Applies only to breakdown.face_comparison. This does not affect identity data comparisons

The threshold and score in face_comparison are on a 0–1 scale. A biometricMatchThreshold of 90 (0–100 in configuration) is normalized to 0.9 in the output.

Errors

Both errors below are terminal: the task stops and returns an error instead of a result. They mean the request couldn't be processed as submitted, not that the service is down - so resubmitting the same request won't change the outcome.

Error typeMeaning
input_validationA required input was missing or malformed (e.g. missing consent, invalid MRZ or date).
configuration_validationThe task or client configuration is invalid (e.g. ine port not configured).

These errors will be returned upon trying to run workflow.