{"components":{"responses":{"Accepted":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pending"}}},"description":"The company is being looked up at ANAF and did not arrive in time. Repeat the request after the number of seconds in `Retry-After`. Does not count as a request."},"BadRequest":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"A parameter is missing or not valid; `detail` says which."},"Forbidden":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The plan does not include this request; `upgrade_url` leads to the plans."},"NotFound":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Does not exist: an unregistered CUI, a natural person, or no data for the day or year requested."},"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The limit per minute or the month's number of requests has been exceeded. Does not count as a request."},"Unauthorized":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The API key is missing or not valid."},"Unavailable":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"The company is not in the database and ANAF could not be asked right now. Does not count as a request."}},"schemas":{"BatchRequest":{"properties":{"cuis":{"description":"Between 1 and 100 CUIs, as text or as numbers, with or without the `RO` prefix.","type":"array"}},"type":"object","x-order":["cuis"]},"BatchResult":{"properties":{"data":{"description":"The companies found, in the order in which they were asked for.","items":{"$ref":"#/components/schemas/Company"},"type":"array"},"invalid":{"description":"What is not a valid CUI, as it was received.","type":"array"},"not_stored":{"description":"The valid CUIs that are not in the database yet. They cost nothing; asked for by themselves, they are looked up at ANAF.","type":"array"},"withheld":{"description":"The CUIs under which there is an entry we serve no data about: a natural person, or one not classified yet.","type":"array"}},"type":"object","x-order":["data","withheld","not_stored","invalid"]},"Company":{"properties":{"adresa_completa":{"description":"The address of the registered office, as one text.","type":["string","null"]},"caen":{"description":"The CAEN code of the main activity (source: ANAF). CAEN is the Romanian classification of economic activities, aligned with NACE.","type":["integer","null"]},"caen_autorizate":{"description":"The activities the company is authorised for, from the trade register's open data: each with `cod` (code), `versiune` (the version of the CAEN classification it was declared in: 3 is the one of 2025, 2 the one of 2008, 1 the one of 2003, 0 the one of 1998) and `denumire` (name), the newest classification first. The register also keeps what was declared in the old classifications, so the same activity can appear with codes of several versions. `null` when they are not known (the company is not in the register's dataset), which does not mean that it has none.","type":["array","null"]},"caen_denumire":{"description":"The name of the CAEN code, in the classification in force.","type":["string","null"]},"checked_at":{"description":"When ANAF was last asked about the company; `null` if not yet.","format":"date-time","type":["string","null"]},"cod_postal":{"description":"The postal code.","type":["string","null"]},"cui":{"description":"The unique registration code (CUI).","type":"integer"},"data_inactivare":{"description":"Since when it has been inactive.","format":"date","type":["string","null"]},"data_inceput_tva":{"description":"Since when it has been registered for VAT.","format":"date","type":["string","null"]},"data_inmatriculare":{"description":"The date of entry in the trade register (source: ONRC).","format":"date","type":["string","null"]},"data_inregistrare":{"description":"The date of fiscal registration (source: ANAF).","format":"date","type":["string","null"]},"data_sfarsit_tva":{"description":"Until when it was registered, if it no longer is.","format":"date","type":["string","null"]},"denumire":{"description":"The name.","type":["string","null"]},"e_factura":{"description":"Whether it is in the RO e-Factura register.","type":"boolean"},"euid":{"description":"The European unique identifier (source: ONRC, the trade register).","type":["string","null"]},"forma_juridica":{"description":"The legal form as ANAF writes it.","type":["string","null"]},"forma_juridica_cod":{"description":"The legal form from the trade register: `SRL`, `SA`, ...","type":["string","null"]},"judet":{"description":"The county code of the registered office: `SB`, `B`, ...","type":["string","null"]},"localitate":{"description":"The locality of the registered office.","type":["string","null"]},"nr_reg_com":{"description":"The registration number in the trade register.","type":["string","null"]},"scp_tva":{"description":"Whether it is registered for VAT.","type":"boolean"},"sediu_secundar":{"description":"Whether it is the secondary seat of a company, registered at ANAF with a CUI of its own.","type":"boolean"},"sources":{"description":"Which sources the company's data comes from, and since when.","items":{"$ref":"#/components/schemas/Source"},"type":"array"},"split_tva":{"description":"Whether it applies split VAT payment.","type":"boolean"},"stare":{"description":"The status, in one word: `FUNCTIUNE` (in operation), `SUSPENDARE` (suspended), `REORGANIZARE JUDICIARA` (judicial reorganisation), `INSOLVENTA` (insolvency), `DIZOLVARE` (dissolution), `LICHIDARE` (liquidation), `FALIMENT` (bankruptcy), `RADIERE` (struck off).","type":["string","null"]},"stari_registru":{"description":"All statuses and remarks from the trade register, each with `cod` (code) and `denumire` (name).","type":"array"},"status_inactiv":{"description":"Whether it is declared fiscally inactive.","type":"boolean"},"telefon":{"description":"The telephone number declared to ANAF.","type":["string","null"]},"tva_incasare":{"description":"Whether it applies VAT on collection.","type":"boolean"},"updated_at":{"description":"When something in the company's data last changed.","format":"date-time","type":["string","null"]},"web":{"description":"The web address declared to the trade register.","type":["string","null"]}},"type":"object","x-order":["cui","denumire","nr_reg_com","euid","sediu_secundar","forma_juridica","forma_juridica_cod","stare","stari_registru","caen","caen_denumire","caen_autorizate","data_inregistrare","data_inmatriculare","web","judet","localitate","adresa_completa","cod_postal","telefon","scp_tva","data_inceput_tva","data_sfarsit_tva","tva_incasare","split_tva","status_inactiv","data_inactivare","e_factura","updated_at","checked_at","sources"]},"CompanyFound":{"properties":{"cui":{"description":"The unique registration code (CUI).","type":"integer"},"denumire":{"description":"The name.","type":["string","null"]},"forma_juridica_cod":{"description":"The legal form from the trade register: `SRL`, `SA`, ...","type":["string","null"]},"judet":{"description":"The county code of the registered office: `SB`, `B`, ...","type":["string","null"]},"localitate":{"description":"The locality of the registered office.","type":["string","null"]},"nr_reg_com":{"description":"The registration number in the trade register.","type":["string","null"]},"stare":{"description":"The status, in one word: `FUNCTIUNE` (in operation), `SUSPENDARE` (suspended), `REORGANIZARE JUDICIARA` (judicial reorganisation), `INSOLVENTA` (insolvency), `DIZOLVARE` (dissolution), `LICHIDARE` (liquidation), `FALIMENT` (bankruptcy), `RADIERE` (struck off).","type":["string","null"]}},"type":"object","x-order":["cui","denumire","nr_reg_com","forma_juridica_cod","stare","judet","localitate"]},"CuiValidation":{"properties":{"cui":{"description":"The CUI as a number, if it is valid; otherwise the text received.","type":["integer","string"]},"valid":{"description":"Whether the form and the check digit are correct.","type":"boolean"}},"type":"object","x-order":["cui","valid"]},"Event":{"properties":{"detected_at":{"description":"When we observed the change.","format":"date-time","type":"string"},"new":{"description":"The value after, likewise.","type":["object","null"]},"occurred_on":{"description":"The day the source gives for the change, where it gives one (for example the beginning of the VAT period).","format":"date","type":["string","null"]},"old":{"description":"The value before, under the name of the field that changed (`denumire`, `adresa_completa`, `stare`, `caen`); `null` when the event is a beginning or an end.","type":["object","null"]},"source":{"description":"The key of the source in whose answer the change appeared: `anaf_ws`.","type":"string"},"type":{"description":"The kind of change: `vat_registered`, `vat_deregistered`, `vat_on_collection_started`, `vat_on_collection_ended`, `split_vat_started`, `split_vat_ended`, `inactivated`, `reactivated`, `efactura_registered`, `efactura_deregistered`, `struck_off`, `status_changed`, `name_changed`, `address_changed`, `caen_changed`.","type":"string"}},"type":"object","x-order":["type","old","new","occurred_on","detected_at","source"]},"EventsList":{"properties":{"cui":{"description":"The company's CUI.","type":"integer"},"events":{"description":"The changes observed, the most recent first.","items":{"$ref":"#/components/schemas/Event"},"type":"array"}},"type":"object","x-order":["cui","events"]},"FinancialsList":{"properties":{"cui":{"description":"The company's CUI.","type":"integer"},"financials":{"description":"The financial statements, the most recent year first.","items":{"$ref":"#/components/schemas/Statement"},"type":"array"}},"type":"object","x-order":["cui","financials"]},"FxConversion":{"properties":{"amount":{"description":"The amount.","type":"number"},"date":{"description":"The requested day.","format":"date","type":"string"},"effective_date":{"description":"The banking day of the rate used.","format":"date","type":"string"},"from":{"description":"The currency of the amount.","type":"string"},"rate":{"description":"The rate used, from `from` to `to`.","type":"number"},"result":{"description":"The converted amount.","type":"number"},"to":{"description":"The currency of the result.","type":"string"}},"type":"object","x-order":["from","to","amount","result","rate","date","effective_date"]},"FxDay":{"properties":{"base":{"description":"The currency the rates are expressed in: `RON`.","type":"string"},"date":{"description":"The requested day.","format":"date","type":"string"},"effective_date":{"description":"The banking day for which the rate was published.","format":"date","type":"string"},"rates":{"description":"For each currency: `rate`, in lei for `multiplier` units of the currency.","type":"object"},"source":{"description":"The source of the rate and when it was retrieved.","type":"object"}},"type":"object","x-order":["date","effective_date","base","rates","source"]},"FxSeries":{"properties":{"base":{"description":"`RON`.","type":"string"},"currency":{"description":"The currency.","type":"string"},"from":{"description":"The first day of the period.","format":"date","type":"string"},"series":{"description":"For each banking day: `date`, `rate` and `multiplier`.","type":"array"},"to":{"description":"The last day of the period.","format":"date","type":"string"}},"type":"object","x-order":["currency","base","from","to","series"]},"InvoiceCheck":{"properties":{"checked_at":{"description":"When ANAF last answered about the company.","format":"date-time","type":["string","null"]},"cui":{"description":"The unique registration code (CUI).","type":"integer"},"denumire":{"description":"The name.","type":["string","null"]},"efactura_registered":{"description":"Whether it is in the RO e-Factura register.","type":"boolean"},"exists":{"description":"Whether ANAF knows a taxpayer with this CUI.","type":"boolean"},"inactive":{"description":"Whether it is declared fiscally inactive.","type":"boolean"},"split_vat":{"description":"Whether it applies split VAT payment.","type":"boolean"},"stare":{"description":"The status, in one word, as in the company's data.","type":["string","null"]},"struck_off":{"description":"Whether it is struck off.","type":"boolean"},"valid_for_invoicing":{"description":"Whether the company exists, is not struck off and is not fiscally inactive.","type":"boolean"},"vat_number":{"description":"The VAT number (`RO` followed by the CUI), if it is registered for VAT.","type":["string","null"]},"vat_on_collection":{"description":"Whether it applies VAT on collection.","type":"boolean"},"vat_registered":{"description":"Whether it is registered for VAT.","type":"boolean"}},"type":"object","x-order":["cui","exists","denumire","valid_for_invoicing","vat_registered","vat_number","vat_on_collection","split_vat","inactive","struck_off","efactura_registered","stare","checked_at"]},"Pending":{"properties":{"retry_after":{"description":"After how many seconds the request is worth repeating.","type":"integer"},"status":{"description":"`pending`.","type":"string"}},"type":"object","x-order":["status","retry_after"]},"Problem":{"properties":{"detail":{"description":"What exactly went wrong.","type":"string"},"status":{"description":"The HTTP status code.","type":"integer"},"title":{"description":"The error, in short.","type":"string"},"type":{"description":"The address that identifies the kind of error.","type":"string"}},"type":"object","x-order":["type","title","status","detail"]},"Registration":{"properties":{"cod_postal":{"description":"The postal code.","type":["string","null"]},"sediu_secundar":{"description":"Whether it is the secondary seat of a company, registered at ANAF with a CUI of its own.","type":"boolean"},"scp_tva":{"description":"Whether it is registered for VAT.","type":"boolean"},"judet":{"description":"The county code of the registered office: `SB`, `B`, ...","type":["string","null"]},"e_factura":{"description":"Whether it is in the RO e-Factura register.","type":"boolean"},"checked_at":{"description":"When ANAF was last asked about the company; `null` if not yet.","format":"date-time","type":["string","null"]},"denumire":{"description":"The name.","type":["string","null"]},"tva_incasare":{"description":"Whether it applies VAT on collection.","type":"boolean"},"cui":{"description":"The unique registration code (CUI).","type":"integer"},"caen":{"description":"The CAEN code of the main activity (source: ANAF). CAEN is the Romanian classification of economic activities, aligned with NACE.","type":["integer","null"]},"forma_juridica_cod":{"description":"The legal form from the trade register: `SRL`, `SA`, ...","type":["string","null"]},"status_inactiv":{"description":"Whether it is declared fiscally inactive.","type":"boolean"},"data_inactivare":{"description":"Since when it has been inactive.","format":"date","type":["string","null"]},"data_inmatriculare":{"description":"The date of entry in the trade register (source: ONRC).","format":"date","type":["string","null"]},"nr_reg_com":{"description":"The registration number in the trade register.","type":["string","null"]},"data_inceput_tva":{"description":"Since when it has been registered for VAT.","format":"date","type":["string","null"]},"data_inregistrare":{"description":"The date of fiscal registration (source: ANAF).","format":"date","type":["string","null"]},"updated_at":{"description":"When something in the company's data last changed.","format":"date-time","type":["string","null"]},"forma_juridica":{"description":"The legal form as ANAF writes it.","type":["string","null"]},"split_tva":{"description":"Whether it applies split VAT payment.","type":"boolean"},"web":{"description":"The web address declared to the trade register.","type":["string","null"]},"data_sfarsit_tva":{"description":"Until when it was registered, if it no longer is.","format":"date","type":["string","null"]},"adresa_completa":{"description":"The address of the registered office, as one text.","type":["string","null"]},"discovered_at":{"description":"The company's place in the order of discovery: the moment it entered our database or, if its CAEN code, county or legal form became known later, that moment.","format":"date-time","type":"string"},"stare":{"description":"The status, in one word: `FUNCTIUNE` (in operation), `SUSPENDARE` (suspended), `REORGANIZARE JUDICIARA` (judicial reorganisation), `INSOLVENTA` (insolvency), `DIZOLVARE` (dissolution), `LICHIDARE` (liquidation), `FALIMENT` (bankruptcy), `RADIERE` (struck off).","type":["string","null"]},"caen_denumire":{"description":"The name of the CAEN code, in the classification in force.","type":["string","null"]},"caen_autorizate":{"description":"The activities the company is authorised for, from the trade register's open data: each with `cod` (code), `versiune` (the version of the CAEN classification it was declared in: 3 is the one of 2025, 2 the one of 2008, 1 the one of 2003, 0 the one of 1998) and `denumire` (name), the newest classification first. The register also keeps what was declared in the old classifications, so the same activity can appear with codes of several versions. `null` when they are not known (the company is not in the register's dataset), which does not mean that it has none.","type":["array","null"]},"telefon":{"description":"The telephone number declared to ANAF.","type":["string","null"]},"euid":{"description":"The European unique identifier (source: ONRC, the trade register).","type":["string","null"]},"localitate":{"description":"The locality of the registered office.","type":["string","null"]},"registered_on":{"description":"The registration date: the entry in the trade register where it is known, otherwise the fiscal registration at ANAF.","format":"date","type":["string","null"]},"stari_registru":{"description":"All statuses and remarks from the trade register, each with `cod` (code) and `denumire` (name).","type":"array"},"sources":{"description":"Which sources the company's data comes from, and since when.","items":{"$ref":"#/components/schemas/Source"},"type":"array"}},"type":"object","x-order":["cui","denumire","nr_reg_com","euid","sediu_secundar","forma_juridica","forma_juridica_cod","stare","stari_registru","caen","caen_denumire","caen_autorizate","data_inregistrare","data_inmatriculare","web","judet","localitate","adresa_completa","cod_postal","telefon","scp_tva","data_inceput_tva","data_sfarsit_tva","tva_incasare","split_tva","status_inactiv","data_inactivare","e_factura","updated_at","checked_at","sources","registered_on","discovered_at"]},"RegistrationEvent":{"properties":{"created_at":{"description":"When the event was created.","format":"date-time","type":"string"},"data":{"$ref":"#/components/schemas/Registration","description":"The company, exactly as `GET /rest/v1/registrations` returns it."},"id":{"description":"Identifies the event: `company.registered:` followed by the CUI. The same on every retry.","type":"string"},"test":{"description":"`true` for a test message requested from the account: it has the form of a real one, with some company, and an `id` that starts with `test:`.","type":"boolean"},"type":{"description":"The kind of event: `company.registered`.","type":"string"}},"type":"object","x-order":["id","type","test","created_at","data"]},"RegistrationsCount":{"properties":{"count":{"description":"The number of companies that match the filter.","type":"integer"},"filter":{"description":"The filter applied, with the resulting period.","type":"object"},"upgrade_required_for_records":{"description":"Whether the list of these companies needs a higher plan than the key's.","type":"boolean"}},"type":"object","x-order":["count","filter","upgrade_required_for_records"]},"RegistrationsPage":{"properties":{"data":{"description":"The companies, in the order in which they were indexed.","items":{"$ref":"#/components/schemas/Registration"},"type":"array"},"filter":{"description":"The filter applied, with the resulting period.","type":"object"},"next_cursor":{"description":"To be sent as `cursor` for the next page; `null` on the last page.","type":["string","null"]}},"type":"object","x-order":["data","next_cursor","filter"]},"SearchResult":{"properties":{"data":{"description":"The companies found, the closest first: at most 10.","items":{"$ref":"#/components/schemas/CompanyFound"},"type":"array"},"more":{"description":"`true` if other companies match beside those returned.","type":"boolean"}},"type":"object","x-order":["data","more"]},"Source":{"properties":{"dataset":{"description":"The dataset the information was last taken from, for the sources that publish files.","type":["string","null"]},"dataset_url":{"description":"The dataset's page (for financial statements).","type":["string","null"]},"first_retrieved_at":{"description":"When the source first supplied the information.","format":"date-time","type":["string","null"]},"import_run_id":{"description":"The import run that brought the information.","type":["integer","null"]},"last_retrieved_at":{"description":"When it last supplied it.","format":"date-time","type":["string","null"]},"licence":{"description":"The licence under which the data is published, where one is stated.","type":["string","null"]},"name":{"description":"The source's name.","type":"string"},"published_at":{"description":"When the institution published the file (for financial statements).","format":"date-time","type":["string","null"]},"publisher":{"description":"The institution that publishes the data.","type":"string"},"source":{"description":"The source's key: `anaf_ws`, `onrc_bulk`, `mf_financials`.","type":"string"},"url":{"description":"The source's address.","type":"string"}},"type":"object","x-order":["source","name","publisher","url","licence","dataset","dataset_url","published_at","first_retrieved_at","last_retrieved_at","import_run_id"]},"Statement":{"properties":{"active_circulante":{"description":"Current assets, total. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"active_imobilizate":{"description":"Fixed assets, total. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"alti_indicatori":{"description":"The indicators this reporting type has in addition, each with `cod` (code), `denumire` (name) and `valoare` (value).","type":"array"},"an":{"description":"The year of the financial statement.","type":"integer"},"caen":{"description":"The CAEN code from the financial statement.","type":["integer","null"]},"caen_denumire":{"description":"The name of the code, in the classification in force in that year.","type":["string","null"]},"capital_social":{"description":"Subscribed and paid-up share capital. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"capitaluri_total":{"description":"Equity, total. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"casa_banca":{"description":"Cash and bank accounts. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"cheltuieli_avans":{"description":"Prepaid expenses. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"cheltuieli_totale":{"description":"Total expenses. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"cifra_afaceri":{"description":"Net turnover. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"creante":{"description":"Receivables. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"cui":{"description":"The company's CUI.","type":"integer"},"datorii":{"description":"Liabilities. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"nr_mediu_salariati":{"description":"Average number of employees. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"patrimoniul_regiei":{"description":"Patrimony of the autonomous state enterprise (regie). In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"pierdere_bruta":{"description":"Gross loss. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"pierdere_neta":{"description":"Net loss. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"profit_brut":{"description":"Gross profit. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"profit_net":{"description":"Net profit. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"provizioane":{"description":"Provisions. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"sources":{"description":"The dataset the statement comes from, when the ministry published it and when we retrieved it.","items":{"$ref":"#/components/schemas/Source"},"type":"array"},"stocuri":{"description":"Inventories. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"tip_raportare":{"description":"The Ministry of Finance's reporting type: `UU` (abbreviated balance sheet), `BL_BS_SL`, `IR` (IFRS), `ONG` (non-profit organisations), ...","type":"string"},"tip_raportare_descriere":{"description":"What kind of taxpayers file this type.","type":["string","null"]},"updated_at":{"description":"When the statement last changed in our database.","format":"date-time","type":"string"},"venituri_avans":{"description":"Deferred income. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]},"venituri_totale":{"description":"Total income. In whole lei; `null` if the ministry does not publish the value.","type":["integer","null"]}},"type":"object","x-order":["cui","an","tip_raportare","tip_raportare_descriere","caen","caen_denumire","active_imobilizate","active_circulante","stocuri","creante","casa_banca","cheltuieli_avans","datorii","venituri_avans","provizioane","capitaluri_total","capital_social","patrimoniul_regiei","cifra_afaceri","venituri_totale","cheltuieli_totale","profit_brut","pierdere_bruta","profit_net","pierdere_neta","nr_mediu_salariati","alti_indicatori","updated_at","sources"]}},"securitySchemes":{"cheie":{"description":"The API key, in the header `Authorization: Bearer <key>`.","scheme":"bearer","type":"http"}}},"info":{"description":"Data about companies in Romania: identification data, status, VAT, annual financial statements, newly registered companies and the reference exchange rate of the National Bank of Romania. Every answer says which source the information comes from and what date it is from.","title":"apifirme","version":"1"},"openapi":"3.1.0","paths":{"/rest/v1/companies/batch":{"post":{"description":"Up to 100 CUIs in a single request, answered from what is already in the database. It costs as many requests as the CUIs it answers for: one for each company returned and for each CUI we serve no data about, and one at least. A CUI that is not in the database yet appears in `not_stored`, costs nothing and can be asked for by itself, with `GET /rest/v1/companies/{cui}`, which looks it up at ANAF right away. For the limit per minute, a request for several companies is one request.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}},"description":"The CUIs asked for.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResult"}}},"description":"The companies found, and what became of the other CUIs."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Several companies in one request","tags":["Companies"]}},"/rest/v1/companies/search":{"get":{"description":"Finds a company by its name or by its trade register number, for whoever does not know its CUI. Exactly one of `denumire` and `nr_reg_com` is given. By name, the companies called exactly that come first, with or without the legal form (“dedeman” finds “DEDEMAN SRL”), then those whose name begins with it, then those that contain all its words, in any order. Diacritics and capital letters do not matter, and companies in operation come before the others. The answer has at most 10 companies, each with a few fields, and no next page: `more` says that others match as well, and then the county or a more exact name helps. A company's full data is requested with its CUI. Natural persons and secondary seats are not among the results. A search costs one request and has a limit per minute of its own, by plan; beyond it the answer is `429` with `searches-limited`.","parameters":[{"description":"The company's name or a part of it: at least one word of three letters or digits, beside the legal form.","in":"query","name":"denumire","required":false,"schema":{"type":"string"}},{"description":"The trade register number, in the old form (`J32/508/2000`) or the new one (`J2000000508324`), whichever way we store it. Numbers that begin with `F` belong to natural persons, about whom no data is served.","in":"query","name":"nr_reg_com","required":false,"schema":{"type":"string"}},{"description":"With `denumire` only: one county's code, as on number plates (`SB`, `B` for Bucharest).","in":"query","name":"judet","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResult"}}},"description":"The companies found."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Find a company without its CUI","tags":["Companies"]}},"/rest/v1/companies/{cui}":{"get":{"description":"Returns the company with this CUI. If the company is not in the database yet, it is looked up at ANAF (the Romanian tax administration) right away: the answer comes in the same request or, if the source is slow, as `202` with a `Retry-After` header. For a natural person (a sole trader: PFA, individual or family enterprise) the answer is `404`.","parameters":[{"description":"The unique registration code (CUI), with or without the `RO` prefix, for example `13548146`.","in":"path","name":"cui","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}},"description":"The company."},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}},"summary":"A company's data","tags":["Companies"]}},"/rest/v1/companies/{cui}/events":{"get":{"description":"The changes observed at the company since we have been following it, the most recent first (200 at most): registration for VAT or removal from it, VAT on collection, split VAT payment, being declared inactive and being reactivated, being struck off, a change of status, name, address or CAEN code, RO e-Factura. A change is noted when ANAF's answer about the company differs from its previous answer; what was before our first answer from ANAF does not appear, and the list is empty if nothing has been observed. That a company is new is not an event here: that is what `registrations` is for.","parameters":[{"description":"The unique registration code (CUI), with or without the `RO` prefix, for example `13548146`.","in":"path","name":"cui","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsList"}}},"description":"The changes observed at the company."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"What changed at a company","tags":["Companies"]}},"/rest/v1/companies/{cui}/financials":{"get":{"description":"All annual financial statements of the company, the most recent year first. The list is empty if there are none.","parameters":[{"description":"The unique registration code (CUI), with or without the `RO` prefix, for example `13548146`.","in":"path","name":"cui","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialsList"}}},"description":"The company's financial statements."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"A company's financial statements","tags":["Financial statements"]}},"/rest/v1/companies/{cui}/financials/{year}":{"get":{"parameters":[{"description":"The unique registration code (CUI), with or without the `RO` prefix, for example `13548146`.","in":"path","name":"cui","required":true,"schema":{"type":"string"}},{"description":"The year of the financial statement, for example `2025`.","in":"path","name":"year","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statement"}}},"description":"The financial statement of that year."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"The financial statement of one year","tags":["Financial statements"]}},"/rest/v1/fx/convert":{"get":{"parameters":[{"description":"The currency of the amount, for example `EUR`.","in":"query","name":"from","required":true,"schema":{"type":"string"}},{"description":"The currency of the result, for example `RON`.","in":"query","name":"to","required":true,"schema":{"type":"string"}},{"description":"The amount.","in":"query","name":"amount","required":true,"schema":{"type":"number"}},{"description":"The day of the rate. Today by default.","in":"query","name":"date","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxConversion"}}},"description":"The amount converted at BNR's rate."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Conversion between two currencies","tags":["BNR exchange rates"]}},"/rest/v1/fx/latest":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxDay"}}},"description":"The rates of the last banking day."},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"The latest published rate","tags":["BNR exchange rates"]}},"/rest/v1/fx/series":{"get":{"parameters":[{"description":"The currency code, for example `EUR`.","in":"query","name":"currency","required":true,"schema":{"type":"string"}},{"description":"The first day.","in":"query","name":"from","required":true,"schema":{"format":"date","type":"string"}},{"description":"The last day.","in":"query","name":"to","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxSeries"}}},"description":"The rate of every banking day of the period."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"A currency's rate over a period","tags":["BNR exchange rates"]}},"/rest/v1/fx/{date}":{"get":{"description":"For a day on which BNR does not publish (a weekend, a public holiday) the rate of the last banking day before it is returned; `effective_date` says which day that is.","parameters":[{"description":"The day, for example `2026-10-02`.","in":"path","name":"date","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FxDay"}}},"description":"The rates valid on that day."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"The rate of one day","tags":["BNR exchange rates"]}},"/rest/v1/invoice-check/{cui}":{"get":{"description":"Answers, in a single request, what an invoicing program wants to know about a customer: whether it exists, is registered for VAT, applies VAT on collection, is fiscally inactive, is in the RO e-Factura register. If ANAF's last answer about the company is more than 24 hours old, the company is asked about again right away; `checked_at` says how old the data is. A valid CUI that ANAF does not know gets `200` with `exists: false`.","parameters":[{"description":"The unique registration code (CUI), with or without the `RO` prefix, for example `13548146`.","in":"path","name":"cui","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCheck"}}},"description":"The result of the check."},"202":{"$ref":"#/components/responses/Accepted"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"503":{"$ref":"#/components/responses/Unavailable"}},"summary":"Check before invoicing","tags":["Companies"]}},"/rest/v1/registrations":{"get":{"description":"The legal persons registered in the requested period, in the order in which they were indexed, paginated by cursor. The period is limited by the plan; a longer period is refused with `400`, not silently shortened. Whoever asks daily must continue from `next_cursor` or, after the last page, send as `discovered_after` the `discovered_at` value of the last company received (not the time of their own clock and not the registration date): a company registered on a Monday may be indexed on the Friday, and companies become visible strictly in the order of `discovered_at`, so none is missed this way. A company can appear a second time, with a new `discovered_at`: when its CAEN code, county or legal form becomes known after it was indexed (a quarter of the new companies have no CAEN code yet on their first day). That way those who filter by these receive it too; it is recognised by its `cui`. Secondary seats and natural persons do not appear. Plans that do not include the list get `403`.","parameters":[{"description":"The companies registered in the last so many days. Not together with `registered_after`.","in":"query","name":"days","required":false,"schema":{"type":"integer"}},{"description":"The companies registered on or after this day.","in":"query","name":"registered_after","required":false,"schema":{"format":"date","type":"string"}},{"description":"Only the companies we indexed after this moment (`2026-10-01T08:00:00Z`) or this day.","in":"query","name":"discovered_after","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"One or more four-digit CAEN codes, separated by commas.","in":"query","name":"caen","required":false,"schema":{"type":"string"}},{"description":"The first two digits (the division) or three (the group) of the CAEN code.","in":"query","name":"caen_prefix","required":false,"schema":{"type":"string"}},{"description":"One or more county codes (`SB`, `B`), separated by commas.","in":"query","name":"judet","required":false,"schema":{"type":"string"}},{"description":"One or more legal forms, by the trade register's codes (`SRL`, `SA`), separated by commas.","in":"query","name":"forma_juridica","required":false,"schema":{"type":"string"}},{"description":"How many companies per page, between 1 and 500. 100 by default.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"description":"The `next_cursor` value from the previous answer.","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationsPage"}}},"description":"A page of new companies."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Newly registered companies","tags":["New companies"]}},"/rest/v1/registrations/count":{"get":{"description":"How many companies match the filter. Included in every plan, over at most the longest period any plan offers. Without `days` or `registered_after` the last 30 days are counted.","parameters":[{"description":"The companies registered in the last so many days. Not together with `registered_after`.","in":"query","name":"days","required":false,"schema":{"type":"integer"}},{"description":"The companies registered on or after this day.","in":"query","name":"registered_after","required":false,"schema":{"format":"date","type":"string"}},{"description":"Only the companies we indexed after this moment (`2026-10-01T08:00:00Z`) or this day.","in":"query","name":"discovered_after","required":false,"schema":{"format":"date-time","type":"string"}},{"description":"One or more four-digit CAEN codes, separated by commas.","in":"query","name":"caen","required":false,"schema":{"type":"string"}},{"description":"The first two digits (the division) or three (the group) of the CAEN code.","in":"query","name":"caen_prefix","required":false,"schema":{"type":"string"}},{"description":"One or more county codes (`SB`, `B`), separated by commas.","in":"query","name":"judet","required":false,"schema":{"type":"string"}},{"description":"One or more legal forms, by the trade register's codes (`SRL`, `SA`), separated by commas.","in":"query","name":"forma_juridica","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationsCount"}}},"description":"The number of companies."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"The number of newly registered companies","tags":["New companies"]}},"/rest/v1/validate/cui/{cui}":{"get":{"description":"Checks the form and the check digit. Does not say whether a company with this CUI exists. No key, free of charge.","parameters":[{"description":"The unique registration code (CUI), with or without the `RO` prefix, for example `13548146`.","in":"path","name":"cui","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CuiValidation"}}},"description":"The result of the check."}},"security":[],"summary":"Check a CUI","tags":["Validation"]}}},"security":[{"cheie":[]}],"servers":[{"url":"https://api.apifirme.dev"}],"tags":[{"description":"A company's data, by its CUI (the Romanian unique registration code).","name":"Companies"},{"description":"The annual financial statements published by the Ministry of Finance.","name":"Financial statements"},{"description":"Newly registered companies, for those who want to learn every day which companies have appeared.","name":"New companies"},{"description":"The reference exchange rate of the National Bank of Romania (BNR), since 2005.","name":"BNR exchange rates"},{"description":"Checks that need no key.","name":"Validation"}],"webhooks":{"company.registered":{"post":{"description":"Sent to the address registered in the account, a few minutes after a new company that matches the webhook's filters has entered our database. The `X-Apifirme-Signature` header has the form `t=<Unix time>,v1=<signature>`; the signature is HMAC-SHA256, in hexadecimal, over `<t>.<request body>`, with the webhook's secret as the key. Any `2xx` answer within ten seconds confirms receipt; otherwise the delivery is retried up to eight times, with ever longer pauses, for almost a day. The same company always has the same `id`, so a repeated delivery can be recognised, and each webhook receives a company only once: the first time it matches its filters. After five deliveries in a row have been given up on, the webhook is switched off and can be switched on again in the account. A test message (`test: true`) can be sent from the account at any time.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationEvent"}}},"required":true},"responses":{"200":{"description":"The message was received."}},"security":[],"summary":"A newly registered company","tags":["New companies"]}}}}