# Numbering and series

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

[← All rules](/rules#all-rules)

An invoice number is fiscal data: it is assigned once, at issue, and it identifies the invoice in AEAT's records for good. These rules cover who assigns it, which documents go in separate series, and what a number may look like.

9 rules: 5 from the law, 2 AEAT criteria, 2 BeeL. rules. [How to read a rule](/rules#how-to-read-a-rule).

## NUM-001 · The number is assigned when the invoice is issued

`Required` · BeeL. rule · Impact: critical · Checked by the API: BeeL. applies it.

Do not expect or send an invoice number: a draft has none, and BeeL. assigns the next number of the chosen series when the invoice is issued. Read `invoice_number` from the response of the issue call.

**Why:** Numbering at issue is what keeps the series free of gaps: a draft deleted before issuing never consumed a number.

**Applies to:** statuses `DRAFT`, `SCHEDULED`, `ISSUED`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice)

**Incorrect:** Storing the draft's id as the invoice number in your system, or computing the next number yourself before issuing.

**Correct:** Issuing the draft and saving the `invoice_number` the issue call returns.

```http
POST /v1/companies/{company_id}/invoices/{invoice_id}/issue
```

**Related:** [NUM-003 · Numbers are correlative within each series](/rules/numbering#num-003) · [NUM-002 · An issued number is never reused, even when the invoice is voided](/rules/numbering#num-002) · [LIF-002 · Only a draft can be issued](/rules/lifecycle#lif-002)

**Explained in:** [Series and numbering › The number is assigned when you issue](/guides/series-and-numbering#the-number-is-assigned-when-you-issue)

## NUM-002 · An issued number is never reused, even when the invoice is voided

`Required` · AEAT criterion · Impact: critical · Checked by the API: a request that breaks it is rejected with the error codes listed.

Treat every issued number as consumed for good. A voided invoice, or a test issued in production, keeps its number in the series; the invoice that replaces it gets a new one. BeeL. never gives two invoices of a company the same number: a series whose format could print the numbers of another series of the company is rejected with [`SERIES_FORMAT_OVERLAPS`](/errors/SERIES_FORMAT_OVERLAPS). If AEAT already holds a record with the same number and issue date that is not this invoice, for example one issued with the software you used before, the invoice is not registered: its `verifactu.submission_status` is `REJECTED`, and it has to be issued again with a different series or number.

**Why:** The number identifies the invoice in AEAT's records. A second invoice with the same number would be a duplicate that AEAT does not accept.

**Applies to:** statuses `ISSUED`, `SENT`, `PAID`, `RECTIFIED`, `VOIDED`; operations [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice)

**Error codes:** [`SERIES_FORMAT_OVERLAPS`](/errors/SERIES_FORMAT_OVERLAPS) (`409`), [`SERIES_NUMBER_COLLISION`](/errors/SERIES_NUMBER_COLLISION) (`400`)

**Legal basis:**

- AEAT, Preguntas frecuentes SIF y VERI*FACTU, Registros de facturación: anulación — [source](https://sede.agenciatributaria.gob.es/Sede/iva/sistemas-informaticos-facturacion-verifactu/preguntas-frecuentes/registros-facturacion-anulacion.html)

  > «Desde el punto de vista sustantivo, si las facturas se han emitido, aunque sean erróneas deben mantenerse, con su correspondiente numeración, y sin perjuicio de que se anulen posteriormente y se sustituyan por nuevas facturas correctas.»

- AEAT, Aclaraciones a dudas de los desarrolladores (v1.3), 6. Prohibición de numeración duplicada de un registro — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/FAQs-Desarrolladores.pdf)

  > «ya NO es posible reutilizar la numeración de ninguna factura expedida, aunque sean facturas expedidas "de prueba".»

**Incorrect:** Creating a series with the fixed format `F-{YYYY}-{NUM:4}` next to series `F`, whose format is `{CODIGO}-{YYYY}-{NUM:4}`: both would print `F-2026-0042`, and the new series is rejected with [`SERIES_FORMAT_OVERLAPS`](/errors/SERIES_FORMAT_OVERLAPS).

**Correct:** Voiding `F-2026-0042` and issuing the replacement as a new invoice, which takes the next number of the series.

**Related:** [NUM-001 · The number is assigned when the invoice is issued](/rules/numbering#num-001) · [VOI-001 · Void only an invoice that should never have been issued](/rules/void#voi-001) · [LIF-003 · Test in the sandbox, never with real invoices](/rules/lifecycle#lif-003)

**Explained in:** [Series and numbering › The number is assigned when you issue](/guides/series-and-numbering#the-number-is-assigned-when-you-issue)

## NUM-003 · Numbers are correlative within each series

`Required` · Law · Impact: high · Checked by the API: BeeL. applies it.

Within a series, invoice numbers follow one another without gaps or jumps. BeeL. takes the next number of the series at issue, gives it back if the issue fails, and applies the series' initial number only to the first period the series numbers in: later periods start at 1. Numbers are only correlative if every invoice of that series is issued through BeeL.

**Why:** A gap or a jump in a series is what an inspection reads as a missing invoice.

**Applies to:** invoice types `STANDARD`, `SIMPLIFIED`, `CORRECTIVE`

**Legal basis:**

- RD 1619/2012 (Reglamento de facturación), art. 6.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6)

  > «Número y, en su caso, serie. La numeración de las facturas dentro de cada serie será correlativa.»

**Incorrect:** Issuing some invoices of series `A` from another system while BeeL. issues the rest of the same series.

**Correct:** Giving each system its own series, or continuing an old sequence in BeeL. by setting the series' initial number before its first invoice.

**Related:** [NUM-001 · The number is assigned when the invoice is issued](/rules/numbering#num-001) · [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) · [NUM-007 · A series cannot be renumbered once it has issued](/rules/numbering#num-007)

**Explained in:** [Series and numbering › How the counter works](/guides/series-and-numbering#how-the-counter-works) · [Series and numbering › Continuing a sequence from another system](/guides/series-and-numbering#continuing-a-sequence-from-another-system)

## NUM-004 · Separate series may be used when there is a reason for them

`Recommended` · Law · Impact: low · Responsibility: the issuing business.

You may number invoices in separate series when there is a reason, such as several establishments or operations of a different nature. Create one series per establishment or line of business and pick it when you create the invoice.

**Why:** Mixing establishments in one series makes the sequence hard to follow; the law lets you keep them apart.

**Applies to:** operations [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries)

**Legal basis:**

- RD 1619/2012 (Reglamento de facturación), art. 6.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6)

  > «Se podrán expedir facturas mediante series separadas cuando existan razones que lo justifiquen y, entre otros supuestos, cuando el obligado a su expedición cuente con varios establecimientos desde los que efectúe sus operaciones y cuando el obligado a su expedición realice operaciones de distinta naturaleza.»

**Incorrect:** Creating a new series every month to restart the count, with no establishment or kind of operation behind it.

**Correct:** Creating series `SHOP` and `ONLINE` for a business that sells in a shop and on the web, and sending each invoice's `series_id`.

**Related:** [NUM-003 · Numbers are correlative within each series](/rules/numbering#num-003) · [NUM-005 · Simplified invoices are numbered in their own series](/rules/numbering#num-005) · [NUM-006 · Corrective invoices are numbered in their own series](/rules/numbering#num-006)

**Explained in:** [Series and numbering › Default series per document type](/guides/series-and-numbering#default-series-per-document-type)

## NUM-005 · Simplified invoices are numbered in their own series

`Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed.

A business that issues both full and simplified invoices in the same calendar year numbers them in separate series. A BeeL. series numbers only documents of its own type: a simplified invoice in a series of another type, or in an older `UNASSIGNED` series, is rejected with [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE), when it is created, edited or issued. Without `series_id`, the company's default series for simplified invoices is used, and it is created on first use if the company has none. A series that has already numbered invoices cannot change its type ([`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES)), and a new series of type `UNASSIGNED` is rejected with [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED).

**Why:** Full and simplified invoices sharing a series would leave neither sequence correlative.

**Applies to:** invoice types `SIMPLIFIED`, `STANDARD`; operations [`POST /v1/companies/{company_id}/invoices`](/invoices/createCompanyInvoice), [`PATCH /v1/companies/{company_id}/invoices/{invoice_id}`](/invoices/patchCompanyInvoice), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice), [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries)

**Error codes:** [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE) (`422`), [`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED) (`422`)

**Legal basis:**

- RD 1619/2012 (Reglamento de facturación), art. 7.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a7)

  > «Cuando el empresario o profesional expida facturas conforme a este artículo y al artículo 6 para la documentación de las operaciones efectuadas en un mismo año natural, será obligatoria la expedición mediante series separadas de unas y otras.»

**Incorrect:** Creating a `SIMPLIFIED` invoice with the `series_id` of your standard-invoice series: it is rejected with [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE), and so is issuing or updating an invoice in such a series.

**Correct:** Omitting `series_id` on a simplified invoice: it is numbered in the company's simplified series, created with code `S` (or the next free code) the first time it is needed.

**Related:** [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) · [NUM-006 · Corrective invoices are numbered in their own series](/rules/numbering#num-006) · [SIM-001 · A simplified invoice never exceeds 3,000 €](/rules/simplified#sim-001)

**Explained in:** [Series and numbering › Default series per document type](/guides/series-and-numbering#default-series-per-document-type)

## NUM-006 · Corrective invoices are numbered in their own series

`Required` · Law · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed.

Corrective invoices go in a series specific to correctives, never in the series of the invoice they correct nor in an older `UNASSIGNED` series. Without a `series_id`, BeeL. numbers a corrective in the company's default corrective series, which is created on first use (code `R`, or the next free code whose numbers cannot repeat another series') if the company has none. An explicit series of another type is rejected with [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE); a series that has already numbered invoices cannot change its type ([`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES)); a new series of type `UNASSIGNED` is rejected with [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED).

**Why:** The law requires correctives to be told apart from ordinary invoices by their series.

**Applies to:** invoice types `CORRECTIVE`; operations [`POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective`](/invoices/createCompanyCorrectiveInvoice), [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries)

**Error codes:** [`SERIES_INCOMPATIBLE_DOC_TYPE`](/errors/SERIES_INCOMPATIBLE_DOC_TYPE) (`422`), [`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_UNASSIGNED_TYPE_NOT_ALLOWED`](/errors/SERIES_UNASSIGNED_TYPE_NOT_ALLOWED) (`422`)

**Legal basis:**

- RD 1619/2012 (Reglamento de facturación), art. 6.1.a) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6)

  > «No obstante, será obligatoria, en todo caso, la expedición en series específicas de las facturas siguientes: [...] 2.º Las rectificativas.»

**Incorrect:** Passing the `series_id` of your ordinary series when creating a corrective invoice.

**Correct:** Omitting `series_id` on the corrective: it goes in the company's corrective series, created the first time it is needed.

```http
POST /v1/companies/{company_id}/invoices/{invoice_id}/corrective

{ "rectification_type": "TOTAL", "rectification_code": "R1", "reason": "Invoice issued with the wrong VAT rate" }
```

**Related:** [NUM-005 · Simplified invoices are numbered in their own series](/rules/numbering#num-005) · [COR-002 · Pick the reason code: R1–R4 for standard invoices, R5 for simplified](/rules/corrective#cor-002)

**Explained in:** [Series and numbering › Correctives and proformas](/guides/series-and-numbering#correctives-and-proformas)

## NUM-007 · A series cannot be renumbered once it has issued

`Required` · BeeL. rule · Impact: medium · Checked by the API: a request that breaks it is rejected with the error codes listed.

Once a series has issued an invoice, its code, format, reset policy, initial number and document type are fixed. Design the series before its first invoice; to number differently, or another type, create a new series.

**Why:** Changing how an issued series is numbered would rewrite numbers already registered with AEAT or break the sequence.

**Applies to:** operations [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries)

**Error codes:** [`SERIES_CODE_LOCKED_HAS_INVOICES`](/errors/SERIES_CODE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_FORMAT_LOCKED_HAS_INVOICES`](/errors/SERIES_FORMAT_LOCKED_HAS_INVOICES) (`400`), [`SERIES_RESET_LOCKED_HAS_INVOICES`](/errors/SERIES_RESET_LOCKED_HAS_INVOICES) (`400`), [`SERIES_INITIAL_NUMBER_LOCKED_HAS_INVOICES`](/errors/SERIES_INITIAL_NUMBER_LOCKED_HAS_INVOICES) (`400`), [`SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES`](/errors/SERIES_DOCUMENT_TYPE_LOCKED_HAS_INVOICES) (`400`), [`SERIES_NUMBERING_FROZEN`](/errors/SERIES_NUMBERING_FROZEN) (`400`)

**Incorrect:** Changing the format of series `A` after it has issued invoices, to add the year: it is rejected with [`SERIES_FORMAT_LOCKED_HAS_INVOICES`](/errors/SERIES_FORMAT_LOCKED_HAS_INVOICES).

**Correct:** Creating a new series with the new format and making it the default for new invoices.

**Related:** [NUM-003 · Numbers are correlative within each series](/rules/numbering#num-003) · [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004)

**Explained in:** [Series and numbering › A series locks once it has issued](/guides/series-and-numbering#a-series-locks-once-it-has-issued)

## NUM-008 · An invoice number fits AEAT's length and character set

`Required` · AEAT criterion · Impact: high · Checked by the API: a request that breaks it is rejected with the error codes listed.

The full invoice number, series prefix included, is at most 60 characters and uses only printable ASCII characters, without double quotes, single quotes, less-than, greater-than or equals signs. BeeL. checks the longest number a series can generate when you create it or change its code or format, counting the counter as at least nine digits ([`SERIES_FORMAT_NUMBER_TOO_LONG`](/errors/SERIES_FORMAT_NUMBER_TOO_LONG)), and checks the actual number again at issue: an invoice whose number AEAT would not accept is not issued, and the number is not consumed ([`INVOICE_NUMBER_TOO_LONG`](/errors/INVOICE_NUMBER_TOO_LONG)).

**Why:** AEAT identifies the invoice by this number, in the record and in the QR, and does not accept a number outside these limits.

**Applies to:** operations [`POST /v1/companies/{company_id}/series`](/invoice-series/createCompanySeries), [`PATCH /v1/companies/{company_id}/series/{series_id}`](/invoice-series/patchCompanySeries), [`POST /v1/companies/{company_id}/invoices/{invoice_id}/issue`](/invoices/issueCompanyInvoice)

**Error codes:** [`SERIES_FORMAT_NUMBER_TOO_LONG`](/errors/SERIES_FORMAT_NUMBER_TOO_LONG) (`422`), [`SERIES_FORMAT_INVALID_CHARACTERS`](/errors/SERIES_FORMAT_INVALID_CHARACTERS) (`422`), [`INVOICE_NUMBER_TOO_LONG`](/errors/INVOICE_NUMBER_TOO_LONG) (`422`), [`INVOICE_NUMBER_INVALID_CHARACTERS`](/errors/INVOICE_NUMBER_INVALID_CHARACTERS) (`422`)

**Legal basis:**

- AEAT, Validaciones y errores VERI*FACTU (v1.2.2), 3.1.3.1 Agrupación IDFactura — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/Validaciones_Errores_Veri-Factu.pdf)

  > «NumSerieFactura solo puede contener caracteres ASCII del 32 a 126 (caracteres imprimibles), no permitiéndose la existencia de los siguientes caracteres:»

- AEAT, Detalle de las especificaciones técnicas del código QR de la factura (v0.5.0), apartado 6, parámetro numserie — [source](https://www.agenciatributaria.es/static_files/AEAT_Desarrolladores/EEDD/IVA/VERI-FACTU/DetalleEspecificacTecnCodigoQRfactura.pdf)

  > «numserie Cadena de Máximo 60 Sí Nº Serie + Nº Factura»

**Incorrect:** A series with a 50-character code and the format `{CODIGO}-{YYYY}-{NUM:4}`: its longest number reaches 65 characters, and the series is rejected with [`SERIES_FORMAT_NUMBER_TOO_LONG`](/errors/SERIES_FORMAT_NUMBER_TOO_LONG).

**Correct:** A series format that produces short numbers such as `SHOP-2026-0001`.

**Related:** [NUM-007 · A series cannot be renumbered once it has issued](/rules/numbering#num-007) · [QRC-005 · Use qr_url exactly as returned](/rules/qr#qrc-005)

**Explained in:** [Series and numbering › The format](/guides/series-and-numbering#the-format)

## NUM-009 · Reverse-charge supplies of metals and electronics go in a special series

`Required` · Law · Impact: low · Responsibility: the issuing business.

Invoices for supplies of silver, platinum, palladium, mobile phones, game consoles, laptops or tablets in which the buyer is liable for the VAT are issued in a special series. Keep a dedicated series for these invoices.

**Why:** The law requires these reverse-charge supplies to be documented in their own series; mixing them with other invoices breaks that requirement.

**Applies to:** invoice types `STANDARD`; Supplies of silver, platinum, palladium, mobile phones, game consoles, laptops or tablets where the buyer is liable for VAT.

**Legal basis:**

- Ley 37/1992 del IVA, art. 84.Uno.2.º g) — [source](https://www.boe.es/buscar/act.php?id=BOE-A-1992-28740#a84)

  > «Las entregas de dichos bienes, en los casos en que sean sujetos pasivos del Impuesto sus destinatarios conforme a lo establecido en este número 2.°, deberán documentarse en una factura mediante serie especial.»

- RD 1619/2012 (Reglamento de facturación), art. 6.1.a) 4.º — [source](https://www.boe.es/buscar/act.php?id=BOE-A-2012-14696#a6)

  > «4.º Las que se expidan conforme a lo previsto en el artículo 84, apartado uno, número 2.º, letra g), de la Ley 37/1992, de 28 de diciembre, del Impuesto sobre el Valor Añadido.»

**Incorrect:** Invoicing a batch of laptops to a reseller in the same series as the rest of your sales.

**Correct:** Creating a series such as `ISP-G` and issuing those invoices in it.

**Related:** [NUM-004 · Separate series may be used when there is a reason for them](/rules/numbering#num-004) · [TAX-002 · Reverse-charge operations are invoiced without charging VAT](/rules/taxes#tax-002) · [CNT-012 · A reverse-charge invoice carries the mention «inversión del sujeto pasivo»](/rules/contents#cnt-012)

[← All rules](/rules#all-rules)

## Related

<Related>

- [Series and numbering](/guides/series-and-numbering) — when an invoice gets its number, how the format and counter resets work, default series per document type, and why a series locks once it has issued

</Related>

---

Full OpenAPI spec: https://docs.beel.es/api/openapi