INE validation service
INE service V4
The service makes the identification, classification and validation of the voter identification card issued by the National Electoral Institute to verify the authenticity and trust of the data by consulting directly in the official entities.
This service is similar to the INE V2 version but the response information of the CURP and INE Nominal List objects has some differences.
Rest Web service description
The service offers two ways to verify the authenticity of official documents.
1.- Identification and classification The first is the identification and classification, the pre-processing parameters checkQuality, checkPatterns, checkFace are used to add the results of the physical and quality controls in the validation equation of the document. These parameters do not change the function of the service, as "identification and classification" is done to determine OCR processing and metadata retrieval.
Parameters to send: checkQuality (default true), checkPatterns (default true), checkFace (optional).
2.- Validation The second is the validation phase, the post-processing or "metadata validation" modify the execution of the service.
Parameters to send: checkInfo (by default true and optional), checkCurp (by default true and optional).
And finally, debugRenapo (not considered for the validation process).
~/api/Business/ine
Versions
- Version 4 (4.0)
- Supports voter ID types D, E, F, G and H.
- Validate INE data at INE nominal list and get metadata found, This version obtain the messages as original site.
- Validate CURP data at RENAPO and get metadata found. This version obtain the Related Curps.
Parameters
Tag | Type | Required | Description |
---|---|---|---|
checkInfo | boolean | yes | Data verification. Default value true. |
checkQuality | boolean | yes | Quality verification on front and back documents. Default value true. |
checkPatterns | boolean | yes | Patters verification to validate authenticity of documents. Default value true. |
checkCurp | boolean | yes | CURP verification in RENAPO database. Default value true. |
checkFace | boolean | no | Face of the person in the mexican ID. Default value true. |
debugRenapo | boolean | no | Flag to send the same error as RENAPO was unavailable. Default value false. |
v | string | no | Service version, must be 4.0 |
FrontFile | file | yes | Image File of the front side of INE. |
BackFile | file | yes | Image File of the back side of INE. |
- Note 1: File's weight max is 4 MB. The minimum 1MB.
- Note 2: File formats allowed are .JPG .PNG and .JPEG.
- Note 3: The maximum size allowed 4992px x 3328px
- Note 4: Image with focus.
- Note 5: Cropped INE image without excess of background is required.
- Note 6: Vertical orientation.
Required characteristics for images (front and back).
Characteristic | Description |
---|---|
Focused | The images must be focused and show readable information for the correct execution of the OCR process. |
Brightness | The images must not show glare, brightness or contrast alterations that cause error in the validation of authenticity. |
Quality | The documents must have legibility characteristics, not be modified, not present physical damage or alteration. |
Figure | The image should preferably be in the shape of a rectangle, where only the credential is shown without excessive background. Likewise, for both sides of the document. |
Accepted types | The credential have to be types D, E, F, G or H. |
Headers
Tag | Type | Required | Description |
---|---|---|---|
ApiKey | string | yes | Customer key. |
x-Version | string | no | Service version, must be 4.0. |
Url Parameters
{
"checkInfo": boolean,
"checkQuality": boolean,
"checkPatterns": boolean,
"checkCurp": boolean,
"checkFace": boolean,
"debugRenapo": boolean,
"v": string
}
FormData
{
"FrontFile": file,
"BackFile": file
}
Response:
Correct:
Name | Type | Description |
---|---|---|
Valid | boolean | The result of verifications. |
type | string | Result of the type identified for the different documents like TypeDEF or TypeGH. |
Validations | ||
info | boolean | Result of INE validations process. |
quality | boolean | Quality check for INE Image. Cannot have glare and it must be on focus. |
curp | boolean | Result of CURP verification in RENAPO database. |
patternCheck | boolean | Result of INE pattern check. |
face | boolean | Result of face check. |
nominalListCheck | boolean | Result of Ine verification in Nominal List. |
Front | ||
focus | boolean | Checks if the front image it is in focus. |
glare | boolean | Checks if the front image does not have glare. |
Back | ||
focus | boolean | Checks if the back image it is in focus. |
glare | boolean | Checks if the back image does not have glare. |
Data | ||
name | string | Name. |
firstlastname | string | First Surname. |
secondlastname | string | Second Surname. |
addressline | string | Address Line one. |
addressline2 | string | Address Line two. |
addressline3 | string | Address Line tree. |
electoralId | string | Voter ID. |
curp | string | Clave Única de Registro de Población. |
dateOfbirth | string | Date of birth. |
sex | string | Gender. |
folio | string | Identifier for the IDs type C located on the front. Type C credential, obsolete format that can no longer vote. |
idNumber | string | Id number for the IDs type C located on the back. Type C credential, obsolete format that can no longer vote. |
idmex | string | Id number for the IDs type DEF located on the back. |
mz1 | string | First line of values in the back of the id. Does not apply to type C. Type C, obsolete format that can no longer vote. |
mz2 | string | Second line of values in the back of the id. Does not apply to type C. Type C credential, obsolete format that can no longer vote. |
mz3 | string | Third line of values in the back of the id. Does not apply to type C.Type C credential, obsolete format that can no longer vote. |
expirationDate | string | Expiration Date of the document. |
CURP Data from RENAPO | ||
hasrelatedcurp | bool | True if exist one or more related CURPs |
relatedcurp | array strings | List of related CURPs, empty if has not related curp. |
curp | string | Clave Única de Registro de Población. |
names | string | Name. |
lastname | string | First Surname. |
secondlastname | string | Second Surname. |
sex | string | Gender. |
dateofbirth | string | Date of birth. |
nationality | string | Nationality. |
entity | string | Entity of birth. |
crip | string | Identity registration key. |
statusCurp | string | Status of CURP. |
folio | string | Folio. |
probationaryDocument | string | Probationary Document. |
foreignerNumber | string | Foreigner number. |
registrationEntity | string | Entity of registry. |
tome | string | Tome of registry. |
municipalityRegistryKey | string | Municipal registration key. |
yearOfregistry | string | Year of registry. |
registryEntityKey | string | Entity registration key. |
page | string | Page of registry. |
actNumber | string | Act number. |
book | string | Book of registry. |
Nominal List Data from INE | ||
canVote | boolean | Identification can be used to vote. |
type | string | Identification type. |
electorCode | string | Electoral code. |
cicNumber | string | Credential Identification Code. |
issueNumber | string | Issue number. |
issueYear | string | Issue year. |
registrationYear | string | Year of registry. |
ocrNumber | string | Optical Character Recognition Code. |
expDate | string | Expiration date. |
warnings | array | Error messages. |
JSON file
{
"valid": boolean,
"type": "string",
"validations": {
"info": boolean,
"quality": boolean,
"curp": boolean,
"patterns": boolean,
"face": boolean,
"nominalListCheck": boolean
},
"front": {
"focus": boolean,
"glare": boolean
},
"back": {
"focus": boolean,
"glare": boolean
},
"data": {
"name": "string",
"firstLastName": "string",
"secondLastName": "string",
"addressLine1": "string",
"addressLine2": "string",
"addressLine3": "string",
"electoralId": "string",
"curp": "string",
"dateOfBirth": "string",
"sex": "string",
"folio": "string",
"idNumber": "string",
"idMex": "string",
"mz1": "string",
"mz2": "string",
"mz3": "string",
"expirationDate": "string"
},
"curpData": {
"curp": "string",
"names": "string",
"lastname": "string",
"secondlastname": "string",
"sex": "string",
"dateofbirth": "string",
"nationality": "string",
"entity": "string",
"crip": "string",
"statusCurp": "string",
"folio": "string",
"probationaryDocument": "string",
"foreignerNumber": "string",
"registrationEntity": "string",
"tome": "string",
"municipalityRegistryKey": "string",
"yearOfregistry": "string",
"registryEntityKey": "string",
"page": "string",
"actNumber": "string",
"book": "string"
"hasRelatedCurp": false,
"relatedCurp":[]
},
"nominalListData": {
"canVote": true,
"type": "string",
"electorCode": "string",
"cicNumber": "string",
"issueNumber": "string",
"issueYear": "string",
"registrationYear": "string",
"ocrNumber": "string",
"expDate": "string"
},
"warnings": [{
"code": "string",
"message": "string"
}]
}
Error:
Name | Type | Description |
---|---|---|
code | string | Error code. |
message | string | Error message. |
fullMessaeg | string | Full message means join of the code ot client and Error message. |
{
"code": "string",
"message": "string"
"fullMessage": "string"
}
Service messages
Code | Message | Description |
---|---|---|
00 | Success | Indicates whether the request was successful or unsuccessful. If everything goes well, the structure of the data will be displayed. |
Errors | ||
INE001 | Incorrect params. There is no backFile or frontFile. | Message that is displayed when the request has been completed successfully but its response has no content, (Example: when the front and back image is not sent). |
INE002 | Incorrect information. There is not frontFile. | Message that is displayed when the front image is not sent. |
INE003 | Incorrect information. There is not backFile. | Message that is displayed when the back image is not sent. |
INE004 | The format of the input document does not correspond to any of the allowed JPG, JPEG and PNG | Message that is displayed when the back or front file is not an image format file. |
INE005 | INE / IFE document was not detected in ineFront or ineBack images. | Message displayed when the image does not correspond to a correct INE or IFE. |
INE006 | The file size is not within the approximate range of 4 MB allowed. | Message displayed when the file is larger than the allowed. |
INE008 | Something was wrong, we are working on the failure. | Message displayed when there is an error on the server. |
INE009 | Access Denied. ApiKey not present. | Message displayed when a request is received with an unauthorized ApiKey. |
INE010 | Unable to identify INE type. | Message displayed when the image cannot be classificated. |
INE011 | We detect two images of the same side. | Message displayed when the two images received are the same side of the document. This could be two front or two back. |
INE012 | Front image type: {Type} not supported. | Message displayed when the front side of the document corresponds to a document type that is not supported because is expired. Example: Document type B. |
INE013 | Back image type: {Type} not supported. | Message displayed when the back side of the document corresponds to a type of document that is not supported because is expired. Example: Document type B. |
INE014 | Access Denied. ApiKey header not found. | Message displayed when the ApiKey does not exist. |
INE015 | Unable to identify INE type in ineFront and/or ineBack images. | Message displayed when the images type do not match or could not be detect. |
Warnings | ||
INE100 | Glare detected on front image | Message displayed when glare detected in the front image. |
INE101 | Glare detected on back image | Message displayed when glare detected in the back image. |
INE102 | Front image without focus | Message displayed when blur detected in the front image. |
INE103 | Back image without focus | Message displayed when blur detected in the back image. |
INE104 | Inconsistent data found on INE. | Message displayed when inconsistency was found in the data obtained from the INE. |
INE106 | Person not detected in ineFront. | Message displayed when the face is not detected in ineFront |
INE107 | CURP was not found in RENAPO. | Message displayed when CURP was not found in RENAPO. |
INE108 | CURP validation was not performed with RENAPO. | Message displayed when RENAPO service was not available. |
INE111 | The RENAPO service was not available. | Message displayed when CURP service of RENAPO was not available. |
INE112 | The Electoral Id was not found. | Message displayed when the Electoral Id couldn't be read. |
INE116 | Unable to identify INE type in front. | The frontal image was not recognized as INE. |
INE117 | Unable to identify INE type in back. | The back image was not recognized as INE. |
INE118 | Inconsistent RENAPO CURP data with INE CURP. | The INE CURP data does not match the data obtained from RENAPO CURP. |
INE119 | INE Type A, B and C are deprecated. | The INE type A,B y C were depreced as oficial identification since 2018. |
INE120 | The Gender field not present in the front. | Gender information may have been withheld at the voter's request |
INE130 | Ilegible CURP data. | The Curp info is not legible. |
INE131 | The RENAPO service was not available. | Message displayed when the network connection with RENAPO service has not available |
INENL001 | No se pueden validar los datos con la fuente. | Mensaje que se muestra cuando no se pueden consultar los servidores del INE. |
INENL002 | Algo esta mal, estamos trabajando en el fallo. | Mensaje que se muestra cuando hay un error en el servidor. |
INENL003 | Acceso denegado. No se encontró el encabezado de ApiKey. | Mensaje que se mostrará cuando el usuario ingrese una clave apikey incorrecta o cuando la clave apikey no se muestre. |
INENL004 | Formato de número de emisión no válido. | Mensaje que se muestra cuando el campo "issueNumber" no es numérico y tiene una longitud distinta a 2 caracteres. |
INENL005 | Formato de identificación no válido. | Mensaje que se muestra cuando el campo "Id" no es numérico y tiene una longitud distinta de 9 o 18. |
INENL006 | Formato OCR no válido. | Mensaje que se muestra cuando el campo "ocr" no es numérico y tiene una longitud distinta a 9 o 13 |
INENL007 | Tipo no válido. | Mensaje que se muestra cuando el campo "tipo" no tiene un valor de "C", "D", "E", "F", "G" o "H". |
INENL008 | No se pueden validar los datos. | Mensaje que se muestra cuando se excede el tiempo de espera para la validación con respecto a la fuente. |
INENL011 | La credencial no es válida para votar. | Mensaje que se muestra cuando la credencial no se puede utilizar para votar. |
INENL012 | El tiempo de espera está fuera de rango; debe estar entre 1000 y 30000. | Mensaje que se muestra cuando el tiempo de espera está fuera de rango. |
INENL013 | Servicio no disponible. | Mensaje mostrado cuando no se pudo realizar la validación. |
INENL015 | Acceso denegado, la empresa no pudo ser identificada. | Mensaje mostrado cuando el apikey de la empresa es inválida |
INENL016 | El registro no pudo ser encontrado | Mensaje mostrado cuando los datos proporcionados no arrojan ningún valor coincidente. |
INENL017 | Fail to validate info received from INE Nominal List | Message displayed when the INE Nominal List is offline |
Incorrect or non-existent data messages
Code | Message | Description |
---|---|---|
INENL020 (INENL009) | No se obtuvieron datos de la consulta con los parámetros seleccionados | Message displayed when no information related to the entered data was found in the INE source. |
INENL021 | No se obtuvieron datos de la consulta con los parámetros seleccionados, verifica que no tienes un trámite posterior | Message displayed when exist a new INE by transact or no information related to the data entered in the INE source has been found. |
Valid as Official Identification messages
Code | Message | Description |
---|---|---|
INENL030 | Está vigente como medio de identificación | Message displayed when the credential is valid as Official Identification |
INENL031 | Está vigente como medio de identificación, Tu domicilio dejó de pertenecer a la Sección Electoral | Message displayed when the credential is valid as Official Identification, but it must be renewed, due to changes in the Electoral Section. |
INENL040 | Esta vigente como medio de identificación y puedes votar | Message displayed when the credential is valid as Official Identification and valid to voting. |
No Valid as Official Identification messages
Code | Message | Description |
---|---|---|
INENL050 (INENL010) | No está vigente como medio de identificación | Message displayed when the credential is not valid as Official Identification |
INENL051 | No está vigente como medio de identificación, ¡Tú credencial fue dada de baja por pérdida de vigencia! | Message displayed when the credential was canceled due to loss of validity |
INENL052 (INENL014) | No está vigente como medio de identificación, ¡Esta no es tu última credencial!, realizaste un trámite de actualización de datos | Message displayed when this is not the latest voter ID issued, check the current IFE/INE |