Service to obtain and validate a Cédula Profesional
Intro
This API allows you to obtain and validate a Cédula Profesional from the SEP system.
Important points
Required parameters
The required fields in this endpoint are:
- nombre
- paterno
The optional fields are:
- materno
- idCedula
The response will contain all the information associated with the name of the person searched. For example, if we search for Mr. Pierre Dupont with the following request body:
{
"nombre":"Pierre",
"paterno":"Dupont"
}
The service will return all the Alexandre grin registered in the SEP system.
{
"id": "644326039021342fbce2a112",
"createdAt": "2023-04-22T00:10:43.223300471Z",
"finishedAt": "2023-04-22T00:10:43.561215566Z",
"duration": 337,
"status": "SUCCESS",
"request": {
"nombre": "Pierre",
"paterno": "Dupont"
},
"response": {
"results": [
{
"anioExpedicion": 2013,
"genero": "Hombre",
"institution": "UNIVERSIDAD FRANCESA",
"nombre": "JAVIER PIERRE DUPONT LAZARO",
"numeroCedula": "8186600",
"profesion": "LICENCIATURA EN PEDAGOGÍA",
"tipoCedula": "C1"
},
{
"anioExpedicion": 2005,
"genero": "Hombre",
"institution": "UNIVERSIDAD LA SALLE",
"nombre": "PIERRE DUPONT",
"numeroCedula": "123456789",
"profesion": "LICENCIATURA EN INGENIERÍA EN COMPUTACIÓN",
"tipoCedula": "C1"
},
{
"anioExpedicion": 2006,
"genero": "Hombre",
"institution": "UNIVERSIDAD DE NORMANDIA",
"nombre": "IVAN PIERRE DUPONT JEREMIAS",
"numeroCedula": "4680767",
"profesion": "LICENCIATURA EN CIENCIAS JURÍDICAS",
"tipoCedula": "C1"
}
],
"status": "FOUND"
}
}
To be more specific, you can provide the materno field in case the person has a second last name.
If you have the Cédula Profesional value, it can be sent in the request:
{
"nombre":"pierre",
"paterno":"dupont",
"idCedula":"123456789"
}
To validate if that Cédula Profesional really exists in the SEP system, the response must have only one element.
{
"id": "644326039021342fbce2a112",
"createdAt": "2023-04-22T00:10:43.223300471Z",
"finishedAt": "2023-04-22T00:10:43.561215566Z",
"duration": 337,
"status": "SUCCESS",
"request": {
"nombre": "alexandre",
"paterno": "grin"
},
"response": {
"results": [
{
"anioExpedicion": 2005,
"genero": "Hombre",
"institution": "UNIVERSIDAD LA SALLE",
"nombre": "PIERRE DUPONT",
"numeroCedula": "123456789",
"profesion": "LICENCIATURA EN INGENIERÍA EN COMPUTACIÓN",
"tipoCedula": "C1"
}
],
"status": "FOUND"
}
}
Successful response
To learn about the fields of a successful response, please refer to the examples in the Response section.
Test the service (test cases)
We included a query param in Sandbox environment, so you can query test cases that we created to run tests.
In order to obtain the response you shall fill the query param with:
-
cedula_notFound: it sends back an answer with the status "NOT FOUND" to indicate that the query was not found on the SEP system by the provided Cédula.
-
cedula_success: it sends back an answer with the status FOUND and the element found in the results list.
-
nombre_notFound: it sends back an answer with the status "NOT FOUND" to indicate that the query was not found on the SEP system.
-
nombre_success: it sends back an answer with the status FOUND and a list of all the possible results found.
-
notValid: it sends back an answer with the status "NOT_VALID" to indicate that the query was not found on the INE system.
-
unavailable: it sends back an example of unavailable service response.
Possible Errors
Required fields
You will get a 400 bad request error when any of the parameters are not provided in the request body.
{
"nombre": "REQUIRED_FIELD_ERROR; EMPTY_ERROR; can't be empty",
"paterno": "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 the specific length
{
"idCedula": "INPUT_ERROR; must contain only numbers",
"materno": "INPUT_ERROR; must contain only letters and spaces",
"nombre": "INPUT_ERROR; must contain only letters and spaces",
"paterno": "INPUT_ERROR; must contain only letters and spaces"
}
Unavailable service
{
"id": "64372bb5a30f81498806f46d",
"createdAt": "2023-04-12T16:07:49.641005-06:00",
"finishedAt": "0001-01-01T00:00:00Z",
"duration": 0,
"status": "INTERNAL_ERROR",
"errorMessage": "El servicio no se encuentra disponible",
"request": {
"idCedula": "12345",
"materno": "navarro",
"nombre": "arturo",
"paterno": "ahuactzi"
},
"response": {
"message": "El servicio no se encuentra disponible",
"status": "UNAVAILABLE"
}
}
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"
}