Taxes error codes
Every public API error code emitted by Taxes, with its HTTP status, its type and a page per code.
Error codes emitted by Taxes. Each code links to its own page with the cause and the action to take.
| Code | Type | HTTP | Description |
|---|---|---|---|
custom_tax_creation_disabled | authorization_error | 403 | Creating custom taxes is disabled for this company. |
duplicate_tax_default_for_document_type | invalid_request_error | 422 | Another tax of the same type is already the default for that document type, and the pair (tax type, document type) admits a single default. |
indirect_tax_regime_invalid | invalid_request_error | 422 | The indirect regime is outside the catalogue iva, igic, ipsi. |
invalid_aeat_code | invalid_request_error | 422 | The AEAT operation code is outside the closed catalogue S1, S2, S3, E1-E6, N1, N2 used by VeriFactu and SII. |
invalid_country_aeat_zone | invalid_request_error | 422 | The AEAT territorial zone is outside the catalogue peninsula, canarias, ceuta, melilla. |
invalid_country_code | invalid_request_error | 422 | The country code is not exactly two characters, so it is not a valid ISO 3166-1 alpha-2 code. |
invalid_customer_visible_label | invalid_request_error | 422 | The label shown to the customer on the document exceeds the allowed length. |
invalid_description | invalid_request_error | 422 | The description exceeds the maximum length allowed for the field. |
invalid_document_type | invalid_request_error | 422 | The document type is outside the catalogue: invoice, quote, delivery_note, proforma, purchase_invoice, recurring_invoice. |
invalid_rate_for_tax_regime | invalid_request_error | 422 | The rate does not belong to the legal grid of its regime: IGIC admits 0, 3, 5, 7, 9.5, 15 and 20%; IPSI admits 0, 0.5, 1, 2, 4, 8 and 10%. |
invalid_tax_code | invalid_request_error | 422 | The tax code is empty or longer than 50 characters. |
invalid_tax_name | invalid_request_error | 422 | The tax name is empty or longer than 255 characters. |
invalid_tax_rate | invalid_request_error | 422 | The rate falls outside the range allowed for its type: VAT 0-27%, withholding 0-47%, equivalence surcharge 0-10%, other 0-100%. |
invalid_tax_type_filter | invalid_request_error | 422 | The type filter of the by-type listing carries a value outside the enum vat, retention, surcharge, other. |
invalid_validity_window | invalid_request_error | 422 | The validity window is inverted: valid_until falls before valid_from. |
system_tax_default_modification_forbidden | authorization_error | 403 | Defaults of the shared catalogue taxes are not set on the tax itself: the catalogue is global and the preference belongs to your company. |
system_tax_immutable | invalid_request_error | 422 | The tax belongs to the canonical AEAT catalogue shipped with the product. Its rate, code and name are fixed so that every company shares the same fiscal reference. |
system_tax_immutable_field | invalid_request_error | 422 | The update touches a field that is frozen on a system tax; error.param names it. |
system_tax_undeletable | invalid_request_error | 422 | System taxes are part of the shared fiscal catalogue and cannot be removed: deleting one would break the documents that reference it. |
tax_applies_to_invalid | invalid_request_error | 422 | The scope of the tax is outside the catalogue sale, purchase, both. |
tax_code_already_exists | conflict_error | 409 | Another tax of the catalogue already uses that code, and codes identify taxes unambiguously. |
tax_id_required | invalid_request_error | 422 | The operation needs the tax identification number (NIF, CIF or NIE) of the party involved and the record does not carry one. |
tax_in_use | invalid_request_error | 422 | The tax is referenced by documents, products or suppliers. Removing it would leave historical documents without their fiscal reference. |
tax_inactive_cannot_be_default | invalid_request_error | 422 | A deactivated tax cannot become the default, either globally or for a document type — it would offer a hidden default that no form can pick. |
tax_not_found | not_found_error | 404 | The identifier does not match any tax of the catalogue reachable by this company. |
tax_type_invalid | invalid_request_error | 422 | The tax type is outside the catalogue vat, retention, surcharge, other. |