INE validation service

INE service

The service do the processes of 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.

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

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 Verification of the type, it could be C, DEF, GH. Default value true.
checkCurp boolean yes CURP verification in RENAPO (Registro Nacional de Población) database. Default value true.
checkFace boolean yes Check the 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.
FrontFile file yes Image file of the front side of INE.
BackFile file yes Image file of the back side of INE.

Headers

Tag Type Required Description
apikey string yes Customer key.

FormData

{
  "checkInfo": boolean,
  "checkQuality": boolean,
  "checkPatterns": boolean,
  "checkCurp": boolean,
  "checkFace": boolean,
  "debugRenapo": boolean,
  "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 TypeC, TypeDEF.
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
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.
idNumber string Id number for the IDs type C located on the back.
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
mz2 string Second line of values in the back of the id. Does not apply to type C.
mz3 string Third line of values in the back of the id. Does not apply to type C.
expirationDate string Expiration Date of the document.
warnings string Error messages.

JSON file

{
  "valid": boolean,
  "type": "string",
  "validations": {
    "info": boolean,
    "quality": boolean,
    "curp": boolean,
    "patterns": boolean,
    "face": 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"
  },
  "warnings": [
    {
      "code": string,
      "message": string
    }
  ]
}

Error:

Name Type Description
code string Error code.
message string Error message.
{
  "code": string,
  "message": 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.
INE001 Incorrect information. There is no Back and Front. 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. Does not exist Front. Message that is displayed when the front image is not sent.
INE003 Incorrect information. Does not exist Back. 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 displayed when the front or back file are not a image.
INE005 INE / IFE document was not detected in ineFront or ineBack images. Message display when the format not corresponds to .jpeg, .jpg or .png. Also, if the document isn't a voter ID.
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 an image couldn't be classification as any INE type.
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: {0} 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: {0} 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 Different type of document was detected between both images. frontFile Type: {0}. backFile Type: {1}. Message displayed when the INE type don't match between the two images.
INE100 Glare detected on front image. Message displayed when the front image have glare.
INE101 Glare detected on back image. Message displayed when the back image have glare.
INE102 Front image without focus. Message displayed when the front image it is not in focus.
INE103 Back image without focus. Message displayed when the back image it is not in focus.
INE104 Inconsistent data found on INE. Message displayed when the information does not match.
INE105 The ineFront: {0} format does not match the ineBack: {1} format. Message displayed when the INE type don't match between the two images.
INE106 Person not detected in ineFront. Message displayed when a person is not detected.
INE107 CURP was not found in RENAPO. Message displayed when the CURP was not found in the source.
INE108 CURP validation was not performed with RENAPO. Message displayed when the CURP couldn't find in RENAPO.
INE111 The RENAPO service was not available. Message displayed when RENAPO service is unavailable.