v1

latestOpenAPI 3.0.0Apache 2.02026-07-267057121.5 KB

Verify a Spanish tax ID (NIF/CIF) against the AEAT census. The endpoint always reports whether AEAT identified the tax ID. When correct is true and the tax ID is identified, the official name registered with AEAT is also returned.

post/apps/gov-es/v1/lookup

Request body

tax_idstring required

Spanish tax ID (NIF/CIF) to verify against AEAT.

namestring

Name to check against the tax ID. For individuals AEAT verifies that the name matches the tax ID on record; for companies the name is not required to confirm the tax ID exists.

correctboolean

When true and the tax ID is identified, the response also includes the official name as registered with AEAT.

Example request

{
  "tax_id": "B98602031",
  "name": "Provide One SL"
}

Response

The verification completed and the result is reported in the body.

identifiedboolean

Whether AEAT identified the tax ID.

namestring

Official name registered with AEAT. Only present when correct was true in the request and the tax ID was identified.