---
title: "POST /apps/gov-es/v1/lookup"
method: POST
path: "/apps/gov-es/v1/lookup"
---

# POST /apps/gov-es/v1/lookup

`POST /apps/gov-es/v1/lookup`

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.

## Request body

- object
  - `tax_id` string, required — Spanish tax ID (NIF/CIF) to verify against AEAT.
  - `name` string — 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.
  - `correct` boolean — When `true` and the tax ID is identified, the response also includes the official `name` as registered with AEAT.

## Response `200`

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

- object
  - `identified` boolean — Whether AEAT identified the tax ID.
  - `name` string — Official name registered with AEAT. Only present when `correct` was `true` in the request and the tax ID was identified.

## Other responses

- `400` — Bad Request - The request body could not be parsed or `tax_id` was empty.
- `422` — Unprocessable Entity - The tax ID could not be verified (invalid or unverifiable input).
- `500` — Internal Server Error - The upstream AEAT lookup failed.

---

[API](https://skmtc.net/invopop/apis/access-service-api.md) · [All operations](https://skmtc.net/invopop/apis/access-service-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/invopop/access-service-api/revisions/fc954f96ea62/schema)
