---
id: "es_cae"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["finances", "companies"]
country: ["ES"]
langs: ["es"]
quality: 93
url: "https://registry.apicrafter.io/datatype/es_cae"
---

# Spanish excise establishment code (CAE) (`es_cae`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Código de Actividad y Establecimiento (CAE), which the Spanish Tax Agency assigns to an establishment where an activity involving goods subject to excise duty takes place. It has 13 characters: ES, three zeros, two digits for the managing office, two characters for the activity (for example V1 for wine producers), three digits and a letter.

- Personal data (PII): no
- Categories: Finances and banking (finances), Companies/business/organizations (companies)
- Countries: Spain (ES)
- Languages: Spanish (es)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^ES000(?:0[1-9]|[1-4]\d|5[0-6])[0-9A-Z]{2}\d{3}[A-Z]$
```

## Examples

- `ES00008V1488Q` — Example from the python-stdnum documentation
- `00008V1488` (invalid example) — Country code and last letter missing (python-stdnum example)

## Mappings

- stdnum: `es.cae`

## Supported by tools

- `pythonstdnum`

## Translations

- es: Código de Actividad y Establecimiento (CAE)

## Sources

- doc: <https://www.boe.es/boe/dias/2006/12/28/pdfs/A46098-46100.pdf>
- doc: <https://arthurdejong.org/python-stdnum/doc/2.2/stdnum.es.cae.html>

## Quality

Score 93/100. Missing: second example.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/es_cae.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/ES/finances/es_cae.yaml>
