Company error and warning codes

All error codes and warnings the API returns when a company is created (POST company/create/*), updated (PUT company) or deleted (DELETE company). Texts are in Czech by default; with the Accept-Language: en header they are returned in English. Tell errors apart in your application by the code (code), not by the text.

API responses

Errors use application/problem+json with a code field. Write errors also carry an issues[] array whose items have code, text and field.

HTTPcodeTitleMeaning
204–(bez těla)The delete succeeded.
400ValidationFailedData firmy nejsou v pořádku.The issues[] list (check and write codes below), also for delete (replacement company).
400–Standardní validace políAn errors object: field name → texts. A required field is missing, wrong length or format.
400COMPANY_REQUIREDCompany is required.The address or token carries no company (tenant); the response has the MsgCode / MsgText shape.
401–UnauthorizedThe access token is missing or invalid.
403MissingPermissionK této operaci nemáte oprávnění.The Firmy permission is missing (Add to create, Detail to update, Delete to delete), or AddICO / AddDICO for a protected value; issues[].text ends with “You do not have permission to enter it.”
404RecNoExistsFirma nenalezena.Updating or deleting a company that does not exist.
409ConfirmationRequiredOperace vyžaduje potvrzení.The response has warnings[], confirmationToken, confirmationTokenExpiresAt and reason.
409ConflictOperaci nelze provést.issues[]: CompanyExists, CompanyInUse; when deleting CompanyLocked, ReplacementCycle and dependent companies or premises.
500FailedOperaci se nepodařilo provést.An unexpected write error; details are only in the log.

Data check errors

HTTP 400, issues[].code. The check runs before saving. In the response the text starts with a capital letter and ends with a full stop. An error cannot be confirmed; correct the data.

CodeText (Czech)Text (English)WhenCreateUpdateDelete
RegistrationNumberMissingNení vyplněno IČ.The registration number (IČ) is missing.A variant with a registration number, but the number is empty.●●–
HeadquartersExistsSídlo již existuje.The headquarters already exists.A second headquarters with the same registration number is being created.●●–
PremisesExistsProvozovna již existuje.The premises already exist.A premises with the same registration number and premises number already exists.●●–
PremisesWithoutHeadquartersNelze založit provozovnu, nezadáno sídlo.Premises cannot be created, the headquarters is not specified.The premises number is not zero, but ParentOrganization is missing.●●–
ParentNotHeadquartersFirma vybraná jako nadřízená není sídlo.The company selected as the parent is not a headquarters.ParentOrganization points to a company that is itself a premises.●●–
HeadquartersNotFoundFirma vybraná jako sídlo neexistuje nebo je neplatná.The company selected as the headquarters does not exist or is invalid.ParentOrganization does not exist or the company is not valid.●●–
AddressMissingNevyplněna adresa.The address is missing.The address is missing (WinyxAddressId, or city and street).●●–
CannotBecomeHeadquartersNelze změnit příznak sídlo/provozovna, sídlo již existuje.The headquarters/premises flag cannot be changed, the headquarters already exists.A premises is changed to a headquarters while a headquarters with the same registration number exists.–●–
CannotBecomePremisesNelze změnit příznak sídlo/provozovna, sídlo není vyplněno nebo neexistuje.The headquarters/premises flag cannot be changed, the headquarters is not specified or does not exist.A headquarters is changed to a premises without a valid headquarters.–●–
RegistrationNumberFilledVyplněné IČ.The registration number (IČ) is filled in.A registration number is filled in for a variant that has none.●●–
DependentCompaniesExistNelze odstranit nebo změnit, existují návazné firmy.It cannot be removed or changed, dependent companies exist.Changing or deleting a company that other companies depend on (409 Conflict when deleting).–●●
PremisesExistNelze odstranit nebo změnit, existují provozovny.It cannot be removed or changed, premises exist.Changing or deleting a headquarters that has premises (409 Conflict when deleting).–●●
NotInRegistryFirma neexistuje v RES.The company does not exist in the register of economic entities (RES).The RES check does not run when saving yet; the code is part of the list.–––
ProtectedRegistrationNumberFirma v seznamu chráněných IČ.The company is on the list of protected registration numbers (IČ).A protected registration number and the user lacks the AddICO permission.●●–

Write and delete errors

HTTP 400 or 409, issues[].code.

CodeText (Czech)Text (English)FieldWhenCreateUpdateDelete
InvalidCountryCodeNeplatný kód státu.Invalid country code.CountryCodeThe country code is not in the list of countries.●●–
CompanyTypeChangeTyp firmy nelze změnit.The company type cannot be changed.CompanyTypeThe update sends a company type different from the stored one.–●–
RequiredFieldMissingNení vyplněna povinná hodnota.A required value is missing.–The database rejected the write because a required value is missing; the field follows from the column.●●–
InvalidZujCodeNesprávná hodnota ZUJ.Invalid ZUJ value.ZujCodeThe basic territorial unit code is not in the list.●●–
InvalidRegistrationNumberNesprávný formát IČ.Invalid format of the registration number (IČ).CompanyRegistrationNumberThe registration number has an invalid format.●●–
InvalidBirthNumberNesprávný formát rodného čísla.Invalid format of the birth number.BirthNumberThe birth number has an invalid format.●●–
CompanyExistsFirma již existuje.The company already exists.–The database reports that the company already exists (409 Conflict).●––
CompanyInUseFirmu nelze změnit, je používána.The company cannot be changed, it is in use.–The company is in use and cannot be changed (409 Conflict).–●–
CompanyLockedFirmu nelze odstranit, je uzamčena vlastníkem.The company cannot be removed, it is locked by its owner.–The company is locked by its owner (409 Conflict).––●
ReplacementCycleFirmu nelze odstranit, protože je zároveň nahrazující a nahrazovaná.The company cannot be removed because it is both a replacing and a replaced company.ReplacementCompanyIdThe company being removed already replaces another one and is itself replaced (409 Conflict).––●
ReplacementSameAsDeletedFirma k náhradě je shodná s odstraňovanou firmou.The replacement company is the same as the company being removed.ReplacementCompanyIdReplacementCompanyId equals CompanyId (400).––●
ReplacementCompanyMissingNení zadána firma k náhradě.No replacement company was specified.ReplacementCompanyIdReplacementCompanyId is missing (400).––●
ReplacementCompanyNotFoundFirma k náhradě neexistuje.The replacement company does not exist.ReplacementCompanyIdThe replacement company does not exist (400).––●

Warnings to confirm

HTTP 409 ConfirmationRequired, warnings[].code. The company is not created or changed until you repeat the request with the X-Confirmation-Token header (the token from the response). Applies to create and update; delete has no warnings.

CodeText (Czech)Text (English)When
DuplicateRegistrationNumberExistuje jiná platná firma se stejným IČ.Another valid company with the same registration number (IČ) exists.Always when creating a premises; for a headquarters when the registration number is duplicated.
DuplicatePersonalIdExistuje jiná platná firma se stejným rodným číslem.Another valid company with the same birth number exists.Another valid company has the same birth number.
DuplicateVatNumberExistuje jiná platná firma se stejným DIČ.Another valid company with the same VAT number (DIČ) exists.Another valid company has the same VAT number.
ProtectedRegistrationNumberIČ firmy je na seznamu chráněných IČ.The company's registration number (IČ) is on the list of protected registration numbers.Requires the AddICO permission.
ProtectedParentRegistrationNumberNadřízená firma má IČ ze seznamu chráněných IČ.The parent company has a registration number (IČ) from the list of protected registration numbers.Requires the AddICO permission.
ProtectedVatNumberDIČ firmy je na seznamu chráněných DIČ.The company's VAT number (DIČ) is on the list of protected VAT numbers.Requires the AddDICO permission.
ProtectedParentVatNumberNadřízená firma má DIČ ze seznamu chráněných DIČ.The parent company has a VAT number (DIČ) from the list of protected VAT numbers.Requires the AddDICO permission.
A protected registration number or VAT number requires the AddICO or AddDICO permission. Without it the API returns 403 MissingPermission with the warning text and the sentence “You do not have permission to enter it.”

Confirmation reasons

The reason field of a ConfirmationRequired response says why the request is not confirmed yet.

reasonMeaning
TokenMissingNo token was sent (first call).
TokenInvalidThe token is malformed or its signature is wrong.
TokenExpiredThe token has expired.
SubjectMismatchThe token was issued to another caller.
DataChangedThe request data changed since the token was issued.
NewWarningsThe check found warnings that the token does not cover.

The confirmation procedure is described in the guide Getting started, chapter Errors and confirmation.