Contacts error codes
Every public API error code emitted by Contacts, with its HTTP status, its type and a page per code.
Error codes emitted by Contacts. Each code links to its own page with the cause and the action to take.
| Code | Type | HTTP | Description |
|---|---|---|---|
alternative_id_type_invalid | invalid_request_error | 422 | The alternative identifier type is outside the catalogue nif_iva, passport, country_id, residence_certificate, other_document, not_registered. |
bank_account_usage_required | invalid_request_error | 422 | The bank account does not declare what it is for: neither collection nor payment, and it does not flag a default usage to infer it from. An account with no purpose cannot be used for collections or payments. |
cannot_have_both_tax_id_and_alternative_id | invalid_request_error | 422 | The client sends tax_id and an alternative identifier at the same time. Fiscal identity is one: the alternative identifier exists precisely for parties without a Spanish tax id. |
census_requires_tax_id | invalid_request_error | 422 | Census verification checks the pair name plus tax id against AEAT, and one of the two is missing. |
client_has_documents | invalid_request_error | 422 | The client is referenced by issued documents. Deleting it would leave invoices, quotes or delivery notes without the party they were issued to, and fiscal records must remain traceable. |
client_import_too_large | invalid_request_error | 422 | The CSV exceeds the row limit the synchronous import accepts, since the whole file is processed within the request. |
client_not_found | not_found_error | 404 | The identifier does not resolve to any client of the authenticated company. |
client_requires_tax_identity | invalid_request_error | 422 | The client carries no fiscal identity: neither tax_id nor an alternative identifier, and an invoice cannot be issued to an unidentified party. |
contact_not_found | not_found_error | 404 | The identifier does not resolve to any business contact of the authenticated company. |
direct_debit_requires_default_bank_account | invalid_request_error | 422 | Direct debit was selected as the payment method, but the client has no default bank account to charge. |
supplier_has_documents | invalid_request_error | 422 | The supplier is referenced by registered purchase invoices, and deleting it would leave those expenses without the party that issued them. |
supplier_not_found | not_found_error | 404 | The identifier does not resolve to any supplier of the authenticated company. |
tax_id_already_exists | conflict_error | 409 | Another client of the company already holds that tax id, and the tax id identifies the party uniquely inside a company. |
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.