NewProvince is only required for addresses in Spain
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog

Fiscal rules

143 fiscal and VeriFactu rules for invoicing integrations, as pages and as data for your AI assistant, the MCP server or CI.


A set of 143 rules your invoicing integration has to follow, as data your AI agent can check your code against. Each one comes from the law, from AEAT or from BeeL., has a stable id (LIF-001), says who checks it, and lists the errors the API answers when it catches it. The guides explain how to do things; these pages say what must and must not happen.

Use the rules in your tools

In Claude Code, install the BeeL. plugin and ask it for a rule:

/plugin marketplace add beel-es/claude-plugins
/plugin install beel-api@beel
/beel-api:rules COR-002

With the BeeL. MCP server (shown for Claude Code; other clients), add it and ask in plain words. Its rules tools answer, and a failed call names the rule behind its error:

claude mcp add --transport http beel https://mcp.beel.es/mcp
Which BeeL. rules apply to voiding an invoice, and which are up to my integration?

In any AI assistant (Cursor, Copilot, ChatGPT…), paste this prompt, or keep the critical rules in every session with the AGENTS.md block:

Review my BeeL. integration against https://docs.beel.es/api/rules.json
and list every rule it breaks, with its id and the fix.

In your CI, read the catalogue as JSON (its format):

curl -s https://docs.beel.es/api/rules.json

Each rule is also Markdown at /rules/<ID>.md (for example /rules/LIF-001.md), and all of them are in /rules/llms-full.txt.

How to read a rule

  • Severity. Required or Recommended.
  • Source. Law and AEAT criterion quote the norm verbatim, with its link. BeeL. rule is how BeeL.'s API works.
  • Error codes. What the API answers when it catches the rule. Each one links to its page.

What each responsibility asks of you

ResponsibilityWhat you do
Checked by the API (api)Handle the error codes the rule lists: the API rejects the request or applies the rule for you.
Checked by AEAT (aeat)Track the invoice's submission status. See Handling rejections.
Your integration (integrator)Meet it in your code, and check it in review and tests. See Software built on the API.
The issuing business (issuer)A decision of the business that issues the invoice: your integration can ask for it or show it. See The issuing business.

All rules

143 of 143 rules

By domain

Invoice lifecycle

5 rules. What can happen to an invoice before and after it is issued: editing, issuing, duplicating, testing and retrying.

Voiding

5 rules. When an issued invoice can be voided, how, and what a void leaves behind.

Corrective invoices

24 rules. When an issued invoice has to be rectified, with which reason code, how the correction is shown and within which deadline.

Numbering and series

9 rules. How invoice numbers are assigned, which documents need their own series, and why a number is never reused.

Invoice contents

25 rules. What every invoice has to say: when one is due, who the parties are, how operations and taxes are shown, and the mentions some operations require.

Simplified invoices

10 rules. When a simplified invoice (F2) may replace a full one, what it must carry and what it can never document.

Taxes and exemptions

19 rules. How each line is taxed: VAT rates, reverse charge, exempt and non-subject operations, OSS, disbursements, IRPF and the currency amounts are expressed in.

Equivalence surcharge

2 rules. When a supply to a retailer carries the equivalence surcharge (*recargo de equivalencia*), at which rate, and on which invoice.

Dates and deadlines

14 rules. The dates an invoice carries and the deadlines for issuing it, sending it and charging its VAT.

QR code and PDF

10 rules. The tax QR code on every invoice: when it exists, what it encodes, and how any document that carries it presents it.

VeriFactu records

13 rules. The billing record behind each invoice under VeriFactu: how it is generated, chained and sent to AEAT, and what to do with AEAT's answer.

Conservation

4 rules. How long issued invoices and their records are kept, by whom, and what to export before changing systems.

Sanctions

3 rules. The fines the General Tax Law sets for invoicing breaches and for billing software that does not comply.