{"openapi":"3.1.0","info":{"title":"Leadgen API — Romanian business registry (ONRC)","description":"**Send your key as the `X-API-Key` header.** Anonymous callers get 5 lookups a day; a free key (50/day) takes ten seconds at [/start](https://leadgen.adrianhomelab.com/start). Read-only JSON over Romania's official ONRC registry: 4.2M companies, CAEN activities, legal representatives, statuses and financial statements. Search is diacritic-insensitive.","version":"2.0.2"},"paths":{"/api/subscribe":{"post":{"tags":["Billing"],"summary":"Subscribe","description":"Start a Pro or Business subscription (`plan`: pro|business, `interval`:\nmonth|year). The buyer is the holder of the key in `X-API-Key`, the key named\nby a signed `upgrade_token` (the `upgrade` link of a refusal), or an `email`:\na new address gets a free key when the payment succeeds; an address that\nalready has a key gets a confirmation link by email instead (202,\n`kind: confirm_sent`). `buyer_type` company needs `cui`: a Romanian CUI\n(name and address are prefilled from the registry; it must be in the\nregister, 422 `company_not_found`, and not struck off, 422\n`company_closed`, checked before any Stripe call), or a company outside\nRomania gives its VAT number with the country prefix (`DE123456789`; not\nlooked up: it goes on the Stripe customer and the invoice, Stripe's page asks only the\nbilling address). `consent` must carry `terms` true, plus\n`immediate_start` true for a person or `business_purchase` true for a company.\nAnswers `{kind, url}`: `checkout` (Stripe's payment page) or\n`portal_update` (the key already subscribes: change plan in the portal).\n403 `checkout_closed` while paid plans are not on sale.","operationId":"subscribe_api_subscribe_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/intent":{"get":{"tags":["Billing"],"summary":"Billing Intent","description":"What a signed upgrade link names, for the checkout page: the key's\nprefix, its plan now, the plan offered and the address (masked).","operationId":"billing_intent_api_billing_intent_get","parameters":[{"name":"u","in":"query","required":true,"schema":{"type":"string","maxLength":2048,"title":"U"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/company/{cui}":{"get":{"tags":["Billing"],"summary":"Billing Company","description":"A company's invoice details from our own registry (name, address, VAT\nstatus) to prefill the checkout, and whether it may subscribe\n(`can_subscribe`: false for a firm struck off, `risk_level` closed). Not a\nlookup: never counted, limited per IP, and only while paid plans are on\nsale. 404 `unknown_cui`: not a firm in our (Romanian) register.","operationId":"billing_company_api_billing_company__cui__get","parameters":[{"name":"cui","in":"path","required":true,"schema":{"type":"string","maxLength":16,"title":"Cui"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/portal":{"post":{"tags":["Billing"],"summary":"Billing Portal","description":"Open the Stripe Customer Portal for the subscription of the key in\n`X-API-Key`: cancel (at period end), switch plan or interval, change the\ncard, billing details, invoices. Answers `{url}` (valid a few minutes).\nOpen whether or not paid plans are on sale; while they are not, the portal\ncannot switch plan or interval (its sales-closed configuration), and if\nthat configuration is missing the answer is 503 `portal_unavailable`.","operationId":"billing_portal_api_billing_portal_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PortalRequest"},{"type":"null"}],"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/portal-link":{"post":{"tags":["Billing"],"summary":"Billing Portal Link","description":"Email a one-time link to the subscription portal to an address that\nhas a subscription. The answer is the same whether or not it has one.\nOpen whether or not paid plans are on sale (a subscriber can always reach\nthe portal).","operationId":"billing_portal_link_api_billing_portal_link_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalLinkRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/withdrawals/available":{"get":{"tags":["Billing"],"summary":"Withdrawals Available","description":"Whether the withdrawal function is offered (the checkout's footer link\nand /withdraw ask this): true while paid plans are on sale and forever\nonce a consumer subscription was sold.","operationId":"withdrawals_available_api_withdrawals_available_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/fx/eur-ron":{"get":{"tags":["Billing"],"summary":"Fx Eur Ron","description":"The euro in lei at the BNR reference rate and its date, for showing RON\nnext to EUR prices (F100); the charge is always in EUR. `rate` and `date`\nare null when no rate is known yet: show EUR only.","operationId":"fx_eur_ron_api_fx_eur_ron_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/withdrawals/link":{"get":{"tags":["Billing"],"summary":"Withdrawals Link","description":"What the signed link of a contract confirmation names, to pre-fill\n/withdraw: plan, key prefix, the subscription's address, the order\nreference and the end of the window. 400 link_invalid once it expired.\n``withdrawn``: the withdrawal already recorded for this contract (its\nreference and sent time, Romanian time in ``lang``), so the page says so\ninstead of showing the form again; null while there is none.","operationId":"withdrawals_link_api_withdrawals_link_get","parameters":[{"name":"w","in":"query","required":true,"schema":{"type":"string","maxLength":2048,"title":"W"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string","maxLength":5,"default":"ro","title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/withdrawals":{"post":{"tags":["Billing"],"summary":"Withdrawal Statement","description":"A statement of withdrawal from the contract (the checkout's /withdraw,\n\"Confirmați retragerea\"). Recorded first; the answer is the receipt (the\nstatement as sent and its date and time, Bucharest and UTC), the same\nwhatever it matched. The acknowledgement email, the cancellation and the\npro-rata refund follow (withdrawals.process). No auth; limited per IP.\nA repeat on a contract already withdrawn, named by the link, the key or\nthe order reference, also carries ``already`` (the first statement's\nreference and time) and sends no second email.","operationId":"withdrawal_statement_api_withdrawals_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawalRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Lookups"],"summary":"Health","description":"Liveness, plus which ONRC snapshot is being served and how old it is.\n\nThe `data` block is what a staleness monitor reads: the weekly refresh job\nreports \"nothing to do\" while upstream publishes nothing, which is silence,\nnot freshness. `age_days` is days since the snapshot's publish date.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/lookup_business":{"get":{"tags":["Lookups"],"summary":"Lookup Business","description":"Company search by name or CUI.\n\nA name returns ranked candidates, each with `score` (0-1) and `match` (`exact`, `phrase`,\n`words`, `prefix`): whole-name and whole-word matches before prefix ones, live firms\nbefore struck-off or insolvent ones, firms in `county` lifted, then size. A CUI matches\nexactly; a wrong control digit is 400 `invalid_cui`, an unknown CUI `found: false`.\n\n`returned` is the number of rows in `results` (every list answer has it, with this one\nmeaning); `total` here is the same number, not how many firms match.","operationId":"lookup_business_lookup_business_get","parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"Company name or CUI (`RO`, spaces, hyphens and leading zeros are accepted)","title":"Query"},"description":"Company name or CUI (`RO`, spaces, hyphens and leading zeros are accepted)"},{"name":"max_results","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Max Results"}},{"name":"county","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"County hint (diacritic-insensitive): companies registered there rank higher. Not a filter","title":"County"},"description":"County hint (diacritic-insensitive): companies registered there rank higher. Not a filter"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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.","title":"Fields"},"description":"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."},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","description":"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).","default":false,"title":"Compact"},"description":"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)."},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lookup_director":{"get":{"tags":["Lookups"],"summary":"Lookup Director","description":"Companies by the name of a director or legal representative.\n\nWhole names by default: every word must be a whole word of the person's name, in any\norder ('pop maria' finds POP MARIA and POP ANA MARIA, not POPA MARIANA), exact names\nfirst, live firms before closed ones. `prefix=true` matches word prefixes. `returned` is\nthe number of rows in `results` (as on every list answer); here `total` counts every\nmatching firm, not just the rows sent, `byCounty` groups them, and\n`homonyms: true` (with `distinctCounties` and a `note`) warns that the same exact name\nis on firms in several counties: the registry has no personal identifier.","operationId":"lookup_director_lookup_director_get","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string","description":"Director / legal representative name","title":"Name"},"description":"Director / legal representative name"},{"name":"max_results","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Max Results"}},{"name":"prefix","in":"query","required":false,"schema":{"type":"boolean","description":"Match each word as a prefix ('pop' also finds POPA, POPESCU). Off: whole words only","default":false,"title":"Prefix"},"description":"Match each word as a prefix ('pop' also finds POPA, POPESCU). Off: whole words only"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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.","title":"Fields"},"description":"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."},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","description":"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).","default":false,"title":"Compact"},"description":"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)."},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lookup_by_category":{"get":{"tags":["Lookups"],"summary":"Lookup By Category","description":"Lead list by curated topic or by raw CAEN activity code.\n\n`category` takes a topic (`artificial intelligence`, `cybersecurity`, `software`, …)\nor a CAEN code / comma-separated code list (`4321`, `4321,4322`); `county` narrows to\none county. Results are the newest registrations first over the whole match set\n(ties by registration time, then code), each with the registry snapshot in `asOf`; the\nqueried code(s) are listed\nfirst in each firm's `caenActivities` — ONRC data carries no main/secondary CAEN flag,\nso a firm matches by any authorized activity.\n\n`legal_form` keeps one form or a comma-separated list (`SRL` is 92% of a typical CAEN\ncode, while the newest-first page is mostly freshly-registered PFAs; `SRL,SA` keeps\ncompanies only, the lead-list app's default). Without it every form is kept. `active_only` (default true) drops firms that\ncannot be clients: radiată, dizolvare, lichidare, faliment, insolvență, under Law\n85/2014, or activity suspended — 2.18M of the 4.21M registered firms are radiată — and\nfirms ANAF declares fiscally inactive (one meaning of \"active\", the app's too).\n`has_website` keeps contactable firms; the registry carries no email (each result carries\nthe phone declared to ANAF, when there is one; `enrich_company` over MCP crawls the site).\n\n`returned` is the number of rows in `results` (every list answer has it, with this one\nmeaning); `total` here is the same number. How many firms the whole list holds is\n`matchTotal` (with `active_only`).\n\nExample: `/lookup_by_category?category=4321&county=Hunedoara&legal_form=SRL&max_results=2`\n(4321 = Lucrări de instalații electrice).\n\n`registered_since` / `registered_until` (ISO `YYYY-MM-DD`) keep only firms registered\nin that window, inclusive of both ends, on the registry date. The ONRC dump carries each\nfirm's current status code but no status-change timestamp, so a `status_changed_since`\ncannot be offered.","operationId":"lookup_by_category_lookup_by_category_get","parameters":[{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Topic / business category (e.g. 'artificial intelligence') or a raw CAEN code / comma-separated code list (e.g. '6201')","title":"Category"},"description":"Topic / business category (e.g. 'artificial intelligence') or a raw CAEN code / comma-separated code list (e.g. '6201')"},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Alias of `category` (the MCP tool calls it `topic`)","title":"Topic"},"description":"Alias of `category` (the MCP tool calls it `topic`)"},{"name":"county","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"County to narrow to (diacritic-insensitive)","title":"County"},"description":"County to narrow to (diacritic-insensitive)"},{"name":"max_results","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"Rows to return; capped at 100 (and by the caller's plan when plans are enforced). A clamp is said: a note in `warnings` (the `X-Leadgen-Warnings` header on a CSV) and `truncated: true`","default":10,"title":"Max Results"},"description":"Rows to return; capped at 100 (and by the caller's plan when plans are enforced). A clamp is said: a note in `warnings` (the `X-Leadgen-Warnings` header on a CSV) and `truncated: true`"},{"name":"legal_form","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Keep one legal form ('SRL', 'SA', 'PFA', 'II', …) or several comma-separated ('SRL,SA' = companies, no sole traders); case-insensitive. Default: any form","title":"Legal Form"},"description":"Keep one legal form ('SRL', 'SA', 'PFA', 'II', …) or several comma-separated ('SRL,SA' = companies, no sole traders); case-insensitive. Default: any form"},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","description":"Exclude firms that cannot be a lead: a registry status of radiată, dizolvare, lichidare, faliment, insolvență, under Law 85/2014 or activity suspended, or declared fiscally inactive by ANAF (the same rule as `risk.isLead`). `inactiveFilteredOut` says how many it removed when that count is cheap. Pass false for the raw registry.","default":true,"title":"Active Only"},"description":"Exclude firms that cannot be a lead: a registry status of radiată, dizolvare, lichidare, faliment, insolvență, under Law 85/2014 or activity suspended, or declared fiscally inactive by ANAF (the same rule as `risk.isLead`). `inactiveFilteredOut` says how many it removed when that count is cheap. Pass false for the raw registry."},{"name":"has_website","in":"query","required":false,"schema":{"type":"boolean","description":"Keep only companies with a website on file — the only contact field the registry carries","default":false,"title":"Has Website"},"description":"Keep only companies with a website on file — the only contact field the registry carries"},{"name":"min_revenue","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Net turnover at least this many RON on the latest filing (FY2025, else FY2024)","title":"Min Revenue"},"description":"Net turnover at least this many RON on the latest filing (FY2025, else FY2024)"},{"name":"max_revenue","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Net turnover at most this many RON on the latest filing","title":"Max Revenue"},"description":"Net turnover at most this many RON on the latest filing"},{"name":"min_employees","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Average headcount at least this, latest filing","title":"Min Employees"},"description":"Average headcount at least this, latest filing"},{"name":"max_employees","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Average headcount at most this, latest filing","title":"Max Employees"},"description":"Average headcount at most this, latest filing"},{"name":"vat_payer","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"true: VAT-registered only; false: non-VAT payers only (ANAF)","title":"Vat Payer"},"description":"true: VAT-registered only; false: non-VAT payers only (ANAF)"},{"name":"main_activity_only","in":"query","required":false,"schema":{"type":"boolean","description":"Default false: a company matches when the code is any of its authorised activities. true keeps only companies whose DECLARED main activity is one of the codes (ANAF main CAEN, else the CAEN on the latest filing): fewer, more relevant companies. The Leadgen app's lists use true by default.","default":false,"title":"Main Activity Only"},"description":"Default false: a company matches when the code is any of its authorised activities. true keeps only companies whose DECLARED main activity is one of the codes (ANAF main CAEN, else the CAEN on the latest filing): fewer, more relevant companies. The Leadgen app's lists use true by default."},{"name":"exclude_anaf_inactive","in":"query","required":false,"schema":{"type":"boolean","description":"Drop companies ANAF currently declares fiscally inactive (invoices from them carry no VAT deduction). `active_only` (default) already does; this older switch matters only with `active_only=false`","default":false,"title":"Exclude Anaf Inactive"},"description":"Drop companies ANAF currently declares fiscally inactive (invoices from them carry no VAT deduction). `active_only` (default) already does; this older switch matters only with `active_only=false`"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(newest|revenue|employees)$","description":"Order of the results: `newest` registrations first (default), `revenue` (the latest filing's turnover, biggest first) or `employees` (headcount, biggest first); companies without a filing come last","default":"newest","title":"Sort"},"description":"Order of the results: `newest` registrations first (default), `revenue` (the latest filing's turnover, biggest first) or `employees` (headcount, biggest first); companies without a filing come last"},{"name":"registered_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},{"type":"null"}],"description":"Keep only companies registered on or after this ISO date (`YYYY-MM-DD`), inclusive, on the registry date","title":"Registered Since"},"description":"Keep only companies registered on or after this ISO date (`YYYY-MM-DD`), inclusive, on the registry date"},{"name":"registered_until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},{"type":"null"}],"description":"Keep only companies registered on or before this ISO date (`YYYY-MM-DD`), inclusive; with `registered_since` a window","title":"Registered Until"},"description":"Keep only companies registered on or before this ISO date (`YYYY-MM-DD`), inclusive; with `registered_since` a window"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","description":"`csv` returns the list as a CSV: machine-friendly (`,`, camelCase headers, True/False) unless `lang` is given","default":"json","title":"Format"},"description":"`csv` returns the list as a CSV: machine-friendly (`,`, camelCase headers, True/False) unless `lang` is given"},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(ro|en)$"},{"type":"null"}],"description":"With `format=csv`: a spreadsheet file in that language, like the app's. `ro` opens right in a Romanian Excel (`;` delimiter, Romanian headers, da/nu, phones kept as text, CRLF, UTF-8 BOM); `en` is the same with `,` and English headers","title":"Lang"},"description":"With `format=csv`: a spreadsheet file in that language, like the app's. `ro` opens right in a Romanian Excel (`;` delimiter, Romanian headers, da/nu, phones kept as text, CRLF, UTF-8 BOM); `en` is the same with `,` and English headers"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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. JSON only: a CSV keeps its columns.","title":"Fields"},"description":"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. JSON only: a CSV keeps its columns."},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","description":"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). JSON only.","default":false,"title":"Compact"},"description":"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). JSON only."},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lookup_companies":{"post":{"tags":["Lookups"],"summary":"Lookup Companies Post","description":"Many CUIs in one call: up to 100, one result per input in input order.\n\nBody `{\"cuis\": [\"2816464\", \"RO14399840\", …], \"fields\": \"companyName,cui,risk\", \"compact\": false}`.\nEach row is `{input, cui, found: true, company}`, `{input, cui, found: false, reason: \"not_found\"}`\nor `{input, found: false, error: \"invalid_cui\" | \"empty_row\", message}`. **Metered per row**: the\nbatch counts one lookup per row before it runs and input-error rows are handed back\n(`metering: {rows, counted, notCounted}`; the `RateLimit-*` headers say what is left). A batch\nlarger than what is left today answers the rows that fit: the rest come back\n`{input, found: false, status: \"not_processed\", reason: \"daily_limit_reached\"}`, not counted,\nwith `partial: true`, `processed`, `remaining` (rows to resend after the reset) and `dailyLimit`\n(the 429 body's fields). With nothing left: 429 with `requested` and `remaining`.\nMore than 100 rows: 400 `too_many_rows`, not counted.","operationId":"lookup_companies_post_lookup_companies_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookupCompaniesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Lookups"],"summary":"Lookup Companies Get","description":"Many CUIs in one call, as a query string: the same answer and metering as `POST /lookup_companies`.","operationId":"lookup_companies_get_lookup_companies_get","parameters":[{"name":"cuis","in":"query","required":true,"schema":{"type":"string","description":"Up to 100 CUIs, comma-separated (`2816464,RO14399840`)","title":"Cuis"},"description":"Up to 100 CUIs, comma-separated (`2816464,RO14399840`)"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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.","title":"Fields"},"description":"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."},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","description":"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).","default":false,"title":"Compact"},"description":"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)."},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/match_companies":{"post":{"tags":["Lookups"],"summary":"Match Companies","description":"Match up to 500 records to firms: one answer per row, in input order.\n\nBody `{\"rows\": [{\"name\": \"Dedeman\", \"county\": \"Bacau\"}, {\"cui\": \"RO14399840\"},\n{\"domain\": \"emag.ro\", \"ref\": \"crm-42\"}, \"Kaufland Romania\"], \"compact\": true}`. Each row:\n`status: \"matched\"` with `match: {cui, companyName, confidence, matchedOn}` and `company`\n(the full record, or the `fields` asked), or `status: \"no_match\"` with `reason` and up to 3\n`candidates`, or `status: \"error\"` (an empty row, an invalid CUI with nothing else).\nA valid CUI wins with confidence 1.0; then the registry website of `domain`; then the name\n(legal-form noise and diacritics dropped, LM-3's ranking, `county` lifts). A name matches\nat confidence 0.6 or more (`threshold`); `ambiguous: true` flags a runner-up just as good.\n**Metered per row**, as `POST /lookup_companies`: error rows are handed back (`metering`), and\na batch larger than what is left today answers the rows that fit (`partial: true`; the rest are\n`status: \"not_processed\"`, not counted).","operationId":"match_companies_match_companies_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchCompaniesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/find_company_by_domain":{"get":{"tags":["Lookups"],"summary":"Find Company By Domain","description":"The firm behind a website domain. One lookup.\n\nThe registry's website field first (`matchedOn: \"registry_website\"`); else the site's home\npage and up to three contact/legal pages are read for the CUI or registration number they\nshow (`\"site_cui\"`, `\"site_registration_code\"`). Without one the answer is `found: false`,\n`reason: \"no_cui_on_site\"` (or `\"site_unreachable\"`) with up to 3 name `candidates` from the\npage title. A value that is not a public domain is 400 `invalid_domain`, not counted.","operationId":"find_company_by_domain_find_company_by_domain_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"A website domain or URL (`dedeman.ro`, `https://www.emag.ro/`)","title":"Domain"},"description":"A website domain or URL (`dedeman.ro`, `https://www.emag.ro/`)"},{"name":"fields","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"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.","title":"Fields"},"description":"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."},{"name":"compact","in":"query","required":false,"schema":{"type":"boolean","description":"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).","default":false,"title":"Compact"},"description":"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)."},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extract_contacts":{"get":{"tags":["Lookups"],"summary":"Extract Contacts","description":"Emails, phone numbers and social profiles found on a website. One lookup.\n\nA breadth-first read of same-site links from `website`, at most `max_pages` pages, through\nthe SSRF guard: only public addresses on ports 80 and 443, every redirect checked. Answer:\n`{url, domain, pagesCrawled, emails, otherEmails, phones, facebook, twitter, instagram,\nlinkedin, youtube, github, socialLinks, error}`; emails on the site's own domain go in\n`emails`, empty lists are `null`. A site that cannot be read (unreachable, a bot wall, or\nnot a public address such as `localhost` or a private IP) is 400 with the reason in\n`error`, not counted. MCP: `extract_contacts`.","operationId":"extract_contacts_extract_contacts_get","parameters":[{"name":"website","in":"query","required":true,"schema":{"type":"string","description":"The site to read: a domain or a URL (`dedeman.ro`, `https://www.emag.ro/contact`); `https://` is added when missing","title":"Website"},"description":"The site to read: a domain or a URL (`dedeman.ro`, `https://www.emag.ro/contact`); `https://` is added when missing"},{"name":"max_pages","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Pages to read, 1-20: the first page, then links on the same site","default":5,"title":"Max Pages"},"description":"Pages to read, 1-20: the first page, then links on the same site"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/enrich_company":{"get":{"tags":["Lookups"],"summary":"Enrich Company","description":"A whole-firm profile: the registry record plus the contacts found on its website. One lookup.\n\nAnswer: `{cui, company: {companyName, cui, registrationCode, county, city, address, website,\ncaenActivities, status, risk, asOf}, website, websiteSource, contacts: [{type, value,\nconfidence, source}], pagesCrawled, crawlError, cacheHit, crawled, asOf}`. The site is the\nregistered one unless `website` names another; it is read through the same SSRF guard as\n`/extract_contacts`. A firm without a website, or a site that cannot be read, still answers\n200 with the registry brief and `crawlError`, and counts. An invalid or unknown CUI is 400,\nnot counted. MCP: `enrich_company`.","operationId":"enrich_company_enrich_company_get","parameters":[{"name":"cui","in":"query","required":true,"schema":{"type":"string","description":"Tax code (CUI), with or without the RO prefix","title":"Cui"},"description":"Tax code (CUI), with or without the RO prefix"},{"name":"website","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A site to read instead of the one in the registry (a domain or a URL)","title":"Website"},"description":"A site to read instead of the one in the registry (a domain or a URL)"},{"name":"max_pages","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"Pages to read, 1-20: the first page, then links on the same site","default":5,"title":"Max Pages"},"description":"Pages to read, 1-20: the first page, then links on the same site"},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Read the site now instead of answering from the cache (30 days; 1 day for a read that found nothing)","default":false,"title":"Refresh"},"description":"Read the site now instead of answering from the cache (30 days; 1 day for a read that found nothing)"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/lookup_domain":{"get":{"tags":["Lookups"],"summary":"Lookup Domain","description":"WHOIS, DNS records and an SPF/DMARC email-security audit for a domain. One lookup.\n\nAnswer: `{domain, whois: {registrar, creationDate, expirationDate, updatedDate, nameServers,\nregistrantOrg, registrantCountry}, dns: {A, MX, NS, TXT, …}, security: {hasSPF, spf,\nhasDMARC, dmarc}, resolvedIP}`; an address in a private network is never reported. A name\nthat is not a public domain (`localhost`, an internal suffix such as `.lan`, a private IP)\nis 400, not counted. MCP: `lookup_domain`.","operationId":"lookup_domain_lookup_domain_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"A domain or a URL (`dedeman.ro`; scheme, port and path are dropped)","title":"Domain"},"description":"A domain or a URL (`dedeman.ro`; scheme, port and path are dropped)"},{"name":"include_dns","in":"query","required":false,"schema":{"type":"boolean","description":"Add the DNS records: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA","default":true,"title":"Include Dns"},"description":"Add the DNS records: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA"},{"name":"include_security","in":"query","required":false,"schema":{"type":"boolean","description":"Add the email-security audit: the SPF and DMARC records","default":true,"title":"Include Security"},"description":"Add the email-security audit: the SPF and DMARC records"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/financials/{cui}":{"get":{"tags":["Lookups"],"summary":"Financials","description":"Every annual financial statement on record for one firm (FY2008 onwards).\n\nMinistry of Finance filings, newest year first: revenue, profit or loss,\naverage headcount and the balance-sheet lines, in RON, plus a multi-year\n`summary` (first/latest year, YoY and 3/5/10-year revenue CAGR, loss years,\nhealth score and red flags). Same payload as the MCP `lookup_financials`.\nA CUI the registry does not carry is 404 `unknown_cui`; a firm with no\nstatement on record answers 200 with `found: false` and costs nothing.\n\nExample: `/financials/2816464` (Dedeman).","operationId":"financials_financials__cui__get","parameters":[{"name":"cui","in":"path","required":true,"schema":{"type":"string","description":"Tax code (CUI), with or without the RO prefix","title":"Cui"},"description":"Tax code (CUI), with or without the RO prefix"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/financials/{cui}/ratios":{"get":{"tags":["Lookups"],"summary":"Financial Ratios","description":"Financial ratios, a health score and peer percentiles for one firm.\n\nMulti-year revenue trend, margins, solvency and liquidity ratios, a 0-100\nhealth score with its rule-by-rule breakdown, red flags, and the firm's\npercentile among peers with the same CAEN activity, nationally and in its\ncounty. Same payload as the MCP `lookup_financial_ratios`.\nA CUI the registry does not carry is 404 `unknown_cui`; a firm with no\nstatement on record answers 200 with `found: false` and costs nothing.","operationId":"financial_ratios_financials__cui__ratios_get","parameters":[{"name":"cui","in":"path","required":true,"schema":{"type":"string","description":"Tax code (CUI), with or without the RO prefix","title":"Cui"},"description":"Tax code (CUI), with or without the RO prefix"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/topics":{"get":{"tags":["Lookups"],"summary":"Topics List","description":"The curated topics and the CAEN code sets behind them. Not counted (F175, the founder):\nthe catalogue is the same for everyone, not a lookup; the per-IP request rate still applies.","operationId":"topics_list_topics_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage":{"get":{"tags":["Account"],"summary":"Usage","description":"Your own allowance: plan, daily limit, lookups used today, remaining,\nwhen it resets (next 00:00 UTC) and your credit balance (null when the key\nhas never held credits). With `X-API-Key` it describes that key (shown as\nan 11-character prefix); without one, your IP's anonymous allowance (an\nIPv6 caller is counted per /64). **Not a lookup**: it never counts against\nthe allowance. The response carries the same `RateLimit-*` headers as a lookup.","operationId":"usage_usage_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/register":{"post":{"tags":["Free key"],"summary":"Register","description":"Issue a free API key for an email address. Idempotent per address.","operationId":"register_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/alerts/email":{"post":{"tags":["Alerts"],"summary":"Alerts Email","description":"Turn on email digests for the watches of this key (double opt-in).\n\nBody: ``{\"email\": \"...\", \"lang\": \"en\"|\"ro\"}``; ``email`` defaults to the\naddress the key was issued to. We send a confirmation link; once it is\nclicked, a daily digest goes out whenever a watched company changes or new\nfirms register under a watched CAEN code / county (the same changes\npoll_watchlist returns, tracked separately so neither drains the other).","operationId":"alerts_email_alerts_email_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Alerts"],"summary":"Alerts Email Status","description":"Where this key's watchlist alerts go, and whether they are confirmed.","operationId":"alerts_email_status_alerts_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"tags":["Alerts"],"summary":"Alerts Email Off","description":"Turn this key's email alerts off, or cancel a request still waiting for its confirmation\n(`status: cancelled`, the mailed link stops working; F35). Only this key's own\nsubscription is touched. The watches themselves stay.","operationId":"alerts_email_off_alerts_email_delete","parameters":[{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watches":{"get":{"tags":["Watchlist"],"summary":"Watches List","description":"Your key's watches, each with what changed since the last poll, most\nsevere first (a firm that stopped being a lead or left the registry, then a\nrisk, status or ANAF change, then the rest). A peek: nothing is consumed;\n`POST /watches/seen` (or MCP `poll_watchlist`) marks the changes as seen.\nNot counted (F175): reading back what you watch spends no lookup.","operationId":"watches_list_watches_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Watchlist"],"summary":"Watches Add","description":"Watch firms and/or CAEN codes in one call.\n\nBody: `{\"companies\": [\"14399840\", \"RO2816464\", …], \"caen\": [{\"code\": \"4321\",\n\"county\": \"Cluj\"}]}`. A `caen` code may be a code list or a curated topic\n(`software`): one watch per CAEN code, in that county or nationwide. Up to\n1,000 items a call; past the plan's watchlist size (when plans are enforced)\nthe rest are refused with the plan's upgrade note. Each item comes back with\na `status`: added, already (held before), not_found, invalid or cap. Counts\nas one lookup; 402 when nothing could be added because of the cap.","operationId":"watches_add_watches_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchAddRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Watchlist"],"summary":"Watches Remove","description":"Stop watching one firm (`kind=company&target=<CUI>`) or one CAEN code\n(`kind=caen&target=4321[&county=Cluj]`). 404 when the key does not hold it.\nNot counted (F175, the founder): stopping a watch spends no lookup.","operationId":"watches_remove_watches_delete","parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","pattern":"^(company|caen)$","title":"Kind"}},{"name":"target","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":40,"title":"Target"}},{"name":"county","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"County"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/watches/seen":{"post":{"tags":["Watchlist"],"summary":"Watches Seen","description":"Mark every change as seen: the same drain as MCP `poll_watchlist` (company\nfingerprints and CAEN cursors slide; the email digest keeps its own).\nReturns the drained changes (the MCP poll_watchlist answer) plus `cleared`,\nhow many watches had changes. Counts as one lookup.","operationId":"watches_seen_watches_seen_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/record/{cui}":{"get":{"tags":["Lookups"],"summary":"Company Record","description":"A dated, sourced company record for the file: registry record, latest filing, risk reasons,\nsources with dates and licences, the ONRC snapshot, what is not checked, a stable URL and the\nrecord's SHA-256 (`integrity.hash`, over the JSON without `integrity` and `generatedAt`).\n\n`format=html` (default) is a one-page printable sheet: \"Print / save as PDF\" in the browser.\n`format=json` is the record. One lookup; an unknown CUI is 404, an invalid one 400 (not counted).","operationId":"company_record_record__cui__get","parameters":[{"name":"cui","in":"path","required":true,"schema":{"type":"string","description":"Tax code (CUI), with or without the RO prefix","title":"Cui"},"description":"Tax code (CUI), with or without the RO prefix"},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(html|json)$","description":"`html`: the printable page (Romanian; English at `/en/record/{cui}`). `json`: the record","default":"html","title":"Format"},"description":"`html`: the printable page (Romanian; English at `/en/record/{cui}`). `json`: the record"},{"name":"snapshot","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The snapshot the stable URL names; the record is always read from the snapshot served now, said in `asOf`","title":"Snapshot"},"description":"The snapshot the stable URL names; the record is always read from the snapshot served now, said in `asOf`"},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/feedback":{"post":{"tags":["Feedback"],"summary":"Feedback","description":"Report what is missing or wrong: `{message, kind, cui?, email?, page?, lang?}`.\n\n`kind` is `gap` (default), `wrong_record` (pass the firm's `cui`), `bug`, `idea` or `other`.\nNot a lookup: never counted against the daily allowance; 10 messages an hour per IP. `email`\nis optional and only used for a reply (within 2 working days); nothing is sent to it\nautomatically. A `wrong_record` answer carries a `note`: registry data is corrected at the\nsource (ONRC) and arrives with the next snapshot.","operationId":"feedback_feedback_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AlertEmailRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},"type":"object","title":"AlertEmailRequest"},"FeedbackRequest":{"properties":{"message":{"type":"string","title":"Message"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind","default":"gap"},"cui":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cui"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"}},"type":"object","required":["message"],"title":"FeedbackRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LookupCompaniesRequest":{"properties":{"cuis":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"}],"title":"Cuis"},"fields":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fields"},"compact":{"type":"boolean","title":"Compact","default":false}},"type":"object","required":["cuis"],"title":"LookupCompaniesRequest"},"MatchCompaniesRequest":{"properties":{"rows":{"items":{"anyOf":[{"$ref":"#/components/schemas/MatchRow"},{"type":"string"}]},"type":"array","title":"Rows"},"fields":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fields"},"compact":{"type":"boolean","title":"Compact","default":false}},"type":"object","required":["rows"],"title":"MatchCompaniesRequest"},"MatchRow":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Company name (diacritic-insensitive; legal-form words ignored)."},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County","description":"Optional county hint (diacritic-insensitive): companies there rank higher."},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain","description":"Optional website domain ('dedeman.ro'), matched to the registry's website field."},"cui":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cui","description":"Optional CUI (tax code); a valid one wins (confidence 1.0)."},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref","description":"Your own id for the row, echoed back unchanged."}},"type":"object","title":"MatchRow","description":"One record to match: any of name, county, domain, cui; ref (your own id) is echoed back."},"PortalLinkRequest":{"properties":{"email":{"type":"string","title":"Email"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},"type":"object","required":["email"],"title":"PortalLinkRequest"},"PortalRequest":{"properties":{"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"}},"type":"object","title":"PortalRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","title":"Email"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ref"},"marketing_optin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Marketing Optin"},"terms_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Terms Version"}},"type":"object","required":["email"],"title":"RegisterRequest"},"SubscribeRequest":{"properties":{"plan":{"type":"string","title":"Plan"},"interval":{"type":"string","title":"Interval","default":"month"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"upgrade_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Token"},"buyer_type":{"type":"string","title":"Buyer Type","default":"person"},"cui":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cui"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"consent":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Consent"},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"via":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Via"},"return_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Path"}},"type":"object","required":["plan"],"title":"SubscribeRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WatchAddRequest":{"properties":{"companies":{"items":{"type":"string"},"type":"array","title":"Companies","default":[]},"caen":{"items":{"$ref":"#/components/schemas/WatchCaenItem"},"type":"array","title":"Caen","default":[]}},"type":"object","title":"WatchAddRequest"},"WatchCaenItem":{"properties":{"code":{"type":"string","title":"Code"},"county":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"County"}},"type":"object","required":["code"],"title":"WatchCaenItem"},"WithdrawalRequest":{"properties":{"name":{"type":"string","title":"Name","default":""},"contract":{"type":"string","title":"Contract","default":""},"value":{"type":"string","title":"Value","default":""},"email":{"type":"string","title":"Email","default":""},"lang":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lang"},"nonce":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nonce"}},"type":"object","title":"WithdrawalRequest"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Optional. A free key from /start raises the daily lookup limit; anonymous calls still work at a lower limit."}}},"tags":[{"name":"Lookups","description":"The registry. Free with the daily wall; a key lifts the allowance."},{"name":"Free key","description":"The self-serve door: an email address, no payment."},{"name":"Account","description":"Your own allowance and balance. Not a lookup: never counted against the daily allowance."},{"name":"Alerts","description":"Email digests of your watchlist changes (double opt-in, one-click unsubscribe)."},{"name":"Watchlist","description":"Your key's watches (companies by CUI, CAEN codes by county): list with changes, add in bulk, remove. The MCP watch tools' REST twin; needs a key."},{"name":"Feedback","description":"Report what is missing or wrong. Not a lookup: never counted."},{"name":"Billing","description":"Paid plans (Pro, Business) on Stripe subscriptions: start a checkout, open the subscription portal. While paid sales are closed, starting a checkout answers 403 checkout_closed; the portal (by key or emailed link) stays open for subscribers. Not lookups: never counted."}],"security":[{"ApiKeyAuth":[]},{}]}