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.
| HTTP | code | Title | Meaning |
|---|---|---|---|
| 204 | – | (bez těla) | The delete succeeded. |
| 400 | ValidationFailed | Data 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. |
| 400 | COMPANY_REQUIRED | Company is required. | The address or token carries no company (tenant); the response has the MsgCode / MsgText shape. |
| 401 | – | Unauthorized | The access token is missing or invalid. |
| 403 | MissingPermission | K 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.” |
| 404 | RecNoExists | Firma nenalezena. | Updating or deleting a company that does not exist. |
| 409 | ConfirmationRequired | Operace vyžaduje potvrzení. | The response has warnings[], confirmationToken, confirmationTokenExpiresAt and reason. |
| 409 | Conflict | Operaci nelze provést. | issues[]: CompanyExists, CompanyInUse; when deleting CompanyLocked, ReplacementCycle and dependent companies or premises. |
| 500 | Failed | Operaci 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.
| Code | Text (Czech) | Text (English) | When | Create | Update | Delete |
|---|---|---|---|---|---|---|
RegistrationNumberMissing | Není vyplněno IČ. | The registration number (IČ) is missing. | A variant with a registration number, but the number is empty. | ● | ● | – |
HeadquartersExists | Sídlo již existuje. | The headquarters already exists. | A second headquarters with the same registration number is being created. | ● | ● | – |
PremisesExists | Provozovna již existuje. | The premises already exist. | A premises with the same registration number and premises number already exists. | ● | ● | – |
PremisesWithoutHeadquarters | Nelze 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. | ● | ● | – |
ParentNotHeadquarters | Firma 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. | ● | ● | – |
HeadquartersNotFound | Firma 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. | ● | ● | – |
AddressMissing | Nevyplněna adresa. | The address is missing. | The address is missing (WinyxAddressId, or city and street). | ● | ● | – |
CannotBecomeHeadquarters | Nelze 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. | – | ● | – |
CannotBecomePremises | Nelze 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. | – | ● | – |
RegistrationNumberFilled | Vyplněné IČ. | The registration number (IČ) is filled in. | A registration number is filled in for a variant that has none. | ● | ● | – |
DependentCompaniesExist | Nelze 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). | – | ● | ● |
PremisesExist | Nelze 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). | – | ● | ● |
NotInRegistry | Firma 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. | – | – | – |
ProtectedRegistrationNumber | Firma 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.
| Code | Text (Czech) | Text (English) | Field | When | Create | Update | Delete |
|---|---|---|---|---|---|---|---|
InvalidCountryCode | Neplatný kód státu. | Invalid country code. | CountryCode | The country code is not in the list of countries. | ● | ● | – |
CompanyTypeChange | Typ firmy nelze změnit. | The company type cannot be changed. | CompanyType | The update sends a company type different from the stored one. | – | ● | – |
RequiredFieldMissing | Není 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. | ● | ● | – |
InvalidZujCode | Nesprávná hodnota ZUJ. | Invalid ZUJ value. | ZujCode | The basic territorial unit code is not in the list. | ● | ● | – |
InvalidRegistrationNumber | Nesprávný formát IČ. | Invalid format of the registration number (IČ). | CompanyRegistrationNumber | The registration number has an invalid format. | ● | ● | – |
InvalidBirthNumber | Nesprávný formát rodného čísla. | Invalid format of the birth number. | BirthNumber | The birth number has an invalid format. | ● | ● | – |
CompanyExists | Firma již existuje. | The company already exists. | – | The database reports that the company already exists (409 Conflict). | ● | – | – |
CompanyInUse | Firmu 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). | – | ● | – |
CompanyLocked | Firmu 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). | – | – | ● |
ReplacementCycle | Firmu 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. | ReplacementCompanyId | The company being removed already replaces another one and is itself replaced (409 Conflict). | – | – | ● |
ReplacementSameAsDeleted | Firma k náhradě je shodná s odstraňovanou firmou. | The replacement company is the same as the company being removed. | ReplacementCompanyId | ReplacementCompanyId equals CompanyId (400). | – | – | ● |
ReplacementCompanyMissing | Není zadána firma k náhradě. | No replacement company was specified. | ReplacementCompanyId | ReplacementCompanyId is missing (400). | – | – | ● |
ReplacementCompanyNotFound | Firma k náhradě neexistuje. | The replacement company does not exist. | ReplacementCompanyId | The 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.
| Code | Text (Czech) | Text (English) | When |
|---|---|---|---|
DuplicateRegistrationNumber | Existuje 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. |
DuplicatePersonalId | Existuje 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. |
DuplicateVatNumber | Existuje 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. |
ProtectedRegistrationNumber | IČ 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. |
ProtectedParentRegistrationNumber | Nadří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. |
ProtectedVatNumber | DIČ 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. |
ProtectedParentVatNumber | Nadří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. |
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.
| reason | Meaning |
|---|---|
TokenMissing | No token was sent (first call). |
TokenInvalid | The token is malformed or its signature is wrong. |
TokenExpired | The token has expired. |
SubjectMismatch | The token was issued to another caller. |
DataChanged | The request data changed since the token was issued. |
NewWarnings | The check found warnings that the token does not cover. |
The confirmation procedure is described in the guide Getting started, chapter Errors and confirmation.