beel_validate_nif
Validate Spanish NIF/CIF against AEAT census via VeriFactu, returning status for valid, invalid syntax, not found, or service unavailable, plus deregistration details.
Instructions
Checks a NIF or CIF against the AEAT register through VeriFactu and returns what the
register says about it. status distinguishes a NIF found in the register from one that is
syntactically correct but absent, and from a check that could not be completed because
VeriFactu was unavailable — in which case the NIF is validated automatically once the
service is back.
What valid: true means depends on the kind of holder. For an individual, AEAT matched NIF
and name together. For a legal entity the name you sent is not verified at all — AEAT
identifies a company by its CIF alone — so valid: true says nothing about your name.
legal_name_verified tells the two cases apart, and census_status says whether an
identified NIF is also deregistered or revoked.
A NIF with bad syntax is an answer, not an error: it comes back 200 with
status: INVALID, so a pre-validation flow never has to tell rejections apart by status
code. What is an error is sending no NIF at all — an absent or empty nif answers 422
FIELD_BLANK, with details.field naming it. This operation only reads the register: it
creates nothing and stores no customer.
Endpoint: POST /v1/nif/validate
⚠️ Fiscal guardrails — read before calling:
Why a name that does not match the census makes an invoice unsubmittable. (resource: beel://guardrails/nif-validation)
For the exhaustive rules and worked examples, call beel_docs_search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes |