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. ( INE Samples )
- Verify INE data through the INE Nominal List. This version get the messages without any change, that means the message is exactly as the returned by the original INE source.
- Verify CURP through RENAPO. This version obtain the Related Curps.
- Ine Nominal List section/node incorporates the TAG1,TAG2,TAG3 fields, corresponding to the Ine Nominal List supplementary info.

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. |
| notaCurp | string | CURP Certificada: verificada con el Registro Civil - Message displayed when the CURP was verified by the civil registry entity. That means the CURP is recognized by RENAPO. CURP´s asociadas por corrección - Message displayed when the CURP has any other CURP associated by rectification. |
| 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. |
| tag1 | string | First supplementary information, relating to verify a voter ID, as provided in the Nominal List. |
| tag2 | string | Second supplementary information, relating to validity, as provided in the Nominal List. |
| tag3 | string | Third supplementary information, relating to notifications, as provided in the Nominal List. |
| 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":[],
"notaCurp":"string"
},
"nominalListData": {
"canVote": true,
"type": "string",
"electorCode": "string",
"cicNumber": "string",
"issueNumber": "string",
"issueYear": "string",
"registrationYear": "string",
"ocrNumber": "string",
"expDate": "string",
"tag1":"string",
"tag2":"string",
"tag3":"string",
},
"warnings": [{
"code": "string",
"message": "string"
}]
}
Error:
| Name | Type | Description |
|---|---|---|
| code | string | Error code. |
| message | string | Error message. |
| fullMessage | string | Full message means join of the code ot client and Error message. |
{
"code": "string",
"message": "string"
"fullMessage": "string"
}
Clien and internal errors (4xx / 5xx)
| Code | Message | Description | HTTP code |
|---|---|---|---|
| 00 | Success | Indicates whether the request was successful or not. If everything goes well, the data structure will be returned. | 200 |
| Errors | |||
| INE001 | Incorrect params. There is no backFile or frontFile. | Message displayed when the request is processed but no content is provided (e.g., when neither the front nor back image is sent). | 400 |
| INE002 | Incorrect information. There is not frontFile. | Message displayed when the front image is not provided. | 400 |
| INE003 | Incorrect information. There is not backFile. | Message displayed when the back image is not provided. | 400 |
| INE004 | The format of the input document does not correspond to any of the allowed JPG, JPEG and PNG | Message displayed when the front or back file is not in a valid image format. | 415 |
| INE005 | INE / IFE document was not detected in ineFront or ineBack images. | Message displayed when the image does not correspond to a valid INE or IFE document. | 422 |
| INE006 | The file size is not within the approximate range of 4 MB allowed. | Message displayed when the file exceeds the allowed size. | 413 |
| INE008 | Something was wrong, we are working on the failure. | Message displayed when a server error occurs. | 500 |
| INE009 | Access Denied. ApiKey not present. | Message displayed when the request does not include a valid ApiKey. | 401 |
| INE010 | Unable to identify INE type. | Message displayed when the image cannot be classified. | 422 |
| INE011 | We detect two images of the same side. | Message displayed when both uploaded images correspond to the same side (either both front or both back). | 400 |
| INE012 | Front image type: {Type} not supported. | Message displayed when the front image corresponds to an unsupported (e.g., expired) document type. | 415 |
| INE013 | Back image type: {Type} not supported. | Message displayed when the back image corresponds to an unsupported (e.g., expired) document type. | 415 |
| INE015 | Unable to identify INE type in ineFront and/or ineBack images. | Message displayed when the image types do not match or cannot be detected. | 422 |
| INE016 | The data obtained from the front and back of the INE is Non-coherent information | Message displayed when inconsistencies are detected between front and back data (e.g., name, date of birth, electoral ID, or address). | 422 |
| INE017 | There is some issues processing the request. Please try again later | Message displayed when the service is temporarily overloaded. Please try again later. | 503 |
| INE104 | Inconsistent data found on INE. | Message displayed when inconsistencies are detected in the extracted INE data. | 422 |
| INE105 | The ineFront: {0} format does not match the ineBack: {1} format. | Message displayed when the document type does not match between the front and back images. | 422 |
| INE118 | Inconsistent RENAPO CURP data with INE CURP. | Message displayed when the CURP from the INE does not match the CURP obtained from RENAPO. | 422 |
| INE119 | INE Type A, B and C are deprecated. | Message displayed when the INE type A, B, or C is used, as they have been deprecated as official identification since 2018. | 400 |
| INE120 | The Gender field not present in the front. | Message displayed when gender information is not present on the front, possibly due to voter request. | 422 |
| INE121 | The front side and back side of the ID card are attributed to different individuals. | Message displayed when the front and back images appear to belong to different individuals. | 422 |
| INE122 | The card has inconsistent data with Nominal List. | Message displayed when discrepancies exist between the ID card and the Nominal List. | 422 |
| INE131 | It was not possible to process the CURP, we are working on the error. | Message displayed when the RENAPO service is unavailable due to connectivity issues. | 503 |
| INENL004 | Formato de número de emisión no válido. | Message displayed when the "issueNumber" field is not numeric or does not have a length of 2 characters. | 400 |
| INENL005 | Formato de identificación no válido. | Message displayed when the "Id" field is not numeric or does not have a length of 9 or 18 characters. | 400 |
| INENL006 | Formato OCR no válido. | Message displayed when the "ocr" field is not numeric or does not have a length of 9 or 13 characters. | 400 |
Warnings on successful response (HTTP 200)
| Code | Message | Description | HTTP code |
|---|---|---|---|
| INE100 | Glare detected on front image | Message displayed when glare detected in the front image. | 200 |
| INE101 | Glare detected on back image | Message displayed when glare detected in the back image. | 200 |
| INE102 | Front image without focus | Message displayed when blur detected in the front image. | 200 |
| INE103 | Back image without focus | Message displayed when blur detected in the back image. | 200 |
| INE130 | Ilegible CURP data. | Message displayed when the CURP info is not legible. | 200 |
| 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. | 200 |
Warnings with Partial Success — External Dependency (HTTP 203)
| Code | Message | Description | HTTP code |
|---|---|---|---|
| INE106 | Person not detected in ineFront. | Message displayed when the face is not detected in ineFront. | 203 |
| INE107 | CURP was not found in RENAPO. | Message displayed when CURP was not found in RENAPO. | 203 |
| INE108 | CURP validation was not performed with RENAPO. | Message displayed when RENAPO service was not available. | 203 |
| INE111 | The RENAPO service was not available. | Message displayed when CURP service of RENAPO was not available. | 203 |
| INE112 | The Electoral Id was not found. | Message displayed when the Electoral Id couldn't be read. | 203 |
| INENL001 | Unable to validate data with source | Message displayed when the INE servers cannot be reached. | 203 |
| INENL009 | Incorrect or non-existent data | When there's an incorrect or non-existent data to check. | 203 |
| INENL010 | The credential is not accepted as official identification | When the sent credential couldn't be used as identification. | 203 |
| INENL011 | La credencial no es válida para votar. | Message displayed when the credential cannot be used for voting. | 203 |
| INENL013 | Servicio no disponible por parte de la entidad INE nominal. | Message displayed when the Nominal List entity service is unavailable. | 203 |
| INENL017 | MRZ Invalido | Message displayed when the data in the Machine Readable Zone (MRZ) is unreadable. | 203 |
| INENL020 | No se obtuvieron datos de la consulta con los parámetros seleccionados. | When no information was found with the sent parameters. | 203 |
| INENL050 | No está vigente como medio de identificación | When the sent credential couldn't be used as identification | 203 |
| INENL051 | Credential deregistered due to loss of validity | The credencial has expired | 203 |
Behavior Summary by HTTP Status Code
| HTTP code | Behavior | Billing | Scenario |
|---|---|---|---|
| 200 | Successful | Billable | All sources responded OK. May include quality warnings (INE100–103). |
| 203 | Partial Success | Billable | At least one source failed (RENAPO, Nominal List). Response includes warnings. |
| 400 | Client Error | Billable | Missing parameters, incorrect format, deprecated types. |
| 401 | Unauthorized | Billable | ApiKey not provided or invalid. |
| 413 | Payload Too Large | Billable | Image exceeds 4 MB. |
| 415 | Unsupported Media Type | Billable | Unsupported file format (not JPG/PNG/JPEG). |
| 422 | Unprocessable Entity | Billable | Unprocessable image, inconsistent data, unrecognized INE. |
| 500 | Internal Server Error | Non-billable | Internal error in Tu Identidad. |
| 503 | Service Unavailable | Non-billable | External dependency unavailable or connectivity error. |