Match a list of records to firms
match_companiesMatch up to 500 company records to Romanian firms by CUI, name, county, or domain, returning CUI, companyName, confidence, matchedOn, or no_match with candidates.
Instructions
Match a list of up to 500 records (name, optional county, domain or CUI) to Romanian firms: each row gets match {cui, companyName, confidence, matchedOn} and the record, or no_match with up to 3 candidates. A valid CUI wins (confidence 1.0). Each row counts as one lookup; a batch larger than what is left today is refused whole.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Up to 500 records, each {name, county, domain, cui, ref} (any of them; ref is your own id, echoed back), or a bare string (a CUI, a domain or a name). | |
| fields | No | Optional: keep only these company fields in each row, comma-separated (companyName,cui,county,risk; dotted paths such as risk.level work). Without it the full record is returned. | |
| compact | No | Optional: true keeps a short preset per row (name, CUI, county, city, legal form, risk level and what it did not check, phone, website, latest revenue and headcount, record url). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asOf | No | What to cite: registry (ONRC snapshot date), financialYear (fiscal year of the figures), anaf (day of the ANAF data), snapshot, published, source. | |
| error | No | Set only when there is no answer (empty_query, invalid_cui, data_unavailable, plan_required ...); such a call is not counted. | |
| total | No | Number of input rows. | |
| errors | No | Rows that are input errors (nothing to match on). | |
| fields | No | The company fields kept when fields or compact trimmed the rows. | |
| source | No | Data source: onrc (registry) or mfp (Ministry of Finance filings). | |
| matched | No | Rows matched to a firm. | |
| message | No | A sentence for the caller. | |
| noMatch | No | Rows with no match above the threshold. | |
| results | No | Per row: row, input, status (matched or no_match), match {cui, companyName, confidence, matchedOn}, company, or candidates. | |
| metering | No | What the batch cost: rows, counted, notCounted (input-error rows are not counted) and the rule. | |
| warnings | No | Notes on how the request was read (a clamped limit, a widened CAEN code, an ignored field). | |
| threshold | No | Confidence a row needs to be matched (0-1). | |
| attribution | No | The credit line to keep when redistributing the data (CC BY 4.0). |