Skip to main content
VeriFactu

VeriFactu errors 4113 and 4114: too many records in the same submission

Each request to VERI*FACTU can carry up to 1000 invoicing records, and some blocks inside have their own caps. If they are exceeded, the XML no longer follows the schema and the AEAT, the Spanish tax agency, rejects the whole request with 4113 or 4114. Odoo with our module splits submissions so that it never gets there.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 4 November 2026

Key facts

Module
VeriFactu
Versions
Odoo 17, 18, 19 and 20
Checked
in the module's source code, version 20.0 · against the sources linked at the end
Reading time
2 min

The two codes

4113
«El XML no cumple con el esquema: se ha superado el límite permitido de registros para el bloque.» A block of the XML has more repetitions than it allows.
4114
«El XML no cumple con el esquema: se ha superado el límite máximo permitido de facturas a registrar.» The request carries more invoices than allowed.

Both belong to the section that rejects the whole submission. According to the AEAT validation document, the RegistroFactura block repeats from 1 to 1000 times in each request, and registrations and cancellations can travel together, each in its own RegistroFactura.

Card for VeriFactu codes 4113 and 4114
4113 and 4114 in red: too many records bring the entire request down.

How Odoo splits submissions

The module's queue runs every 1 minute and, on each run, puts each company's pending records into a single request, in chain order. That request never goes beyond 1000 records:

  1. The parameter verifactu.max_envelope_records sets how many records go out on each run, and if nobody touches it, it is 1000.
  2. Whatever does not fit stays in the queue for the next run.
  3. If, by any route, more than 1000 were about to be sent, the module's client stops before sending with «The AEAT accepts at most 1000 records per request.».

Inside each record the module also fits the blocks to their caps: the tax breakdown is cut to 12 lines, without warning, and an exchange of simplified invoices carries up to 1000 replaced invoices.

AEAT submission queue grouped by status
The submission queue grouped by status, with the pending records that go out on the next run. Odoo 20 screenshot with demo data; the AEAT answers are simulated.

The pace set by the AEAT

Besides the size, the AEAT sets the pace. Each answer carries a TiempoEsperaEnvio, the seconds to wait before the next submission, and the module respects it. There is one exception: if 1000 records are already pending, it does not wait, because the request is full. If the AEAT answers with HTTP 429 for too many requests, the module waits for whatever its Retry-After header says and, if it says nothing, 60 seconds.

If you get one

With the parameter at its value, a 4113 or a 4114 should not happen. If someone raised verifactu.max_envelope_records above 1000, set it back to 1000 or leave it empty. Then resend the submissions in Failed from AEAT Submission › AEAT Errors with Retry Selected: the queue will split them into requests of the right size.

Do registrations and cancellations go in the same request?

Yes. The AEAT allows it as long as each goes in its own RegistroFactura, and the module's queue sends the company's pending registrations and cancellations together, in chain order.

Is it worth lowering the parameter?

There is no need. Fewer records per request means more requests, and each one has to wait for the TiempoEsperaEnvio set by the AEAT.

If you get one of these codes with the parameter at 1000, write to comercial@flexigobe.com with the answer of the submission.

Keep reading

VeriFactu errors with the submission format: unreadable XML, UTF-8 and empty requestsVeriFactu errors on the submission format (4103, 4119, 4135 to 4138, 1100, 1251): unreadable XML, UTF-8, GET or empty requests, and how Odoo sends each submission.VeriFactu error 4102: «El XML no cumple el esquema. Falta informar campo obligatorio»VeriFactu error 4102 rejects the whole submission: a mandatory field is missing. How Odoo 17 to 20 catches it first and what to do if the AEAT sends it.VeriFactu error 4134: «Servicio no activo», what happens to your invoices and how to resend themWhat VeriFactu error 4134 from the Spanish tax agency means, why it rejects the whole submission and how to resend your invoices from Odoo 17, 18, 19 and 20.
Checked in the module's source code (version 20.0) and the linked sources

Sources