Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Estonian Business Registry opendata API requests to verify company existence #4

Open
vohmar opened this issue Jul 6, 2023 · 4 comments · May be fixed by #6
Open

Implement Estonian Business Registry opendata API requests to verify company existence #4

vohmar opened this issue Jul 6, 2023 · 4 comments · May be fixed by #6
Assignees
Labels
enhancement New feature or request

Comments

@vohmar
Copy link
Contributor

vohmar commented Jul 6, 2023

Add a request for verifying if company exist or if it still exists. Query is going to be used upon contact object creation, domain registration and regularly at least once a year on domain renewal or by scheduling in case of long registration periods.

Use Estonian Business registries Open Data API:
https://avaandmed.ariregister.rik.ee/en/open-data-api/introduction-api-services

Simple company data query (status query) should be used:
https://avaandmed.ariregister.rik.ee/en/open-data-api/enterprise-simple-data-request-status-query

Its necessary to check the company status in addition to whether it exists or not:
R – entered in the register, L – in liquidation, N – bankrupt, K – deleted.
any status but R call some further actions by setting force delete - need to consider how to handle status L as these companies still exist but are in process of being deleted

@vohmar
Copy link
Contributor Author

vohmar commented Apr 23, 2024

Estonian business registry implemented simplified liquidation process to remove inactive companies from the registry. The process is special as the deleted companies have option to be restored for up to 3 years. For this reason we need to keep checking on the domains with force delete status to make sure that the registrant has not been restored. So far we only accounted for registrant change that would cancel forceDelete process now we need to make sure that the conditions for setting the force delete have not changed without any updates to the registration

@vohmar
Copy link
Contributor Author

vohmar commented Apr 23, 2024

Irregular requests: we need a manual running option for getting the list of domains with deleted registrants with additional information: date of the registrant deletion and possibly the reason for the deletion.

For getting the deletion there is the detailed company data query:
https://avaandmed.ariregister.rik.ee/en/open-data-api/detailed-company-data-query

we can limit the list with the companies we have found to be deleted. Also we can set the search parameter Staatus to K – deleted. Every status has the start date associated to it ns1:algus_kpv and this is the date we are looking for.

We should also check what kind of details we can get out from the
ns1:kandeliik12</ns1:kandeliik>
ns1:kandeliik_tekstinaMuutmiskanne</ns1:kandeliik_tekstina>

elements - we are looking for a type "Kustutamiskanne dokumentide hoidjata"/" Deletion entry without depositary of documents"

if we cannot get such details out from the detailed company query. If that is not the case then alternatively we should look at entries and ruling query: https://avaandmed.ariregister.rik.ee/en/open-data-api/entries-and-rulings-query

from there we are interested in
kandeliik - Entry type
kandeliik_tekstina - Entry type as text = "Deletion entry without depositary of documents"
maaruse_liik - Ruling type (may not be necessary if we get detailed enough kandeliik info)
maaruse_liik_tekstina - Ruling type as text (may not be necessary if we get detailed enough kandeliik info)
staatus - Status of the company = deleted

@vohmar
Copy link
Contributor Author

vohmar commented Apr 23, 2024

Breakdown of the check_all processes for the initial scan to determin the list of missing companies and the reason of the deletion:

  1. run the company_status:check_all job to filter out Estonian companies that do not exist (and their domains) without initiating forceDelete on any of them. For this basic data from e-business register's open data repository should be used. The list contains only existing companies so we filter out the orgs that are not in that list.
  2. take the list of Estonian companies that were not found in the open data file and run the list against e-business registry's API for detailed company data query (https://avaandmed.ariregister.rik.ee/en/open-data-api/detailed-company-data-query) to find out the reason for the company to be missing in the open data file
    2.1. group the list into at least two - companies missing from the business registry (fake, typos in registry code or wrong country code) and companies that are deleted
    2.2. extract the status, date and the reason for the deletion and save that data into a file

@vohmar
Copy link
Contributor Author

vohmar commented Apr 23, 2024

Breakdown of the regular daily scans process against Estonian business registry:

  1. run the company_status check job - the job checks any Estonian company linked to an existing domain and has not been check for at least the duration of {days_interval]
  2. set force delete on domains belonging to Estonian orgs that do not exist or are deleted
  3. continue checking on the domains for the duration of the forceDelete to determine if the status can be lifted (registrant restored/new registrant assigned/etc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants