INE OCR Data Extraction

API for extracting data from the INE

Intro

This API will allow you to extract data from an INE from the front and back images. This service is a complement to the Lista Nominal API, with this service you can extract data to later validate the nominal list.

Important points

Required parameters

All fields are required, but the list may change depending on the modelo type of document.
The types of credentials that can be validated with this tool are models C, D, E, F, G and H, to validate the differences int models visit our knowledge center.

Files

It is mandatory to share the two front and back images of the INE in order to perform an OCR extraction.

The structure to be sent is as follows:

FieldSubfieldTypeDescription
FilesArrayArrangement that will contain the two documents to be processed
nameStringIndicate the name of the file to send. The possible values ​​are:

- front
- back
base64StringIndicate the base64 string of the file that corresponds to the image to be processed

Successful response

This service will return a response with the following fields:

FieldSubfieldDescription
claveElectorindicates the voter code
metadadaobject that will contain metadata
curpCURP of the person consulted
direccionAddress
nombreFull name of the person
numeroEmisionCredential issue number
ocrOCR of the credential
cicCitizen Identification Code (CIC in Spanish) of the credential
identificadorCiudadanoCitizen ID
tipoReturns credential types C, D, or E (Returns E for types E or higher)

Test the service (test cases)

We have included a query parameter in Sandbox to enable you to query the test cases that we created for running tests. To get a response, fill the testCaseId parameter with any of the following cases:

NumIdNameDescription
166e374a796f25e37055d8256Respuesta exitosa tipo CReturns an example of a successful query when the credential type is C
266e374b4922ebf2dc27ab3bfRespuesta exitosa tipo DReturns an example of a successful query when the credential type is D
366e373f0ffc913d5a03455c6Respuesta exitosa tipo EReturns an example of a successful query when the credential type is E

📘

Test your own test case

In case you want to test your own test case created in link, you can send in the testCaseId parameter the identifier of the test case you want to use.

For more information visit our knowledge center to know more about test cases

Possible Errors

Test case not found

if a test case parameter is not sent or a value other than those mentioned above is sent, the service will return the following error 400 bad request

{
    "testCase": "EMPTY_ERROR; test case not found"
}

Required Files

You will get a 400 bad request error when the parameter Files is not provided in the body request.

[
    {
        "code": "REQUIRED_FIELD_ERROR",
        "message": "EMPTY_ERROR  can't be empty",
        "field": "files"
    }
]

Empty Files

You will get a 400 bad request error when the parameter Files is empty

[
    {
        "code": "REQUIRED_FIELD_ERROR",
        "message": "EMPTY_ERROR  can't be empty",
        "field": "files"
    }
]

Empty Files

You will get a 400 bad request error when any of the fields in the parameter Files do not contain the field in Base64

[
    {
        "field": "files[0]",
        "errors": [
            {
                "code": "REQUIRED_FIELD_ERROR",
                "message": "EMPTY_ERROR  can't be empty",
                "field": "base64"
            }
        ]
    },
    {
        "field": "files[1]",
        "errors": [
            {
                "code": "REQUIRED_FIELD_ERROR",
                "message": "EMPTY_ERROR  can't be empty",
                "field": "base64"
            }
        ]
    }
]
Language
Credentials
Header
Click Try It! to start a request and see the response here!