# Where the data comes from and how it is kept current

Everything the API returns comes from official public registries. We do not fill in, estimate or mix in data from unofficial sources. Every response has a `sources` field that says, for each source, when it first and last supplied the information and from which dataset.

## The sources

| Source | What we take | How often |
|---|---|---|
| National Trade Register Office (ONRC), open data on data.gov.ro (licence CC BY 4.0) | The companies in the trade register: name, CUI, registration number, EUID, legal form, registered office, the register's statuses, the authorised activities | With every published dataset, about monthly |
| National Agency for Fiscal Administration (ANAF), the public web service for VAT | Fiscal status, VAT registration, VAT on collection, split VAT payment, inactivity, e-Factura, CAEN code | Daily for new companies, weekly for active VAT-registered ones, monthly for the rest |
| Ministry of Finance, open data on data.gov.ro | The annual financial statements, since 2008 | With every publication, usually once a year, with updates |
| National Bank of Romania | The reference exchange rate, since 2005 | Every banking day |

## New companies

A newly registered company usually appears here on the day after its registration.

Every company has two dates that must not be confused:

- `registered_on` is the registration date: the entry in the trade register where we know it, otherwise the fiscal registration at ANAF, which takes place a few days later.
- `discovered_at` is the moment the company entered our database. Whoever asks daily for new companies must page by this date, not by the registration date: a company registered on a Monday may be indexed on the Friday.

A company's secondary seat gets a CUI of its own at ANAF. It can be looked up by that CUI, but we neither count it nor return it as a new company.

## What the dates in a response mean

- `updated_at`: when something in the company's data last changed.
- `checked_at`: when we last asked ANAF about the company, even if nothing had changed. It is empty for a company known so far only from the trade register's dataset.
- `data_inmatriculare`: the date of entry in the trade register (source: ONRC).
- `data_inregistrare`: the date of fiscal registration (source: ANAF).
- `stare`: the company's status in a single word: `FUNCTIUNE`, `SUSPENDARE`, `REORGANIZARE JUDICIARA`, `INSOLVENTA`, `DIZOLVARE`, `LICHIDARE`, `FALIMENT` or `RADIERE`. All statuses and remarks from the trade register are in `stari_registru`.

If someone asks for a company we do not have yet, we look it up at ANAF right away. The answer comes in the same request or, if the source is slow, as `202` with a `Retry-After` header.

## Financial statements

They are the ones published by the Ministry of Finance, with the indicators in whole lei. An indicator the ministry leaves empty is `null`, not zero. Reporting types that have indicators beyond the common ones (banks, insurers, non-profit organisations) have them in `alti_indicatori`, under the name the ministry gives them. Before taking a file we check that the figures add up: total income less total expenses must equal gross profit less gross loss.

## What we do not serve

We serve no data about natural persons: sole traders (PFA), individual enterprises and family enterprises. For such a CUI the answer is `404`. We do not take the data about companies' legal representatives from the trade register.

## What we do not have yet

We would rather say that we do not have a piece of information than serve it from an unreliable source. At present we do not have:

- **Debts to the state budget.** ANAF publishes the list of companies with overdue obligations only through a protected search page, not as a dataset; the dataset on data.gov.ro is from 2016. The list covers only debts above a threshold anyway, so not being on it does not mean having no debts.
- **Work points (places of business).** The trade register does not publish them in its open data. ANAF gives some secondary seats a tax code of their own, but without the link to the company they belong to; we mark them as secondary seats and attribute them to no one.
- **Directors, partners and shareholders.** This is data about persons; we leave it aside until it has been reviewed legally.
- **Court cases, insolvency (BPI), the Official Gazette, licences and authorisations (ANRE, ARR), imports and exports.** Each has a different source, of different reliability; we will add them one at a time, only where the source is official and stable.

In a response, a `null` field means "we do not know", not "there is none": `caen_autorizate`, for example, is `null` for a company that does not appear in the trade register's dataset.

## Attribution

The trade register's data is published by the National Trade Register Office (Oficiul Național al Registrului Comerțului) under the Creative Commons Attribution 4.0 licence. We have processed it: we merged the entries of the same company, brought the diacritics to their correct form and translated the status codes.
