CURP document service

CURP document service

The service consists of validating the registration of CURP using methods, the first one by biographical data and the second by CURP key. It obtains the information associated with a CURP and the base-64 encrypted PDF document, searching the RENAPO database directly.

Web service description

Search method using biographical data

POST :

~/api/CurpDocument/byData

FormBody

{
  {
    "name": "string",
    "lastName": "string",
    "secondLastName": "string",
    "birthDate": "string" (2),
    "birthMonth": "string" (2),
    "birthYear": "string", (4)    
    "sex": "string" (1),
    "state": "string" (2)
  }
}

Search method using the CURP key

POST :

~/api/CurpDocument/byCurp

FormBody

{
    "curp": "string"
}

Response:

The service responds by means of a JSON file with the following information:

Name Type Description
valid boolean It indicates if exist the CURP in the database.
curp string Clave Única de Registro de Población CURP.
names string Names of the citizen.
lastName string Last name of the citizen.
secondLastName string Second last name of the citizen.
sex string Sex of the person.
birthDate string Date of birth.
nationality string Nationality.
entity string Name of the federal entity.
evidentiaryDocument string Data found in the evidentiary document.
registrationEntity string Registration entity.
registryEntityKey string Registration entity key.
tome string Volume where the CURP was found.
municipalityRegistry string Municipality registry.
municipalityRegistryKey string Municipality registry key.
yearRegistry string Year of registry.
page string Page.
actNumber string Act number.
book string Book
hasRelatedCurp bool The actual CURP is related to some other CURPs.
relatedCurp string The Related CURPs
file base64 CURP document in PDF format, base64 encoded.

Success

{
  "valid": true,
  "data": {
    "curp": "string",
    "names": "string",
    "lastName": "string",
    "secondLastName": "string",
    "sex": "string",
    "dateBirth": "dd/mm/yyyy",
    "nationality": "string",
    "entity": "string",
    "hasRelatedCurp": false,
    "relatedCurp": [],
    "evidentiaryDocument": {
      "registrationEntity": "string",
      "tome": string,
      "municipalityRegistryKey": "string",
      "yearRegistry": "yyyy",
      "registryEntityKey": string,
      "page": "string",
      "actNumber": "string",
      "book": "string",
      "municipalityRegistry": "string"
    }
  },
  "file": PDF.base64
}

Error structure

Name Type Description
code string Error code.
message string Error message.

Error model

{
  "error": "string", // Error code
  "message": "string" // Error message
}

State codes in the Mexican Republic

State Code
Aguascalientes AS
Baja California BC
Baja California Sur BS
Campeche CC
Chiapas CS
Chihuahua CH
Coahuila CL
Colima CM
Distrito Federal DF
Durango DG
Guerrero GR
Hidalgo HG
Jalisco JC
México MC
Michoacán MN
Morelos MS
Nayarit NT
Nuevo León NL
Oaxaca OC
Puebla PL
Querétaro QT
Quintana Roo QR
San Luis Potosí SP
Sinaloa SL
Sonora SR
Tabasco TC
Tlaxcala TL
Tamaulipas TS
Guanajuato GT
Veracruz VZ
Yucatán YN
Zacatecas ZS

Service messages

Code Message Description
Success JSON structure Structure with the information found in Renapo.
CURPDOC001 No matches found in RENAPO Message displayed when no match was found with the searched CURP.
CURPDOC002 The curp field is required Message displayed when the CURP value is not entered, when the search is performed by CURP.
CURPDOC003 Access Denied. ApiKey header not found. Message displayed when the apikey is incorrect or when it was not sent.
CURPDOC004 The structure of the curp is incorrect. Message displayed when the structure of the curp is incorrect, when the search is carried out by CURP only or when the enters values that do not correspond to biographical information as names or birth information.
CURPDOC005 CURP service is not available. Message displayed when curp service is not available.
CURPDOC006 Unable to validate data with source. Message displayed when the timeout for validation against the source is exceeded.
CURPDOC007 Something was wrong, we are working on the failure. Message displayed when there is an error on the server.
CURPDOC008 The Name is invalid. Message displayed when name value is not entered or invalid characters are entered as numbers.
CURPDOC009 The lastname is invalid. Message displayed when the value of the paternal last name is not entered or when invalid characters are entered as numbers.
CURPDOC010 The secondLastname is invalid. Message displayed when the value of the mother's last name is not entered or when invalid characters are entered as numbers.
CURPDOC011 The sex field is invalid. Message displayed when gender value null or incorrect.
CURPDOC012 The birthDate field is invalid. Message displayed when the value of the date of birth is null or when invalid characters such as $ # $! #% are entered.
CURPDOC013 The birthMonth field is invalid. Message displayed when the birth month value is null or when invalid characters such as # $% &% $ & are entered.
CURPDOC014 The birthYear field is invalid. Message displayed when the birth year value is null or when invalid characters such as # $% &% $ & are entered.
CURPDOC015 The state field is invalid. Message displayed when the correct birth status value is not entered or when invalid characters such as # $% &% $ & are entered.
CURPDOC020 The CURP PDF file is not available for download at this time The information is available, but the PDF file cannot be downloaded at this time.