Series error codes
Every public API error code emitted by Series, with its HTTP status, its type and a page per code.
Error codes emitted by Series. Each code links to its own page with the cause and the action to take.
| Code | Type | HTTP | Description |
|---|---|---|---|
cannot_archive_last_default_series | invalid_request_error | 422 | The series is the only active one for its document type. Archiving it would leave the company with no numbering available and freeze that kind of document. |
document_type_required_for_ambiguous_code | invalid_request_error | 422 | That series code exists for more than one document type, so on its own it does not identify a single series. |
invalid_series_code | invalid_request_error | 422 | The series code is empty, too long, or carries characters that do not belong in a fiscal prefix. |
invalid_series_name | invalid_request_error | 422 | The series name is empty or exceeds the allowed length. |
invalid_series_number | invalid_request_error | 422 | The starting number is not valid: it is not a positive integer, or it falls at or below the last number already issued, which would re-issue numbers already in use. |
invalid_series_uuid | invalid_request_error | 400 | The series identifier in the path or in the payload is not a valid UUID. |
invalid_series_year | invalid_request_error | 422 | The fiscal year is not a valid four-digit year for a numbering series. |
monthly_requires_month_segmented_format | invalid_request_error | 422 | The counter resets monthly but the numbering mask does not segment by month, so two months would start on the same correlative and produce duplicate numbers within the year. |
series_already_archived | invalid_request_error | 422 | The series was already archived, and archiving is not repeated: a second call means the client is out of sync with the real state. |
series_code_immutable_with_documents | invalid_request_error | 422 | Changing the prefix of a series that already issued documents would retroactively rewrite their fiscal identifier, while customers and AEAT hold the original number. |
series_has_documents | invalid_request_error | 422 | The series already numbered documents, so it cannot be removed: the correlative sequence has to stay auditable. |
series_immutable | invalid_request_error | 405 | Series are not editable nor deletable through the API: legal numbering continuity requires their prefix, year and counter to stay put. |
series_initial_number_creates_gap | invalid_request_error | 422 | The starting number jumps beyond the next natural correlative while documents already exist for the current year, and that gap in the sequence is not acceptable to AEAT. |
series_locked_by_verifactu | invalid_request_error | 422 | At least one invoice of the series holds a billing record accepted by AEAT, which freezes the prefix, the year and the numbering base of the series. |
series_not_found | not_found_error | 404 | The identifier does not resolve to any numbering series of the authenticated company. |
series_type_invalid | invalid_request_error | 422 | The document type of the series is outside the catalogue invoice, quote, delivery_note, proforma, purchase_invoice, recurring_invoice. |
series_year_locked | invalid_request_error | 422 | The series already issued documents in its current year. Moving the year would leave those documents pointing at an empty year while their taxable base sits in another. |
Related
Error codes by category
Find an error by the category that emits it.
Full reference table
All codes, HTTP statuses, types and descriptions in one reference.
Error model
Interpret the error envelope and handle errors by code.