Validate by data

Intro

This API lets you validate the personal data of a individual, and obtain its CURP if this person is registered in the RENAPO system

Important points

Required parameters

All the parameters in the Request by Data example are required, except segundoApellido field.

claveEntidad
Indicate the state where the person was born, it must match with the key of the catalog States

fechaNacimiento
The date of birth in yyyy-MM-dd format

nombres
The first name and optionaly the second name, in alphanumeric format. Must not have special characters

primerApellido
The last name, in alphanumeric format, it can contain accents and Ñs but other special characters are not allowed

segundoApellido
The second last name, in alphanumeric format, it can contain accents and Ñs but other special characters are not allowed

sexo
Gender, it must match with the key of the catalog Gender

Successful response

To know the fields of a successful response you should see our example called Success in the response section.

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
1663567bb713cf2110a1106b4No encontradoIndicates that the CURP provided was not found in the RENAPO system
2663567bb713cf2110a1106b3Respuesta exitosaIndicates a successful response
3663567bb713cf2110a1106b5CURP inválidaIndicates that the CURP entered is not valid

📘

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

Required fields

You will get a 400 bad request error when any of the parameters are not provided in the body request.

{
    "claveEntidad": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "fechaNacimiento": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "nombres": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "primerApellido": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
    "sexo": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty"
}

Invalid format

You will get a 400 bad request error when any of the parameters do not conform to the format

{
    "claveEntidad": "CATALOG_ERROR; DOES NOT EXIST ELEMENT IN CATALOG; ",
    "fechaNacimiento": "FORMAT_ERROR; should be DD/MM/YYYY",
    "nombres": "FORMAT_ERROR; contains invalid chars",
    "primerApellido": "FORMAT_ERROR; contains invalid chars",
    "segundoApellido": "FORMAT_ERROR; contains invalid chars",
    "sexo": "FORMAT_ERROR; should be H (hombre), M (mujer) or X (non-binary)"
}

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"
}

Service Unavailable

If the CURP system is not available, this endpoint will retrieve the next response:

{
    "id": "64405bb85a7fcc51545aa79b",
    "createdAt": "2023-04-19T15:23:04.834748-06:00",
    "finishedAt": "0001-01-01T00:00:00Z",
    "duration": 0,
    "status": "SERVICE_ERROR",
    "errorMessage": "error service unavailable",
    "request": {
        "curp": "ABCD970724HYNNNL07"
    }
}
Language
Credentials
Header
Click Try It! to start a request and see the response here!