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:
Field | Subfield | Type | Description |
---|---|---|---|
Files | Array | Arrangement that will contain the two documents to be processed | |
name | String | Indicate the name of the file to send. The possible values are: - front - back | |
base64 | String | Indicate 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:
Field | Subfield | Description |
---|---|---|
claveElector | indicates the voter code | |
metadada | object that will contain metadata | |
curp | CURP of the person consulted | |
direccion | Address | |
nombre | Full name of the person | |
numeroEmision | Credential issue number | |
ocr | OCR of the credential | |
cic | Citizen Identification Code (CIC in Spanish) of the credential | |
identificadorCiudadano | Citizen ID | |
tipo | Returns 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:
Num | Id | Name | Description |
---|---|---|---|
1 | 66e374a796f25e37055d8256 | Respuesta exitosa tipo C | Returns an example of a successful query when the credential type is C |
2 | 66e374b4922ebf2dc27ab3bf | Respuesta exitosa tipo D | Returns an example of a successful query when the credential type is D |
3 | 66e373f0ffc913d5a03455c6 | Respuesta exitosa tipo E | Returns 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"
}
]
}
]