Factuarea APIDevelopers

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.

CodeTypeHTTPDescription
cannot_archive_last_default_seriesinvalid_request_error422The 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_codeinvalid_request_error422That series code exists for more than one document type, so on its own it does not identify a single series.
invalid_series_codeinvalid_request_error422The series code is empty, too long, or carries characters that do not belong in a fiscal prefix.
invalid_series_nameinvalid_request_error422The series name is empty or exceeds the allowed length.
invalid_series_numberinvalid_request_error422The 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_template_assignmentinvalid_request_error422The PDF template assignment sent for the series is inconsistent: the selection or its version is not valid.
invalid_series_uuidinvalid_request_error400The series identifier in the path or in the payload is not a valid UUID.
invalid_series_yearinvalid_request_error422The fiscal year is not a valid four-digit year for a numbering series.
monthly_requires_month_segmented_formatinvalid_request_error422The 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_archivedinvalid_request_error422The 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_documentsinvalid_request_error422Changing the prefix of a series that already issued documents would retroactively rewrite their fiscal identifier, while customers and AEAT hold the original number.
series_default_kind_changeinvalid_request_error422The series is the default one of its purpose (invoice_kind): the default series is per company, document type and purpose, so changing its purpose would leave that purpose without a default series.
series_format_immutable_with_documentsinvalid_request_error422The numbering mask of a series can be changed until the first document is issued: after that, the PDF and the AEAT record of the issued documents carry the number in the original format.
series_has_documentsinvalid_request_error422The series already numbered documents, so it cannot be removed: the correlative sequence has to stay auditable.
series_immutableinvalid_request_error405A series is never deleted through the API: it keeps the documents it numbered and its code is not released. PUT and DELETE are not operations on a series.
series_initial_number_creates_gapinvalid_request_error422The 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_invoice_kind_invalidinvalid_request_error422The series purpose is outside the catalogue complete, simplified, corrective, simplified_corrective, or it was sent for a series that is not an invoice series.
series_invoice_kind_lockedinvalid_request_error422The purpose of a series (invoice_kind) is fixed on creation and stops being editable as soon as the series has any invoice: changing it would mix invoice types in one correlative numbering.
series_invoice_kind_mismatchinvalid_request_error422Invoice series have a fixed purpose (invoice_kind): complete for complete invoices, simplified for simplified invoices, corrective for corrective invoices and simplified_corrective for corrective invoices of simplified invoices. An invoice is only numbered in a series of its own purpose (RD 1619/2012 arts. 6.1.a, 7.1.a and 15), and the series you chose has another one.
series_locked_by_verifactuinvalid_request_error422At 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_foundnot_found_error404The identifier does not resolve to any numbering series of the authenticated company.
series_template_access_deniedauthorization_error403The credential or user does not have permission to change the PDF template of this series.
series_template_incompatibleinvalid_request_error422The template does not support the document type, the purpose (invoice_kind) or the number format of the series.
series_template_precondition_failedconflict_error412The ETag sent in If-Match no longer matches the series template resource, which changed after you read it.
series_template_precondition_requiredinvalid_request_error428The change to the series template did not state the version or resource precondition it is based on.
series_template_unavailableinvalid_request_error422The template is archived or otherwise not selectable for this company, so it cannot be assigned to the series.
series_template_version_conflictconflict_error409The PDF template assignment of the series changed after you read it.
series_type_invalidinvalid_request_error422The document type of the series is outside the catalogue invoice, quote, delivery_note, proforma, purchase_invoice, recurring_invoice.
series_year_lockedinvalid_request_error422The 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.

On this page

Need a hand?Contact support