🪪 CURP Status
The CURP validation report verifies Mexico’s national identification number (Clave Única de Registro de Población) and retrieves associated personal data from the official RENAPO database.
Overview
Section titled “Overview”CURP validation is the foundation of identity verification in Mexico. This report validates the document ID format, confirms its existence in the national registry, and retrieves associated personal information for cross-verification with other reports.
Input Requirements
Section titled “Input Requirements”Required Fields
Section titled “Required Fields”Field | Type | Description | Example |
---|---|---|---|
document_id | string | 18-character CURP code | ABCD123456EFGHIJ78 |
city_locode | string | UN LOCODE of the city | MX MEX |
Optional Fields
Section titled “Optional Fields”Field | Type | Description | Default |
---|---|---|---|
full_name | string | Expected full name for verification | null |
date_of_birth | string | Expected date of birth (YYYY-MM-DD) | null |
CURP Format Specification
Section titled “CURP Format Specification”The CURP follows a specific 18-character format:
ABCD123456EFGHIJ78
Character Breakdown
Section titled “Character Breakdown”Position | Characters | Description | Example |
---|---|---|---|
1-2 | Letters | First surname initial + vowel | AB |
3-4 | Letters | Second surname + first name initials | CD |
5-10 | Numbers | Birth date (YYMMDD) | 123456 |
11 | Letter | Gender (H=Male, M=Female) | E |
12-13 | Letters | Birth state code | FG |
14-16 | Letters | Internal consonants | HIJ |
17 | Number/Letter | Homonym differentiator | 7 |
18 | Number | Check digit | 8 |
Data Source
Section titled “Data Source”Registry: Registro Nacional de Población (RENAPO) Authority: Secretaría de Gobernación (SEGOB) Coverage: All Mexican citizens and legal residents Update Frequency: Real-time
Output Schema
Section titled “Output Schema”Successful Validation
Section titled “Successful Validation”{ "id": "beb8716f-34cc-4582-aafa-ef011b1cc6f5", "reports": { "curp": { "state": "COMPLETED", "created_at": "2021-03-30T03:18:31.242613", "updated_at": "2021-03-30T03:18:41.915065", "outcome": "PASSED", "details": { "curp": "ABCD123456EFGHIJ78", "full_name": "JUAN MIGUEL DOE ROE", "forenames": "JUAN MIGUEL", "surname": "DOE", "mothers_surname": "ROE", "gender": "M", "dob": "01-01-1900", "state_born": "VERACRUZ", "validation": { "format_valid": true, "check_digit_valid": true, "registry_found": true } } } }}
Invalid CURP Response
Section titled “Invalid CURP Response”{ "id": "beb8716f-34cc-4582-aafa-ef011b1cc6f5", "reports": { "curp": { "state": "COMPLETED", "created_at": "2021-03-30T03:18:31.242613", "updated_at": "2021-03-30T03:18:41.915065", "outcome": "FAILED", "details": { "curp": "INVALID123456789012", "validation": { "format_valid": false, "check_digit_valid": false, "registry_found": false, "errors": [ "Invalid CURP format", "Check digit mismatch", "Not found in RENAPO registry" ] } } } }}
Validation Logic
Section titled “Validation Logic”Format Validation
Section titled “Format Validation”- Length Check: Must be exactly 18 characters
- Character Pattern: Letters and numbers in correct positions
- Date Validation: Birth date must be valid calendar date
- State Code: Must be valid Mexican state code
- Gender Code: Must be ‘H’ (Hombre) or ‘M’ (Mujer)
Check Digit Algorithm
Section titled “Check Digit Algorithm”The 18th character is calculated using a specific algorithm:
// Simplified check digit calculationfunction calculateCheckDigit(curp17chars) { const weights = [18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2]; const charValues = { '0':0,'1':1,'2':2,'3':3,'4':4,'5':5,'6':6,'7':7,'8':8,'9':9, 'A':10,'B':11,'C':12,'D':13,'E':14,'F':15,'G':16,'H':17,'I':18, 'J':19,'K':20,'L':21,'M':22,'N':23,'Ñ':24,'O':25,'P':26,'Q':27, 'R':28,'S':29,'T':30,'U':31,'V':32,'W':33,'X':34,'Y':35,'Z':36 };
let sum = 0; for (let i = 0; i < 17; i++) { sum += charValues[curp17chars[i]] * weights[i]; }
const remainder = sum % 10; return remainder === 0 ? 0 : 10 - remainder;}
Related Reports
Section titled “Related Reports”CURP validation enables and validates other Mexico reports:
Name Check Report
Section titled “Name Check Report”Validates provided full_name
against RENAPO data:
{ "name_check": { "outcome": "PASSED", "details": { "score": 1.0, "full_name": "JUAN MIGUEL DOE ROE", "name_fragment_check": false, "name_score_min": 1.0 } }}
DOB Check Report
Section titled “DOB Check Report”Validates provided date_of_birth
against RENAPO data:
{ "dob_check": { "outcome": "PASSED", "details": { "provided_dob": "1900-01-01", "registry_dob": "01-01-1900", "match": true } }}
API Integration
Section titled “API Integration”Create Person with CURP Validation
Section titled “Create Person with CURP Validation”curl -X POST "https://api.emptor.io/v3/mx/persons" \ -H "X-Api-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "document_id": "ABCD123456EFGHIJ78", "city_locode": "MX MEX", "pipeline": { "name": "basic_id_check" } }'
Get CURP Report Details
Section titled “Get CURP Report Details”curl -X GET "https://api.emptor.io/v3/mx/details/{person_id}/curp" \ -H "X-Api-Key: YOUR_API_KEY"
Error Handling
Section titled “Error Handling”Common Validation Errors
Section titled “Common Validation Errors”Error Type | Description | Resolution |
---|---|---|
INVALID_FORMAT | CURP doesn’t match 18-character pattern | Verify CURP format and characters |
INVALID_CHECK_DIGIT | Check digit calculation fails | Verify CURP was entered correctly |
INVALID_DATE | Birth date in CURP is invalid | Check date components (YYMMDD) |
INVALID_STATE_CODE | State code not recognized | Verify state code is valid Mexican state |
NOT_FOUND_IN_REGISTRY | CURP not found in RENAPO | Verify CURP exists and is active |
REGISTRY_TIMEOUT | RENAPO database timeout | Retry after a few minutes |
Best Practices
Section titled “Best Practices”- Input Validation: Always validate CURP format before API calls
- Error Handling: Implement proper error handling for all validation failures
- Retry Logic: Implement exponential backoff for registry timeouts
- Data Privacy: Handle personal data according to Mexican privacy laws
Business Logic
Section titled “Business Logic”When to Use CURP Validation
Section titled “When to Use CURP Validation”- Identity Verification: Primary identity check for Mexican individuals
- Document Verification: Validate government-issued documents
- KYC Compliance: Know Your Customer requirements
- Employment Screening: Verify candidate identity
- Financial Services: Account opening and verification
Integration Patterns
Section titled “Integration Patterns”Basic Identity Check
Section titled “Basic Identity Check”CURP → Name Check → DOB Check
Standard Background Check
Section titled “Standard Background Check”CURP → Name Check → DOB Check → Criminal Records → Tax Records
Enhanced Verification
Section titled “Enhanced Verification”CURP → Name Check → DOB Check → NSS → RFC → Criminal Records → Sanctions
Related API Endpoints
Section titled “Related API Endpoints”- Create Person - Initiate CURP validation
- Get Reports - Retrieve CURP results
- Get Report Details - Detailed CURP data
- Update Reports - Refresh CURP validation
Related Documentation
Section titled “Related Documentation”- Name Check Reference - Name validation
- DOB Check Reference - Date of birth validation
- Mexico Country Guide - Mexico-specific information
- Legal Glossary - Legal terminology