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

SERIES_FORMAT_NUMBER_TOO_LONG

The number this series generates can reach ‹value› characters and the AEAT accepts at most ‹value› (series and number together). Shorten the code or the fixed text of the format


HTTP status422 Unprocessable Content
RetryAfter fixing the cause

When it happens

The longest number the series can generate — the format with the code, the year, the month and the counter substituted — exceeds the 60 characters characters the AEAT accepts for the invoice number. The counter counts as at least 9 digits.

How to fix it

Shorten the code or the literal parts of the format.

Retry

Not as is: the same request fails the same way. Fix the cause described above, then send the request again, under a new Idempotency-Key if the body changed.

Returned by

The operations where this code is most likely. The list is not exhaustive.

Rules that cite this code

Example response

When this error occurs, the API answers 422 Unprocessable Content with a JSON body of this shape:

{
  "type": "https://docs.beel.es/errors/SERIES_FORMAT_NUMBER_TOO_LONG",
  "title": "SERIES_FORMAT_NUMBER_TOO_LONG",
  "detail": "The number this series generates can reach ‹value› characters and the AEAT accepts at most ‹value› (series and number together). Shorten the code or the fixed text of the format",
  "instance": "/v1/<resource>",
  "errors": [],
  "success": false,
  "error": {
    "code": "SERIES_FORMAT_NUMBER_TOO_LONG",
    "message": "The number this series generates can reach ‹value› characters and the AEAT accepts at most ‹value› (series and number together). Shorten the code or the fixed text of the format",
    "details": {}
  },
  "meta": {
    "timestamp": "2026-05-21T10:00:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

The type URI is stable and always resolves to this page.

Message

The number this series generates can reach ‹value› characters and the AEAT accepts at most ‹value› (series and number together). Shorten the code or the fixed text of the format
El número que genera esta serie puede llegar a ‹value› caracteres y la AEAT solo admite ‹value› (serie y número juntos). Acorta el código o el texto fijo del formato
El número que genera aquesta sèrie pot arribar a ‹value› caràcters i l'AEAT només n'admet ‹value› (sèrie i número junts). Escurça el codi o el text fix del format

Send the request with Accept-Language: <es|en|ca> to receive the message in your preferred language.

Placeholders like ‹value› are filled in at runtime with the actual values of your request.

Other errors in this category

Keep exploring