Tax ID Validation — CURP

Use this example to validate a person in Mexico from their CURP. The validation_type you send determines what you get back:

validation_typeWhat it returns
NSSThe persaon's NSS (social security number) and RFC, in addition to the CURP you sent
RFC_FULLThe RFC validated against the legal name, in addition to the CURP you sent

POST Request

{
  "locations": [
    { "iso_code": "MX" }
  ],
  "validation_type": "NSS",
  "company": {
    "tax_registration": {
      "number": "AAAA800101HDFXXX09",
      "type": "CURP",
      "level": "country",
      "location": "MX"
    },
    "type": "person",
    "legal_name": "JUAN PEREZ LOPEZ",
    "phone": "5500000000",
    "privacy_agreement": {
      "url": "https://example.com/legal/privacy-policy",
      "ip": "203.0.113.10"
    }
  }
}

Set validation_type to "NSS" or "RFC_FULL" depending on the scenario below.

Required fields per validation type

A missing required field is rejected with a 4xx that names the location and the field.

validation_typeRequired in addition to tax_registration
NSScompany.privacy_agreement (url and ip) and company.phone
RFC_FULLcompany.legal_name , company.address.postal_code , company.privacy_agreement (url and ip) and company.phone

Send all of them if you want to use both validation types with the same payload.


Scenario 1: validation_type: "NSS"

Returns the NSS and RFC associated with the CURP. The registrations found are added to the company.

GET Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "succeed",
  "data": [
    {
      "location_iso_code": "MX",
      "status": "succeed",
      "company": {
        "name": "Juan Perez Lopez",
        "legal_name": "Juan Perez Lopez",
        "email": "",
        "phone": "5500000000",
        "tax_registrations": [
          { "number": "AAAA800101HDFXXX09", "type": "CURP", "level": "country", "location": "MX" },
          { "number": "00000000000",        "type": "NSS",  "level": "country", "location": "MX" }
        ],
        "address": {
          "postal_code": "00000",
          "address_line_1": "",
          "neighborhood": ""
        }
      },
      "registry_lists": []
    }
  ]
}

Things to note:

  • tax_registrations contains the CURP you sent plus the NSS .
  • name, legal_name and address can differ from what you sent.

Scenario 2: validation_type: "RFC_FULL"

Validates the RFC against the legal name and postal code you sent.

GET Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "status": "succeed",
  "data": [
    {
      "location_iso_code": "MX",
      "status": "succeed",
      "company": {
        "legal_name": "Juan Perez Lopez",
        "phone": "5500000000",
        "tax_registrations": [
          { "number": "AAAA800101HDFXXX09", "type": "CURP", "level": "country", "location": "MX" },
          { "number": "AAAA800101XXX",      "type": "RFC",  "level": "country", "location": "MX" }
        ],
        "address": {
          "postal_code": "00000"
        }
      },
      "registry_lists": []
    }
  ]
}

Returns the validated postal_code, legal_name and RFC.

Status values

StatusMeaning
in_processBrinta is still processing the validation. Poll GET /tax-id-validations/{id}.
succeedThe validation finished and the data is final.

All values in the examples above (names, tax numbers, NSS, phone, postal code, IP and URLs) are fictitious.