Skip to navigation

The stored register check of the workspace's company

View as Markdown

Reads the last stored comparison; it never calls the register. status is ok when the register agrees, drift when it disagrees, unknown when the company has not been checked yet or the register data is too old to judge (the stored discrepancies are still returned, but must not be shown as current), and unsupported for a company the check does not cover (outside Slovakia, a private person, or no IČO). A discrepancy already fixed on the company profile is left out. To apply the register’s values, send apply_params unchanged as the body of PATCH /workspaces/{workspace_id}/company_profile; it is empty unless status is drift.

Requires read:document_settings (or write:/manage:document_settings).

Authentication

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer

Lucanto API key. Two prefixes:

  • lct_pat_<random><checksum> — personal access token (owner: User)
  • lct_live_<random><checksum> — workspace token, live data

Issue keys at /settings/api_keys (personal) or /:workspace_id/settings/api_keys (workspace). Plaintext token is shown once and never again.

Path parameters

workspace_idlongRequired>=1
Workspace ID. The numeric ID shown in your URLs.

Response

OK
statusenum

unknown = not checked yet, or the register data is too old to judge.

Allowed values:
sourceenum
Which register the company was compared with.
Allowed values:
checked_atdatetime or null
When the comparison was stored.
severityenum or null

The highest severity among discrepancies; null when there are none.

Allowed values:
dismissedboolean
Whether the current discrepancy was dismissed as a register error.
digeststring or null

Identifies the stored discrepancy. POST it to …/register_check/dismiss; it changes when the register’s answer changes. Null when no discrepancy is stored.

register_listsmap from strings to objects

The register lists the comparison read, keyed by list (e.g. icdph), with their dates; null for a list the register has not published yet.

discrepancieslist of objects
apply_paramsobject

The PATCH /workspaces/{workspace_id}/company_profile body that writes the register’s values over the discrepancies. Empty unless status is drift (stale or unknown data is never applied) and when there is nothing to apply (a termination is reported, not applied). vat_payer_type and vat_id always travel together. A main_activity discrepancy is applied here only when the register’s SK NACE Rev. 2.1 class has a single SK NACE Rev. 2 subclass; with several, the user picks one of main_activity_choices and the client adds it as main_activity_code, with main_activity_register_code, to this body.

main_activity_choiceslist of strings

The SK NACE Rev. 2 subclasses the register’s new main activity may be filed as, when there are several and the user must pick; empty otherwise.

main_activity_register_codestring or null

The register’s SK NACE Rev. 2.1 class to send beside a picked main_activity_code.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error