{"openapi":"3.0.3","info":{"title":"API","version":"1.0.0","description":"**Try it out** sends real API calls. Provide a valid `user_id` + `api_key`; the caller IP must be allowlisted and the account must have the operation enabled."},"servers":[{"url":"https://api.inscape.ro","description":"API base URL"}],"tags":[{"name":"DRPCIV — Motor","description":"Vehicle data by VIN or registration plate (Romania)."},{"name":"PAD","description":"Household PAD identification. București: `judet=S1`…`S6`, `localitate=Bucuresti`."},{"name":"Company","description":"Company lookup, ANAF registry and bilanț, court cases, name search, UBO, ARR transport licence."},{"name":"CNP","description":"CNP validation"},{"name":"Sanctions","description":"Sanctions lists"},{"name":"Address","description":"Address / postal code (Romania)"},{"name":"Messaging","description":"SMS / email"},{"name":"AI","description":"Offer comparison, policy extraction, training agents, and generic insurance plan generation (EUR)."},{"name":"Building","description":"Building lookup — two-step flow: `POST /parseAddress` then `POST /getBuildingByAddress`. Optional enrichment: `POST /getSeismicEvents`, `POST /getRiskDataHubLosses`."},{"name":"Seismic","description":"Earthquake catalogue"},{"name":"Risk Data Hub","description":"JRC Risk Data Hub loss"},{"name":"Cyber","description":"External cyber posture pre-audit (passive modules on a target domain)."},{"name":"EIOPA","description":"EIOPA register of insurance undertakings"},{"name":"TED","description":"EU public procurement — insurance tenders (TED eForms, broker CPV 6651*)"}],"x-tagGroups":[{"name":"DRPCIV","tags":["DRPCIV — Motor","PAD"]}],"paths":{"/getInfoByVin_ro":{"post":{"tags":["DRPCIV — Motor"],"operationId":"getInfoByVin_ro","summary":"Motor — vehicle data by VIN (DRPCIV)","description":"Vehicle data by VIN. Requires API key, allowed client IP, and VIN lookup enabled on the account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInfoByVin_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","vin":"WVWZZZ1JZ3W386752"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getInfoByPlate_ro":{"post":{"tags":["DRPCIV — Motor"],"operationId":"getInfoByPlate_ro","summary":"Motor — vehicle data by registration plate (DRPCIV)","description":"Vehicle data by plate, with RAR/roviniete enrichment when available. Requires API key, allowed client IP, and plate lookup enabled on the account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInfoByPlate_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","plate":"B123ABC"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/identificarePad_ro":{"post":{"tags":["PAD"],"operationId":"identificarePad_ro","summary":"POST /identificarePad_ro — household PAD identification (identificarePAD)","description":"Identify household PAD policies by insured CNP/CUI and address.\n\n**Input:** `cnpCuiAsigurat` + address (`judet`, `localitate`). Optional: `seriePaid`, `nrPaid`, `dataRef`, `emailEmitent`.\n\n**București:** send `judet=S1`…`S6` and `localitate=Bucuresti`, or `judet=Bucuresti` + `localitate=Sector-4` / `Sector 4` (normalized automatically). Other counties: names as on the policy (e.g. `judet=Ilfov`, `localitate=Peris`).\n\n**Note:** response `judet` may use `B*` sector codes while requests use `S*`.\n\nRequires API key, allowed client IP, and company lookup enabled on the account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentificarePad_roRequest"},"examples":{"bucurestiSectorCode":{"summary":"București — sector code (recommended)","value":{"user_id":"1","api_key":"YOUR_API_KEY","cnpCuiAsigurat":"","judet":"S4","localitate":"Bucuresti"}},"bucurestiNormalized":{"summary":"București — county + Sector-N (auto-normalized to S4 + Bucuresti)","value":{"user_id":"1","api_key":"YOUR_API_KEY","cnpCuiAsigurat":"","judet":"Bucuresti","localitate":"Sector-4"}},"ilfovLocality":{"summary":"Ilfov — county name + locality","value":{"user_id":"1","api_key":"YOUR_API_KEY","cnpCuiAsigurat":"","judet":"Ilfov","localitate":"Peris"}}}}}},"responses":{"200":{"description":"Success (`error: 0` in body). Exact shape depends on operation (`found`, nested `debts`, etc.).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentificarePad_roResponse"},"examples":{"foundBucuresti":{"summary":"PAD policy found (București sector 4)","value":{"error":0,"info":null,"found":1,"count":1,"policies":[{"idTichet":"86153115-bdf2-469c-8fad-bcfa3ca4dc34","numarPolita":"00242946181","seriePolita":"RA-065","dataStartValabilitatePolita":"2025-09-14T00:00:00","dataStopValabilitatePolita":"2026-09-13T00:00:00","dataPolita":"2025-09-10T00:00:00","tipCladire":"A","judet":"B4","localitate":"Bucuresti","codPostal":"041511","strada":"Secuilor","tipStrada":"Strada","numar":"1A","bloc":"2","scara":"2","apartament":"29","dataStopAcoperirePolita":"2026-09-13T00:00:00","politaProprie":true}]}},"foundIlfov":{"summary":"PAD policy found (Ilfov / Periș)","value":{"error":0,"info":null,"found":1,"count":1,"policies":[{"numarPolita":"00242948178","seriePolita":"RA-065","tipCladire":"A","judet":"IF","localitate":"Peris","codPostal":"077150","strada":"STANJENEILOR","tipStrada":"Strada","numar":"21","politaProprie":true}]}},"notFound":{"summary":"No PAD policy for criteria","value":{"error":0,"info":"Nu s-a găsit poliță PAD pentru criteriile furnizate","found":0,"count":0,"policies":[]}}}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Missing cnpCuiAsigurat / judet / localitate; or București without sector"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}},"502":{"description":"External registry temporarily unavailable. Body may still include partial data (e.g. `debts`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentificarePad_roResponseUpstreamError"},"example":{"error":1,"info":"Eroare la conexiunea cu serviciul PAD","found":0,"count":0,"policies":[]}}}}}}},"/getCompanyInfo_ro":{"post":{"tags":["Company"],"operationId":"getCompanyInfo_ro","summary":"Company data by tax ID (ONRC, Romania)","description":"Company data by tax ID (CUI). Set `show*` / `show_*` flags to 1 to include extra sections. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCompanyInfo_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","cui":"12345678","showFinancial":1,"showPhones":1,"showEmails":1,"showAdmins":1,"showWebsites":1,"showCourtCases":1}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getAnafCompanyInfo_ro":{"post":{"tags":["Company"],"operationId":"getAnafCompanyInfo_ro","summary":"ANAF company registry + public debts snapshot by CUI","description":"ANAF company registry (Platitor TVA) plus public debts snapshot for a CUI.\n\nReturns name, address, VAT status, inactivity, Split TVA, RO e-Factura, registered office, and nested `debts` (published public restanțe totals when the CUI appears on the list).\n\nOptional `data` / `query_date` (YYYY-MM-DD); default today (Europe/Bucharest).\n\nFor annual bilanț indicators (I1–I20) use `/getAnafCompanyFinance_ro`.\n\nRequires API key, allowed client IP, and company lookup enabled on the account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAnafCompanyInfo_roRequest"},"example":{"user_id":"1","api_key":"YOUR_API_KEY","cui":"13081201","data":"2026-06-03"}}}},"responses":{"200":{"description":"Success (`error: 0` in body). Exact shape depends on operation (`found`, nested `debts`, etc.).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAnafCompanyInfo_roResponse"},"examples":{"companyAndDebtsHit":{"summary":"Company on Platitor TVA + on public debts list","value":{"error":0,"found":true,"query_date":"2026-06-03","cui":"13081201","name":"ITALIA TOBACCO PRODUCTION S.R.L.","address":"JUD. ILFOV, SAT MOGOŞOAIA COM. MOGOŞOAIA, STR. VALEA PARCULUI, NR.42B","phone":"0700000000","fax":null,"postal_code":"77135","reg_no":"J23/263/2009","caen":"4639","registration_status":"TRANSFER(SOSIRE) din data 06.02.2009","registration_date":"2000-06-06","legal_form":"SOCIETATE COMERCIALĂ CU RĂSPUNDERE LIMITATĂ","organization_form":"PERSOANA JURIDICA","ownership_form":"PROPR.PRIVATA-CAPITAL PRIVAT AUTOHTON SI STRAIN","competent_tax_authority":"Unitatea Fiscală Orăşenească Buftea","iban":null,"ro_e_invoice":false,"vat_payer":false,"vat_periods":[{"start_date":"2000-06-06","end_date":"2013-06-30","cancel_effective_date":null,"message":"Anularea înregistrarii în scopuri de TVA a fost efectuata din oficiu, potrivit dispozitiilor Art.153 alin.(9) lit.d) din Legea nr.571/2003 privind Codul fiscal, cu modificarile si completarile ulterioare"}],"vat_collection":{"active":false,"start_date":"2013-01-01","end_date":"2013-07-01","updated_at":"2013-10-21","published_at":"2013-10-22","act_type":"Radiere"},"inactive":{"is_inactive":true,"inactivated_at":"2013-11-20","reactivated_at":null,"published_at":"2013-11-22","deregistered_at":null},"split_vat":{"active":false,"start_date":null,"cancelled_at":null},"registered_office":{"street":"Str. Valea Parcului","street_no":"42B","locality":"Sat Mogoşoaia Com. Mogoşoaia","locality_code":"86","county":"ILFOV","county_code":"23","county_auto":"IF","postal_code":"77135","country":null,"details":null},"fiscal_domicile":{"street":"Str. VALEA PARCULUI","street_no":"42B","locality":"Sat Mogoşoaia Com. Mogoşoaia","locality_code":"86","county":"ILFOV","county_code":"23","county_auto":"IF","postal_code":"77135","country":null,"details":null},"debts":{"error":0,"found":true,"published_at":"2026-03-31","cui":"13081201","debtor_name":"ITALIA TOBACCO PRODUCTION S.R.L.","debtor_type":"pj","status":"Faliment","totals":{"state":1478125525,"social_insurance":0,"unemployment":0,"health":0}}}},"debtsNotOnList":{"summary":"Company found; not on published debts list","value":{"error":0,"found":true,"query_date":"2026-06-03","cui":"26191737","name":"POOL DE ASIGURARE S.A.","address":"București, …","debts":{"error":0,"found":false,"published_at":"2026-03-31","cui":"26191737","info":"Nu apare pe lista publică ANAF la data indicată. Nu confirmă absența datoriilor — doar că nu este publicat peste plafon."}}},"notInPlatitorTva":{"summary":"CUI not in Platitor TVA at query date","value":{"error":0,"found":false,"query_date":"2026-06-03","cui":"99999999","info":"CUI not found in ANAF registry at query date.","debts":{"error":0,"found":false,"published_at":"2026-03-31","cui":"99999999","info":"Nu apare pe lista publică ANAF la data indicată. Nu confirmă absența datoriilor — doar că nu este publicat peste plafon."}}}}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include cui (or taxCode), digits only"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}},"502":{"description":"External registry temporarily unavailable. Body may still include partial data (e.g. `debts`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAnafCompanyInfo_roResponseUpstreamError"},"example":{"error":1,"anaf_unavailable":true,"info":"Serviciul ANAF (Platitor TVA) nu răspunde momentan. Încearcă din nou peste câteva minute.","debts":{"error":0,"found":true,"published_at":"2026-03-31","cui":"13081201","debtor_name":"ITALIA TOBACCO PRODUCTION S.R.L.","debtor_type":"pj","status":"Faliment","totals":{"state":1478125525,"social_insurance":0,"unemployment":0,"health":0}}}}}}}}},"/getAnafCompanyFinance_ro":{"post":{"tags":["Company"],"operationId":"getAnafCompanyFinance_ro","summary":"ANAF balance-sheet indicators (bilanț) by CUI and fiscal year(s)","description":"Annual ANAF bilanț indicators (I1–I20) by CUI and fiscal year(s). Complement to `/getAnafCompanyInfo_ro` (registry + debts).\n\n**Years:** omit `years` → last **5** calendar years (newest first). Or pass `years: 2023` / `years: [2024, 2023]` / aliases `an`, `year`.\n\n**Indicator catalog (values in RON except I20):**\n\n| Code | Meaning |\n|------|--------|\n| **I1** | Active imobilizate — total |\n| **I2** | Active circulante — total |\n| **I3** | Stocuri |\n| **I4** | Creanțe |\n| **I5** | Casa și conturi la bănci |\n| **I6** | Cheltuieli în avans |\n| **I7** | Datorii |\n| **I8** | Venituri în avans |\n| **I9** | Provizioane |\n| **I10** | Capitaluri — total |\n| **I11** | Capital subscris vărsat |\n| **I12** | Patrimoniul regiei |\n| **I13** | Cifra de afaceri netă |\n| **I14** | Venituri totale |\n| **I15** | Cheltuieli totale |\n| **I16** | Profit brut |\n| **I17** | Pierdere brută |\n| **I18** | Profit net |\n| **I19** | Pierdere netă |\n| **I20** | Număr mediu de salariați |\n\nPer-year fields: `found`, `from_cache`, optional `indicators`. If a year cannot be fetched, that entry may include `fetch_failed: true` while other years still succeed.\n\nRequires API key, allowed client IP, and company lookup enabled on the account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAnafCompanyFinance_roRequest"},"example":{"user_id":"1","api_key":"YOUR_API_KEY","cui":"481206","years":2023}}}},"responses":{"200":{"description":"Success (`error: 0` in body). Exact shape depends on operation (`found`, nested `debts`, etc.).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAnafCompanyFinance_roResponse"},"examples":{"yearHitFullIndicators":{"summary":"Bilanț found — all I1–I20 indicators (CUI 481206, 2023)","value":{"error":0,"cui":"481206","years":[{"an":2023,"found":true,"from_cache":false,"name":"CISCOM EXPO 92 SRL","caen":4120,"caen_description":"Lucrari de constructii a cladirilor rezidentiale si nerezidentiale","indicators":[{"code":"I1","value":647153,"label":"ACTIVE IMOBILIZATE - TOTAL"},{"code":"I2","value":1353663,"label":"ACTIVE CIRCULANTE - TOTAL, din care:"},{"code":"I3","value":672485,"label":"Stocuri"},{"code":"I4","value":516499,"label":"Creante"},{"code":"I5","value":164679,"label":"Casa şi conturi la bănci"},{"code":"I6","value":1283,"label":"CHELTUIELI IN AVANS"},{"code":"I7","value":472705,"label":"DATORII"},{"code":"I8","value":18018,"label":"VENITURI IN AVANS"},{"code":"I9","value":0,"label":"PROVIZIOANE"},{"code":"I10","value":1511376,"label":"CAPITALURI - TOTAL, din care:"},{"code":"I11","value":5000,"label":"Capital subscris varsat"},{"code":"I12","value":0,"label":"Patrimoniul regiei"},{"code":"I13","value":1263653,"label":"Cifra de afaceri neta"},{"code":"I14","value":1279208,"label":"VENITURI TOTALE"},{"code":"I15","value":1375419,"label":"CHELTUIELI TOTALE"},{"code":"I16","value":0,"label":"Profit brut"},{"code":"I17","value":96211,"label":"Pierdere bruta"},{"code":"I18","value":0,"label":"Profit net"},{"code":"I19","value":108931,"label":"Pierdere  neta"},{"code":"I20","value":4,"label":"Numar mediu de salariati"}]}]}},"yearMiss":{"summary":"No bilanț filed for requested year","value":{"error":0,"cui":"481206","years":[{"an":1999,"found":false,"from_cache":false,"info":"No ANAF bilant record for this CUI and fiscal year."}]}},"fromCache":{"summary":"Served from cache (`from_cache: true`)","value":{"error":0,"cui":"481206","years":[{"an":2023,"found":true,"from_cache":true,"name":"CISCOM EXPO 92 SRL","caen":4120,"caen_description":"Lucrari de constructii a cladirilor rezidentiale si nerezidentiale","indicators":[{"code":"I13","value":1263653,"label":"Cifra de afaceri neta"},{"code":"I19","value":108931,"label":"Pierdere  neta"},{"code":"I20","value":4,"label":"Numar mediu de salariati"}]}]}},"multiYearMixed":{"summary":"Multiple years — one hit, one miss (typical default window excerpt)","value":{"error":0,"cui":"481206","years":[{"an":2024,"found":false,"from_cache":true,"info":"No ANAF bilant record for this CUI and fiscal year."},{"an":2023,"found":true,"from_cache":true,"name":"CISCOM EXPO 92 SRL","caen":4120,"caen_description":"Lucrari de constructii a cladirilor rezidentiale si nerezidentiale","indicators":[{"code":"I13","value":1263653,"label":"Cifra de afaceri neta"},{"code":"I7","value":472705,"label":"DATORII"}]}]}}}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include cui (or taxCode), digits only; or invalid years"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}},"502":{"description":"External registry temporarily unavailable. Body may still include partial data (e.g. `debts`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAnafCompanyFinance_roResponseUpstreamError"},"example":{"error":1,"anaf_unavailable":true,"info":"Serviciul ANAF (bilanț) nu răspunde momentan. Încearcă din nou peste câteva minute.","cui":"481206","years":[{"an":2023,"found":false,"from_cache":false,"fetch_failed":true,"info":"Serviciul ANAF (bilanț) nu răspunde momentan. Încearcă din nou peste câteva minute."}]}}}}}}},"/getCourtCases_ro":{"post":{"tags":["Company"],"operationId":"getCourtCases_ro","summary":"Court cases (just.ro / ECRIS) by company name — summary default, optional details","description":"Court cases by company legal **`name`** (no CUI). Default: summary rows; set `includeDetails: 1` for parties, hearings, and appeals.\n\nResults are metadata only (no document URLs). Use `portalUrl` for manual lookup. `force_refresh: 1` bypasses cache.\n\nRequires API key, allowed client IP, and company lookup enabled on the account.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCourtCases_roRequest"},"example":{"user_id":"1","api_key":"YOUR_API_KEY","name":"BORG DESIGN SRL","includeDetails":0,"force_refresh":0}}}},"responses":{"200":{"description":"Success (`error: 0` in body). Exact shape depends on operation (`found`, nested `debts`, etc.).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCourtCases_roResponse"},"examples":{"summaryFromCache":{"summary":"Summary cases from cache","value":{"error":0,"found":true,"name":"BORG DESIGN SRL","companyName":"BORG DESIGN SRL","searchName":"BORG DESIGN SRL","from_cache":true,"cached_at":"2026-06-03T10:00:00.000Z","totalCases":1,"truncated":false,"includeDetails":false,"portalUrl":"https://portal.just.ro","cases":[{"caseNumber":"2591/3/2023","numarVechi":null,"date":"2023-01-27T14:36:00","lastUpdate":"2023-07-12T14:34:17","institution":"Tribunalul Bucuresti","department":"Sectia a-VIII-a Conflicte de Munca si Asigurari Sociale","caseCategory":"Asigurarisociale","caseCategoryName":"Asigurari sociale","proceduralStage":"Fond","proceduralStageName":"Fond","subject":"Pretentii","partyStatus":"Reclamant","companyName":"BORG DESIGN SRL"}]}},"notFound":{"summary":"No cases for party name (cached negative)","value":{"error":0,"found":false,"name":"EXAMPLE SRL","companyName":"EXAMPLE SRL","searchName":"EXAMPLE SRL","from_cache":false,"cached_at":null,"totalCases":0,"truncated":false,"includeDetails":false,"portalUrl":"https://portal.just.ro","cases":[]}}}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include name (min. 3 characters); name too short for just.ro numeParte"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}},"502":{"description":"External registry temporarily unavailable. Body may still include partial data (e.g. `debts`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCourtCases_roResponseUpstreamError"},"example":{"error":1,"just_unavailable":true,"info":"Serviciul instanțelor nu răspunde momentan. Încearcă din nou peste câteva minute.","name":"BORG DESIGN SRL"}}}}}}},"/getCompanyInfo_byName_ro":{"post":{"tags":["Company"],"operationId":"getCompanyInfo_byName_ro","summary":"Search companies by name (ONRC autocomplete, Romania)","description":"Company name autocomplete (`taxCode`, `name`, `regNo`, …). Use `/getCompanyInfo_ro` with the chosen `cui` for full data. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCompanyInfo_byName_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","name":"POOL ASIGURARE"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getUboInfo_ro":{"post":{"tags":["Company"],"operationId":"getUboInfo_ro","summary":"UBO (Romania)","description":"Ultimate beneficial owners by CUI. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUboInfo_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","cui":"12345678"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getArrCompanyInfoById_ro":{"post":{"tags":["Company"],"operationId":"getArrCompanyInfoById_ro","summary":"ARR public transport operator by public id (licente.arr.ro)","description":"","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetArrCompanyInfoById_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","arr_id":"12345"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/checkCnp_ro":{"post":{"tags":["CNP"],"operationId":"checkCnp_ro","summary":"CNP validation (Romania)","description":"Validate a Romanian CNP. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCnp_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","cnp":"1800101019999"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/checkSanctions":{"post":{"tags":["Sanctions"],"operationId":"checkSanctions","summary":"Sanctions list search","description":"Search sanctions lists. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckSanctionsRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","sub_user_id":"broker id","name":"Ionel Popisteanu","surname":"","aka":"","min_score":90,"max_result":10}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getAddressCounties_ro":{"post":{"tags":["Address"],"operationId":"getAddressCounties_ro","summary":"List counties (Romania)","description":"List Romanian counties. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAddressCounties_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getAddressCities_ro":{"post":{"tags":["Address"],"operationId":"getAddressCities_ro","summary":"List cities by county (Romania)","description":"List cities for a county. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAddressCities_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","county":"Alba"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getAddressStreets_ro":{"post":{"tags":["Address"],"operationId":"getAddressStreets_ro","summary":"Street suggestions (prefix, Romania)","description":"Street suggestions by prefix. The city must belong to the given county. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAddressStreets_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","county":"Alba","city":"Alba Iulia","q":"Horea"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getAddressZip_ro":{"post":{"tags":["Address"],"operationId":"getAddressZip_ro","summary":"Postal code lookup (city + street + number, Romania)","description":"Postal code by city, street, and number. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAddressZip_roRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","city":"Alba Iulia","street":"Bulevard Horea","number":10,"hasAlphaSuffix":false}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/sendSms":{"post":{"tags":["Messaging"],"operationId":"sendSms","summary":"Send SMS","description":"Send an SMS. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendSmsRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","to":"40722123456","text":"Code: 123456"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/sendEmail":{"post":{"tags":["Messaging"],"operationId":"sendEmail","summary":"Send email","description":"Send an email. Body must include `to`, `subject`, and at least `text` or `html`. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","to":"client@example.com","subject":"Subject","text":"Short message"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/compareOffers":{"post":{"tags":["AI"],"operationId":"compareOffers","summary":"Compare insurance offers (AI processing)","description":"Compare two or more insurance offers (AI). Body includes **`country`** (ISO-2 market) then **`lang`** (output language).\n\n- **`profile`**: **`speed`** (default, concise) or **`expert`** (more detailed).\n- **`analysisCriteria`**: per-field **0/1** — which properties appear in each **`offers[]`** row and in **`excelExport.headers`**; omit / `{}` → all **1**.\n- **`scoreCard`**: per-field **weight %** for **`aiVerdict`** ranking; omit / `null` → defaults (must total **100%** when set).\n- **`response_transport`**: omit or **`sync`** → JSON; **`stream`** → SSE (`text/event-stream`).\n\n**SSE (`stream`):** `meta` → `ai_delta` (text chunks) → `complete` (full result or error).\n\nFiles: at least two offers, each `name` + `data` (Base64). Encrypted PDFs: set `pdf_password` on that file entry.\n\nRequires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","api_key","files"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`) with `meta`, token deltas, and `complete`."},"responseTransport":{"type":"string","enum":["sync","stream"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`) with `meta`, token deltas, and `complete`. camelCase alias for `response_transport`."},"country":{"type":"string","example":"RO","description":"Optional. Broker operating country as **ISO 3166-1 alpha-2** (e.g. `RO`, `CZ`). Used for market/regulatory context. Invalid values are ignored."},"lang":{"type":"string","example":"ro","description":"Output language (optional, default `ro`). UI locale / interface language (e.g. `ro`, `en`, `cs`). Listed immediately after `country` in this schema."},"profile":{"type":"string","enum":["speed","expert"],"description":"Optional. \"speed\" (default) → concise `aiVerdict.reasoning`; \"expert\" → more detailed comparison.","example":"speed"},"analysisCriteria":{"description":"See schema **`CompareAnalysisCriteria`**: ten fixed keys, each **`0`** or **`1`**. Omitted / `{}` = all **`1`** (full template).","allOf":[{"$ref":"#/components/schemas/CompareAnalysisCriteria"}]},"analysis_criteria":{"description":"Snake_case alias for `analysisCriteria`.","allOf":[{"$ref":"#/components/schemas/CompareAnalysisCriteria"}]},"scoreCard":{"description":"See **`CompareScoreCard`**. Omitted / `null` → default weights (100% on scoring fields). Custom object must sum to **100%** on active criteria.","allOf":[{"$ref":"#/components/schemas/CompareScoreCard"}]},"score_card":{"description":"Snake_case alias for `scoreCard`.","allOf":[{"$ref":"#/components/schemas/CompareScoreCard"}]},"files":{"type":"array","description":"At least 2 offers. Each item: `name` + `data`. For encrypted PDFs add `pdf_password` only on that item.","items":{"$ref":"#/components/schemas/CompareOfferFile"},"minItems":2}}},"example":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"sync","country":"RO","lang":"ro","profile":"speed","analysisCriteria":{"insurerName":1,"premium":1,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":1},"scoreCard":{"insurerName":0,"premium":12,"sumInsured":11,"startDate":0,"endDate":0,"mainCovers":23,"specialClauses":23,"deductible":14,"majorExclusions":17,"installments":0},"files":[{"name":"offer1.pdf","data":"<BASE64>"},{"name":"offer2.pdf","data":"<BASE64>"}]},"examples":{"mayaToApi":{"summary":"Typical request — country, lang, criteria, scoreCard","description":"`country` is uppercase ISO-2. When set, `scoreCard` weights must total 100%.","value":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"stream","country":"RO","lang":"ro","profile":"speed","analysisCriteria":{"insurerName":1,"premium":1,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":1},"scoreCard":{"insurerName":0,"premium":12,"sumInsured":11,"startDate":0,"endDate":0,"mainCovers":23,"specialClauses":23,"deductible":14,"majorExclusions":17,"installments":0},"files":[{"name":"offer1.pdf","data":"<BASE64>"},{"name":"offer2.pdf","data":"<BASE64>"}]}},"syncDefault":{"summary":"Sync — explicit full `analysisCriteria` (same as `{}`/omit: all flags **1**; each key **1**=include, **0**=exclude in `offers[]`)","value":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"sync","country":"RO","lang":"ro","profile":"speed","analysisCriteria":{"insurerName":1,"premium":1,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":1},"scoreCard":{"insurerName":0,"premium":12,"sumInsured":11,"startDate":0,"endDate":0,"mainCovers":23,"specialClauses":23,"deductible":14,"majorExclusions":17,"installments":0},"files":[{"name":"offer1.pdf","data":"<BASE64>"},{"name":"offer2.pdf","data":"<BASE64>"}]}},"scoreCardDefaults":{"summary":"Explicit default scoreCard (100% on scoring fields)","description":"Same as omitting `scoreCard`. Weights apply to `aiVerdict` prompt only.","value":{"user_id":1,"api_key":"YOUR_API_KEY","country":"RO","lang":"en","analysisCriteria":{"insurerName":1,"premium":1,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":1},"scoreCard":{"insurerName":0,"premium":12,"sumInsured":11,"startDate":0,"endDate":0,"mainCovers":23,"specialClauses":23,"deductible":14,"majorExclusions":17,"installments":0},"files":[{"name":"offer1.pdf","data":"<BASE64>"},{"name":"offer2.pdf","data":"<BASE64>"}]}},"scoreCardPriceHeavy":{"summary":"Custom weights — emphasize premium (totals 100%)","value":{"user_id":1,"api_key":"YOUR_API_KEY","country":"RO","lang":"ro","analysisCriteria":{"insurerName":1,"premium":1,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":1},"scoreCard":{"insurerName":0,"premium":40,"sumInsured":10,"startDate":0,"endDate":0,"mainCovers":20,"specialClauses":10,"deductible":10,"majorExclusions":10,"installments":0},"files":[{"name":"offer1.pdf","data":"<BASE64>"},{"name":"offer2.pdf","data":"<BASE64>"}]}},"stream":{"summary":"Stream (SSE) — add `response_transport`; full criteria shown","value":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"stream","country":"RO","lang":"ro","profile":"expert","analysisCriteria":{"insurerName":1,"premium":1,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":1},"scoreCard":{"insurerName":0,"premium":12,"sumInsured":11,"startDate":0,"endDate":0,"mainCovers":23,"specialClauses":23,"deductible":14,"majorExclusions":17,"installments":0},"files":[{"name":"offer1.pdf","data":"<BASE64>"},{"name":"offer2.pdf","data":"<BASE64>","pdf_password":"only-if-encrypted"}]}},"limitedFields":{"summary":"Partial columns — exclude `premium` and `installments`","value":{"user_id":1,"api_key":"YOUR_API_KEY","country":"RO","lang":"ro","analysisCriteria":{"insurerName":1,"premium":0,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":0},"scoreCard":{"insurerName":0,"premium":0,"sumInsured":15,"startDate":0,"endDate":0,"mainCovers":35,"specialClauses":35,"deductible":8,"majorExclusions":7,"installments":0},"files":[{"name":"offer1.pdf","data":"<BASE64>"},{"name":"offer2.pdf","data":"<BASE64>"}]}}}}}},"responses":{"200":{"description":"Depends on **`response_transport`**: for **sync** (or omission) the body is JSON; validation errors remain JSON for **stream** mode **before** SSE starts (e.g. 400 during file preparation). After streaming starts the body is **SSE** (`text/event-stream`); otherwise **`application/json`**. ","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CompareOffersSyncSuccessResponse"},{"$ref":"#/components/schemas/StandardApiError"}]},"examples":{"syncSuccess":{"summary":"Sync success","value":{"error":0,"response_transport":"sync","aiRawResponse":"{\"comparisonMetadata\":{...},\"offers\":[...],\"aiVerdict\":{...}}","tokensUsed":12800}},"streamPrepError":{"summary":"Stream: validation error before SSE (JSON)","value":{"error":1,"info":"for comparison you must upload at least two files"}},"scoreCardNot100":{"summary":"400 — scoreCard active weights must total 100%","value":{"error":1,"info":"scoreCard active weights must total 100% (currently 50%)"}}}},"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events; each `data:` line is JSON for that event type (see operation description)."},"examples":{"streamFlow":{"summary":"Typical flow (conceptual)","value":"event: meta\ndata: {\"response_transport\":\"stream\"}\n\nevent: ai_delta\ndata: {\"text\":\"{\\\"comparisonMet\"}\n\n... event: complete\ndata: {\"error\":0,\"response_transport\":\"stream\",...}"}}}}},"400":{"description":"Invalid body, fewer than two files, invalid PDF, oversized Base64, bad `response_transport`, unknown `analysisCriteria` / `scoreCard` keys, invalid 0/1 flags, **`scoreCard` active weights not totaling 100%**, or all `analysisCriteria` set to 0.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"scoreCard active weights must total 100% (currently 88%)"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id 1 for compare offers"}}}},"500":{"description":"Unexpected server failure after request was accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/trainingAgents":{"post":{"tags":["AI"],"operationId":"trainingAgents","summary":"Training agents: simulate agent/client conversation (AI)","description":"Interactive sales-training dialogue. Body: `history[]` + `input`, plus `client_role_by` for who plays the client.\n\nOptional **`response_transport`**: omit/`sync` → JSON; **`stream`**/`sse` → SSE (`meta` → `ai_delta` → `complete`).\n\nRequires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","api_key","client_role_by","history","input"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"country":{"type":"string","example":"RO"},"lang":{"type":"string","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"example":"speed"},"conversation_id":{"type":"string","description":"Optional session indicator. If omitted, server generates one."},"client_role_by":{"type":"string","enum":["ai","agent"],"description":"Who plays the client role: \"ai\" or \"agent\"."},"client_behavioral":{"type":"string","enum":["agreeable","skeptic","neutral","hostile"],"description":"Required when client_role_by=\"ai\". Controls client tone/stance."},"history":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["agent","client"]},"content":{"type":"string"}}}},"input":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["agent","client"]},"content":{"type":"string"}}}}},"examples":{"sync":{"summary":"Sync (default)","value":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"sync","country":"RO","lang":"ro","profile":"speed","client_role_by":"ai","client_behavioral":"skeptic","history":[{"role":"agent","content":"Bună ziua! Cu ce vă pot ajuta?"},{"role":"client","content":"Sunt cam sceptic..."}],"input":{"role":"agent","content":"Înțeleg. Ce vă îngrijorează cel mai mult?"}}},"stream":{"summary":"Stream (SSE)","value":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"stream","country":"RO","lang":"ro","profile":"speed","client_role_by":"ai","client_behavioral":"skeptic","history":[{"role":"agent","content":"Bună ziua! Cu ce vă pot ajuta?"},{"role":"client","content":"Sunt cam sceptic..."}],"input":{"role":"agent","content":"Înțeleg. Ce vă îngrijorează cel mai mult?"}}}}}}},"responses":{"200":{"description":"Depends on `response_transport`: JSON for sync (or omission); SSE (`text/event-stream`) for stream/sse. Validation errors are JSON if they occur before SSE starts.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TrainingAgentsSyncSuccessResponse"},{"$ref":"#/components/schemas/StandardApiError"}]}},"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events; each `data:` line is JSON (see operation description)."}}}},"400":{"description":"Invalid body (missing history/input), invalid response_transport, or client_behavioral missing for client_role_by=ai.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include a non-empty history array"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id 1 for agents training simulation (trainingAgents)"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/trainingAgentEvaluation":{"post":{"tags":["AI"],"operationId":"trainingAgentEvaluation","summary":"Evaluate a training conversation (consultative sales scoring)","description":"Evaluate a training transcript (consultative sales score 0–100 with per-criterion evidence).\n\nOptional **`response_transport`**: omit/`sync` → JSON; **`stream`**/`sse` → SSE.\n\nRequires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","api_key","history"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"country":{"type":"string","example":"RO"},"lang":{"type":"string","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"example":"speed"},"conversation_id":{"type":"string","description":"Optional session indicator (correlates with /trainingAgents)."},"history":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["agent","client"]},"content":{"type":"string"}}}}}},"examples":{"sync":{"summary":"Sync (default)","value":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"sync","conversation_id":"conv_123","country":"RO","lang":"ro","profile":"speed","history":[{"role":"agent","content":"Bună ziua! Cu ce vă pot ajuta?"},{"role":"client","content":"Sunt cam sceptic..."},{"role":"agent","content":"Înțeleg. Ce v-a făcut să fiți sceptic?"}]}},"stream":{"summary":"Stream (SSE)","value":{"user_id":1,"api_key":"YOUR_API_KEY","response_transport":"stream","conversation_id":"conv_123","country":"RO","lang":"ro","profile":"speed","history":[{"role":"agent","content":"Bună ziua! Cu ce vă pot ajuta?"},{"role":"client","content":"Sunt cam sceptic..."},{"role":"agent","content":"Înțeleg. Ce v-a făcut să fiți sceptic?"}]}}}}}},"responses":{"200":{"description":"Depends on `response_transport`: JSON for sync (or omission); SSE (`text/event-stream`) for stream/sse. Validation errors are JSON if they occur before SSE starts.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TrainingAgentEvaluationSyncSuccessResponse"},{"$ref":"#/components/schemas/TrainingAgentEvaluationSyncParseErrorResponse"},{"$ref":"#/components/schemas/StandardApiError"}]}},"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events; each `data:` line is JSON (see operation description)."}}}},"400":{"description":"Invalid body (missing history) or invalid response_transport.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include a non-empty history array"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: ..."}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/extractPolicyFromPdf":{"post":{"tags":["AI"],"operationId":"extractPolicyFromPdf","summary":"Extract policy data: PDF, .txt text, .doc/.docx Word (AI processing)","description":"Extract policy fields from **PDF**, **.txt**, or **.doc/.docx**. Encrypted PDFs need `pdf_password`. Password-protected Word is not supported. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractPolicyFromPdfRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","name":"polita.txt","data":"<BASE64_UTF8_TEXT>"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/parseAddress":{"post":{"tags":["Building"],"operationId":"parseAddress","summary":"Parse free-text address into atomic fields (Gemini)","description":"Step 1 of building lookup: parse free-text address into atomic fields (`country`, `country_code`, `city`, `district`, `street`, `street_number`, `postcode`, `formatted_query`, `bounding_box`). Pass `address_parsed` to `POST /getBuildingByAddress`.\n\nResponse includes `tokens_in`, `tokens_out`, `tokens_used`. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseAddressRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","address":"Bucuresti Aleea secuilor 1a sector 4"}}}},"responses":{"200":{"description":"Parsed atomic address and Gemini token usage (`ParseAddressResponse`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseAddressResponse"},"examples":{"bucharest":{"summary":"Bucharest address with token axes","value":{"address_input":"Bucuresti Aleea secuilor 1a sector 4","address_parsed":{"country_code":"RO","country":"Romania","city":"București","district":"Sector 4","street":"Aleea Secuilor","street_number":"1A","postcode":null,"formatted_query":"1A Aleea Secuilor, Sector 4, București, Romania","bounding_box":{"min_lat":43.62,"min_lon":20.26,"max_lat":48.27,"max_lon":29.75}},"tokens_in":412,"tokens_out":89,"tokens_used":501}},"fallbackNoGemini":{"summary":"Fallback parse (tokens are zero)","value":{"address_input":"Strada ACADEMIEI 1, Bucuresti, Romania","address_parsed":{"country_code":null,"country":null,"city":null,"district":null,"street":null,"street_number":null,"postcode":null,"formatted_query":"Strada ACADEMIEI 1, Bucuresti, Romania","bounding_box":null},"tokens_in":0,"tokens_out":0,"tokens_used":0}}}}}},"400":{"description":"Invalid JSON body or missing address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include a non-empty address string"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: user_id 1 has no access to EUBUCCO building lookup (parseAddress)"}}}},"502":{"description":"Address parse failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Address parse failed"}}}}}}},"/getBuildingByAddress":{"post":{"tags":["Building"],"operationId":"getBuildingByAddress","summary":"EUBUCCO building lookup from atomic address (geocode + spatial match)","description":"Step 2 of building lookup — requires `address_parsed` (from `POST /parseAddress` or your client): geocode, then match building footprints.\n\nRequires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBuildingByAddressRequest"},"examples":{"withParsed":{"summary":"Atomic `address_parsed` (after POST /parseAddress)","value":{"user_id":1,"api_key":"YOUR_API_KEY","address":"Bucuresti Aleea secuilor 1a sector 4","address_parsed":{"country_code":"RO","country":"Romania","city":"București","district":"Sector 4","street":"Aleea Secuilor","street_number":"1A","postcode":null,"formatted_query":"1A Aleea Secuilor, Sector 4, București, Romania"},"radius_m":150,"include_footprint":true,"geocoder":"photon"}},"mayaProxy":{"summary":"Maya building-by-address BFF","description":"Call `POST /parseAddress`, then `POST /getBuildingByAddress` with the returned `address_parsed`.","value":{"user_id":"maya@inscape.ro","api_key":"YOUR_API_KEY","address":"Strada Arcului 4, sector 2, Bucuresti","address_parsed":{"country_code":"RO","country":"Romania","city":"București","district":"Sector 2","street":"Strada Arcului","street_number":"4","formatted_query":"4 Strada Arcului, Sector 2, București, Romania"},"include_footprint":false}}}}}},"responses":{"200":{"description":"EUBUCCO lookup result (`GetBuildingByAddressResponse`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBuildingByAddressResponse"},"example":{"address_input":"Bucuresti Aleea secuilor 1a sector 4","address_parsed":{"country_code":"RO","country":"Romania","city":"București","district":"Sector 4","street":"Aleea Secuilor","street_number":"1A","postcode":null,"formatted_query":"1A Aleea Secuilor, Sector 4, București, Romania"},"geocode_query":"1A Aleea Secuilor, Sector 4, București, Romania","geocoding":{"query":"1A Aleea Secuilor, Sector 4, București, Romania","provider":"photon","display_name":"Aleea Secuilor, …, România","lat":44.391,"lon":26.119,"country_code":"ro"},"coordinates_wgs84":{"lat":44.391,"lon":26.119},"coordinates_epsg3035":{"x":5596669,"y":2502766},"eubucco_partition":{"nuts_id":"RO32","nuts_name":"București - Ilfov","nuts_level":2},"building":{"id":"9ac7d7dba23a44e7-0","type":"residential","subtype":"apartment","floors":9,"height_m":30,"distance_m":30.5,"match_mode":"nearest"},"map":{"address_point":{"type":"Point","coordinates":[26.119,44.391]},"building_footprint":null},"notes":["EUBUCCO lookup uses atomic address_parsed from the client (typically via POST /parseAddress)."]}}}},"400":{"description":"Invalid JSON body, missing address_parsed, or invalid atomic fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include address_parsed (atomic fields). Call POST /parseAddress first or supply address_parsed from your client."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: user_id 1 has no access to EUBUCCO building lookup (getBuildingByAddress)"}}}},"502":{"description":"Geocoding failed, coordinates outside EUBUCCO coverage, or no building within radius.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"No EUBUCCO building found within 150 m in partition RO32."}}}}}}},"/getSeismicEvents":{"post":{"tags":["Seismic"],"operationId":"getSeismicEvents","summary":"Seismic events, daily update","description":"Source: https://www.seismicportal.eu","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSeismicEventsRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","from":"2026-04-01","to":"2026-04-27","min_mag":3,"minlat":43.5,"maxlat":48.5,"minlon":20.5,"maxlon":29.5}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getRiskDataHubLosses":{"post":{"tags":["Risk Data Hub"],"operationId":"getRiskDataHubLosses","summary":"Risk Data Hub losses (daily update)","description":"Source: The international disaster database https://www.emdat.be/","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRiskDataHubLossesRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","from":"2024-01-01","to":"2025-12-31","country_code":"RO","admin_unit_code":"RO32","admin_unit_level":"NUTS2"}}}},"responses":{"200":{"description":"JSON response (success payload is operation-specific; logical errors may still use `{ error: 1, info }` in the body on some routes).","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Operation-specific JSON object (exact shape depends on the route).","example":{}},"example":{}}}},"400":{"description":"Invalid JSON body, missing required fields, or validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Invalid request body or missing required fields."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: api_key does not match user_id for this operation"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/cyberAudit":{"post":{"tags":["Cyber"],"operationId":"cyberAudit","summary":"Cyber pre-audit (external posture)","description":"External cyber posture pre-audit on a declared apex domain. Profile: **`passive`** only (no port scan, intrusion, or breach APIs).\n\n**Consent:** `consent_acknowledged` must be `true` for all selected modules.\n\n**Modules (`scan_options`):** `dns_email`, `attack_surface` (CT/subdomains), `web_tls`. Omit `scan_options` to run all three.\n\nResponse uses `audit_version: cyber_audit_v2` (findings, axis scores, `scan_modules`, `scope_lines`).\n\nRequires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CyberAuditRequest"},"examples":{"allModules":{"summary":"All passive modules (default)","value":{"user_id":1,"api_key":"YOUR_API_KEY","domain":"example.com","consent_acknowledged":true,"scan_profile":"passive","scan_options":{"dns_email":true,"attack_surface":true,"web_tls":true}}},"emailAndWebOnly":{"summary":"DNS/email + Web/TLS only (no CT)","value":{"user_id":1,"api_key":"YOUR_API_KEY","domain":"renomia.ro","consent_acknowledged":true,"scan_profile":"passive","scan_options":{"dns_email":true,"attack_surface":false,"web_tls":true}}},"legacyOmitScanOptions":{"summary":"Legacy body (omit scan_options → all modules)","value":{"user_id":1,"api_key":"YOUR_API_KEY","domain":"example.com","consent_acknowledged":true}}}}}},"responses":{"200":{"description":"Pre-audit result (`error: 0`) or logical error payload.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CyberAuditSuccessResponse"},{"$ref":"#/components/schemas/StandardApiError"}]},"examples":{"completedV2AllModules":{"summary":"v2 — all modules completed","value":{"error":0,"audit_version":"cyber_audit_v2","status":"completed","domain":"example.com","scan_profile":"passive","consent_acknowledged":true,"scanned_at":"2026-05-25T12:00:00.000Z","message":"Passive cyber pre-audit completed (3 modules).","scan_options_requested":{"dns_email":true,"attack_surface":true,"web_tls":true},"scan_modules":[{"module":"dns_email","requested":true,"executed":true,"skipped":false,"error":null},{"module":"attack_surface","requested":true,"executed":true,"skipped":false,"error":null},{"module":"web_tls","requested":true,"executed":true,"skipped":false,"error":null}],"scope_preamble_en":"Passive external reconnaissance only: no port scanning, no credential testing, no intrusive or authenticated testing.","scope_lines":[{"module":"dns_email","text_en":"DNS & email posture: apex A/AAAA/NS and MX; SPF, DKIM (common selectors), DMARC; MTA-STS and TLS-RPT where published.","text_ro":"DNS și postură email: A/AAAA/NS apex și MX; SPF, DKIM (selectori uzuale), DMARC; MTA-STS și TLS-RPT unde există."},{"module":"attack_surface","text_en":"Attack surface: passive subdomain discovery via public certificate transparency (crt.sh).","text_ro":"Suprafață de atac: descoperire pasivă de subdomenii via certificate transparency (crt.sh)."},{"module":"web_tls","text_en":"Web & TLS: HTTPS reachability and security headers on a limited hostname set; TLS certificate and protocol checks (no exploitation).","text_ro":"Web și TLS: reachability HTTPS și headere de securitate pe un set limitat de hosturi; certificat și protocol TLS (fără exploatare)."}],"scores":{"email_posture":72,"tls_web":85,"attack_surface":90,"overall":82},"precomputed":{"findings_total":8,"findings_critical":0,"findings_high":1,"findings_medium":2,"findings_low":0,"findings_info":5,"hosts_scanned":3,"subdomains_discovered":12},"findings":[{"id":"DNS-03","severity":"high","category":"email_posture","title":"SPF record missing","detail":"No SPF (v=spf1) TXT record found on example.com."}]}},"partialV2TwoModules":{"summary":"v2 — two modules (attack_surface skipped)","value":{"error":0,"audit_version":"cyber_audit_v2","status":"completed","domain":"renomia.ro","scan_profile":"passive","consent_acknowledged":true,"scanned_at":"2026-05-25T14:30:00.000Z","message":"Passive cyber pre-audit completed (2 modules).","scan_options_requested":{"dns_email":true,"attack_surface":false,"web_tls":true},"scan_modules":[{"module":"dns_email","requested":true,"executed":true,"skipped":false,"error":null},{"module":"attack_surface","requested":false,"executed":false,"skipped":true,"error":null},{"module":"web_tls","requested":true,"executed":true,"skipped":false,"error":null}],"scope_preamble_en":"Passive external reconnaissance only: no port scanning, no credential testing, no intrusive or authenticated testing.","scope_lines":[{"module":"dns_email","text_en":"DNS & email posture: apex A/AAAA/NS and MX; SPF, DKIM (common selectors), DMARC; MTA-STS and TLS-RPT where published.","text_ro":"DNS și postură email: A/AAAA/NS apex și MX; SPF, DKIM (selectori uzuale), DMARC; MTA-STS și TLS-RPT unde există."},{"module":"web_tls","text_en":"Web & TLS: HTTPS reachability and security headers on a limited hostname set; TLS certificate and protocol checks (no exploitation).","text_ro":"Web și TLS: reachability HTTPS și headere de securitate pe un set limitat de hosturi; certificat și protocol TLS (fără exploatare)."}],"scores":{"email_posture":71,"tls_web":88,"attack_surface":null,"overall":80},"precomputed":{"findings_total":9,"findings_critical":0,"findings_high":0,"findings_medium":3,"findings_low":1,"findings_info":5,"hosts_scanned":2,"subdomains_discovered":0},"findings":[]}}}}}},"400":{"description":"Invalid domain, missing consent, invalid scan_profile, invalid scan_options (unknown keys / all false), or malformed body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"At least one scan module must be enabled in scan_options."}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: user_id 1 has no access to cyber pre-audit (cyberAudit)"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/searchEiopaUndertakings":{"post":{"tags":["EIOPA"],"operationId":"searchEiopaUndertakings","summary":"Search EIOPA insurance undertakings by name","description":"Search EIOPA insurance undertakings by name, with optional filters `eu_operating_country`, `home_country`, `active_only`. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchEiopaUndertakingsRequest"},"example":{"user_id":1,"api_key":"YOUR_API_KEY","name":"Allianz","eu_operating_country":"RO","home_country":"SK","active_only":true,"limit":50}}}},"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SearchEiopaUndertakingsSuccessResponse"},{"$ref":"#/components/schemas/StandardApiError"}]}}}},"400":{"description":"Invalid body / validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include name (non-empty string)"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: user_id 8 has no access to EIOPA register search (searchEiopaUndertakings)"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/getTedTenders":{"post":{"tags":["TED"],"operationId":"getTedTenders","summary":"List or fetch EU insurance tenders (TED, local DB)","description":"List or fetch EU insurance tenders (TED). **`country`** (ISO-3) is required. Returns future open tenders (default CPV prefix 6651). Omit `ted_publication_number` for list; include it for full detail. Requires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTedTendersRequest"},"examples":{"list":{"summary":"List active insurance tenders in Romania","value":{"user_id":1,"api_key":"YOUR_API_KEY","country":"ROU","limit":50}},"detail":{"summary":"Single tender detail","value":{"user_id":1,"api_key":"YOUR_API_KEY","country":"ROU","ted_publication_number":"366650-2026"}}}}}},"responses":{"200":{"description":"List or detail response.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GetTedTendersListSuccessResponse"},{"$ref":"#/components/schemas/GetTedTendersDetailSuccessResponse"},{"$ref":"#/components/schemas/StandardApiError"}]}}}},"400":{"description":"Invalid body (missing country or invalid EU code).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include country (ISO 3166-1 alpha-3, e.g. ROU, DEU)"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: user_id 1 has no access to TED EU insurance tenders (getTedTenders)"}}}},"404":{"description":"Tender not found for country / publication number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"No active tender found for ted_publication_number 366650-2026 in country ROU"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/insurancePlanForDomestic":{"post":{"tags":["AI"],"operationId":"insurancePlanForDomestic","summary":"Generate a personalized domestic insurance plan (AI, generic)","description":"Generate a generic (non-product, non-insurer) household insurance plan from free-text **`query`**. Amounts in EUR. Output: `plan_json` + `plan_text` in requested `lang` (BCP-47).\n\nOptional **`response_transport`**: omit/`sync` → JSON; **`stream`** → SSE (`meta` → `plan_text_delta` → `complete`).\n\nRequires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","api_key","query"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"lang":{"type":"string","description":"BCP-47 language code (EU languages supported), e.g. `fr`, `de`, `ro`, `pt-PT`. If omitted: follow the language used in `query`.","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"description":"Optional. \"speed\" (default) → concise plan_text; \"expert\" → more detailed plan.","example":"speed"},"conversation_id":{"type":"string","description":"Optional session ID for refinement.","example":"conv_domestic_001"},"conversationId":{"type":"string","description":"Alias for `conversation_id`."},"query":{"type":"string","minLength":8,"maxLength":32000,"description":"Free-text request describing household, home, assets, goals, budget, and constraints (max 32000 characters).","example":"Familie: 2 adulți (35, 37 ani), copil 6 ani. Apartament București ~250k EUR, ipotecă. Buget lunar asigurări ~80 EUR. Priorități: locuință, răspundere civilă, sănătate."},"user_query":{"type":"string","description":"Alias for `query`."},"userQuery":{"type":"string","description":"Alias for `query`."}}},"examples":{"sync":{"summary":"Sync (default)","value":{"user_id":1,"api_key":"YOUR_API_KEY","lang":"ro","profile":"speed","response_transport":"sync","query":"Familie: 2 adulți (35, 37 ani), copil 6 ani. Apartament București ~250k EUR, ipotecă. Buget lunar asigurări ~80 EUR. Priorități: locuință, răspundere civilă, sănătate."}},"stream":{"summary":"Stream (SSE)","value":{"user_id":1,"api_key":"YOUR_API_KEY","lang":"ro","profile":"expert","response_transport":"stream","query":"Familie: 2 adulți (35, 37 ani), copil 6 ani. Apartament București ~250k EUR, ipotecă. Buget lunar asigurări ~80 EUR. Priorități: locuință, răspundere civilă, sănătate."}}}}}},"responses":{"200":{"description":"Depends on `response_transport`: JSON for sync (or omission); SSE (`text/event-stream`) for stream/sse. Validation errors are JSON if they occur before SSE starts.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InsurancePlanForDomesticSyncSuccessResponse"},{"$ref":"#/components/schemas/StandardApiError"}]}},"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events; each `data:` line is JSON (see operation description)."},"examples":{"streamFlow":{"summary":"Typical flow (conceptual)","value":"event: meta\ndata: {\"response_transport\":\"stream\"}\n\nevent: plan_text_delta\ndata: {\"text\":\"Plan de asigurare\"}\n\n... event: complete\ndata: {\"error\":0,\"response_transport\":\"stream\",\"parse_ok\":true,...}"}}}}},"400":{"description":"Invalid body / validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Body must include a non-empty query string"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: user_id 1 has no access to insurance plan generation (insurancePlanForDomestic)"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}},"/insurancePlanForCompany":{"post":{"tags":["AI"],"operationId":"insurancePlanForCompany","summary":"Generate a personalized corporate insurance plan (AI, generic)","description":"Generate a generic (non-product, non-insurer) corporate insurance plan from free-text **`query`**. Amounts in EUR.\n\nCoverage may include property, BI, liability, fleet/cargo, employee benefits, cyber, D&O when justified by the input. Use a dedicated `conversation_id` (do not reuse domestic session IDs).\n\nOptional **`response_transport`**: omit/`sync` → JSON; **`stream`** → SSE.\n\nRequires API key and allowed client IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["user_id","api_key","query"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"lang":{"type":"string","description":"BCP-47 language code (EU languages supported), e.g. `fr`, `de`, `ro`, `pt-PT`. If omitted: follow the language used in `query`.","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"description":"Optional. \"speed\" (default) → concise plan_text; \"expert\" → more detailed corporate plan.","example":"speed"},"conversation_id":{"type":"string","description":"Optional session ID for refinement (use a company-specific ID, separate from domestic plans).","example":"conv_company_001"},"conversationId":{"type":"string","description":"Alias for `conversation_id`."},"query":{"type":"string","minLength":8,"maxLength":120000,"description":"Free-text request describing the company, location, hazards, declared values, fleet, employees, turnover, and insurance budget (max 120000 characters).","example":"T.B.T. LOGISTIC & PRODUCTION SRL — producție ambalaje carton/plastic, depozitare și logistică rutieră. Parcul Industrial Ghimbav, Hala 3, Brașov. Hala 2018 (extindere 2023), panouri sandwich, acoperiș cu 150 kWp PV (2025). Vecinătate: stație carburanți la 12m. Utilaje injecție, praf carton, gaz metan, mentenanță stivuitoare (baterii Li-ion). Sprinklere doar depozit; producție fără sprinklere; ISU în reautorizare. Valori: clădire 4.500.000 EUR, echipamente 2.200.000 EUR, stoc mediu 1.200.000 EUR (vârf 2.500.000 EUR). CA 12.000.000 EUR/an. Flotă 15 tractoare semiremorci transport internațional."},"user_query":{"type":"string","description":"Alias for `query`."},"userQuery":{"type":"string","description":"Alias for `query`."}}},"examples":{"sync":{"summary":"Sync (default) — T.B.T. LOGISTIC example","value":{"user_id":1,"api_key":"YOUR_API_KEY","lang":"ro","profile":"expert","response_transport":"sync","conversation_id":"conv_company_001","query":"T.B.T. LOGISTIC & PRODUCTION SRL — producție ambalaje carton/plastic, depozitare și logistică rutieră. Parcul Industrial Ghimbav, Hala 3, Brașov. Hala 2018 (extindere 2023), panouri sandwich, acoperiș cu 150 kWp PV (2025). Vecinătate: stație carburanți la 12m. Utilaje injecție, praf carton, gaz metan, mentenanță stivuitoare (baterii Li-ion). Sprinklere doar depozit; producție fără sprinklere; ISU în reautorizare. Valori: clădire 4.500.000 EUR, echipamente 2.200.000 EUR, stoc mediu 1.200.000 EUR (vârf 2.500.000 EUR). CA 12.000.000 EUR/an. Flotă 15 tractoare semiremorci transport internațional."}},"stream":{"summary":"Stream (SSE) — same scenario","value":{"user_id":1,"api_key":"YOUR_API_KEY","lang":"ro","profile":"expert","response_transport":"stream","conversation_id":"conv_company_001","query":"T.B.T. LOGISTIC & PRODUCTION SRL — producție ambalaje carton/plastic, depozitare și logistică rutieră. Parcul Industrial Ghimbav, Hala 3, Brașov. Hala 2018 (extindere 2023), panouri sandwich, acoperiș cu 150 kWp PV (2025). Vecinătate: stație carburanți la 12m. Utilaje injecție, praf carton, gaz metan, mentenanță stivuitoare (baterii Li-ion). Sprinklere doar depozit; producție fără sprinklere; ISU în reautorizare. Valori: clădire 4.500.000 EUR, echipamente 2.200.000 EUR, stoc mediu 1.200.000 EUR (vârf 2.500.000 EUR). CA 12.000.000 EUR/an. Flotă 15 tractoare semiremorci transport internațional."}}}}}},"responses":{"200":{"description":"Depends on `response_transport`: JSON for sync (or omission); SSE (`text/event-stream`) for stream/sse. On sync, HTTP 200 with `error:0` even when `parse_ok:false` (model output could not be parsed). Validation errors before SSE start are JSON `{ error:1, info }`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InsurancePlanForCompanySyncSuccessResponse"},{"$ref":"#/components/schemas/InsurancePlanForCompanySyncParseErrorResponse"},{"$ref":"#/components/schemas/StandardApiError"}]},"examples":{"syncSuccess":{"summary":"Sync success (parse_ok true)","value":{"error":0,"response_transport":"sync","conversation_id":"conv_company_001","answer_id":"plan_a1b2c3d4e5f6","parse_ok":true,"aiRawResponse":"{\"plan_json\":{...},\"plan_text\":\"...\"}","plan_text":"## Plan de asigurare pentru companie\n\n### Profil companie\n- Companie: T.B.T. LOGISTIC & PRODUCTION SRL\n...","plan_json":{"lang":"ro","assumptions":["Stoc vârf estimat Oct–Dec dacă nu se precizează altfel."],"profile_summary":{"company_name":"T.B.T. LOGISTIC & PRODUCTION SRL","industry":"Producție ambalaje carton/plastic, depozitare și logistică rutieră","legal_form":"SRL","employee_count":0,"primary_location":"Parcul Industrial Ghimbav, Hala 3, jud. Brașov","annual_turnover_eur":12000000,"declared_values_eur":{"buildings":4500000,"equipment":2200000,"stock_avg":1200000,"stock_peak":2500000},"fleet_summary":"15 capete tractor + semiremorci, transport internațional","budget_annual_eur":0},"recommended_layers":[{"layer":"must_have","coverages":[{"coverage_type":"Asigurare clădiri (valoare înlocuire)","recommended_level":"standard","suggested_sum_insured_range_eur":{"min_eur":4500000,"max_eur":4500000},"deductible_suggestion":"medium","why":"Valoare declarată clădire integrală; construcție mixtă cu zone combustibile."}]}],"budget_fit":{"status":"unknown","notes":"Buget anual neprecizat în cerere."},"questions_to_finalize":["Confirmare număr angajați și acoperire sănătate grup."],"warnings":["Producție fără sprinklere; ISU în reautorizare; vecinătate stație carburanți 12 m."],"disclaimer":"Structură orientativă pentru broker; nu este ofertă fermă."}}},"syncParseError":{"summary":"Sync parse failure (parse_ok false)","value":{"error":0,"response_transport":"sync","conversation_id":"conv_company_001","answer_id":"plan_a1b2c3d4e5f6","parse_ok":false,"aiRawResponse":"{ invalid json","plan_text":"Nu am putut genera un plan de asigurare pentru companie în acest moment. Te rugăm să încerci din nou (poți folosi profilul speed dacă expertul eșuează).","parse_error":"Invalid JSON: Unexpected token"}}}},"text/event-stream":{"schema":{"type":"string","description":"Server-Sent Events. `complete` payload matches InsurancePlanForCompanyStreamCompleteSuccess, InsurancePlanForCompanyStreamCompleteParseError, or InsurancePlanForCompanyStreamCompleteError."},"examples":{"streamFlow":{"summary":"Typical flow (conceptual)","value":"event: meta\ndata: {\"response_transport\":\"stream\"}\n\nevent: plan_text_delta\ndata: {\"text\":\"## Plan de asigurare pentru companie\"}\n\nevent: plan_text_delta\ndata: {\"text\":\"\\n\\n### Profil companie\"}\n\n... event: complete\ndata: {\"error\":0,\"response_transport\":\"stream\",\"parse_ok\":true,\"conversation_id\":\"conv_company_001\",\"answer_id\":\"plan_...\",\"plan_text\":\"...\",\"plan_json\":{...}}"}}}}},"400":{"description":"Invalid body / validation failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"query is too short; describe the company, location, assets, risks, fleet, employees, or budget"}}}},"403":{"description":"Forbidden: API key mismatch, client IP not allowed, or this operation is not enabled for the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Forbidden for IP 192.0.2.1: user_id 1 has no access to insurance plan generation (insurancePlanForDomestic / insurancePlanForCompany)"}}}},"500":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StandardApiError"},"example":{"error":1,"info":"Internal server error"}}}}}}}},"components":{"schemas":{"StandardApiError":{"type":"object","required":["error","info"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[1],"description":"Fixed value `1` for this API's error envelope.","example":1},"info":{"type":"string","description":"Human-readable reason (English or Romanian depending on the message source)."}}},"PostAuthBase":{"type":"object","required":["user_id","api_key"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"}}},"ResponseTransportInput":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"CompareResponseTransportInput":{"type":"string","enum":["sync","stream"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`) with `meta`, token deltas, and `complete`."},"GetInfoByVin_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["vin"],"properties":{"vin":{"type":"string","description":"VIN, 17 characters","example":"WVWZZZ1JZ3W386752"},"VIN":{"type":"string","description":"Alias for `vin`"}}}]},"GetInfoByPlate_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["plate"],"properties":{"plate":{"type":"string","example":"B123ABC"},"registrationPlate":{"type":"string","description":"Alias for `plate`"}}}]},"GetCompanyInfo_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["cui"],"properties":{"cui":{"type":"string","description":"Tax ID (digits only)","example":"12345678"},"taxCode":{"type":"string","description":"Alias for `cui`"},"CUI":{"type":"string","description":"Alias for `cui`"},"showFinancial":{"type":"integer","enum":[0,1],"description":"1 = include financial data"},"show_financial":{"type":"integer","enum":[0,1]},"showPhones":{"type":"integer","enum":[0,1]},"show_phones":{"type":"integer","enum":[0,1]},"showEmails":{"type":"integer","enum":[0,1]},"show_emails":{"type":"integer","enum":[0,1]},"showAdmins":{"type":"integer","enum":[0,1]},"show_admins":{"type":"integer","enum":[0,1]},"showAdmin":{"type":"integer","enum":[0,1]},"show_admin":{"type":"integer","enum":[0,1]},"showWebsites":{"type":"integer","enum":[0,1]},"show_websites":{"type":"integer","enum":[0,1]},"showCourtCases":{"type":"integer","enum":[0,1]},"show_court_cases":{"type":"integer","enum":[0,1]}}}]},"GetAnafCompanyInfo_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["cui"],"properties":{"cui":{"type":"string","description":"Tax ID (digits only)","example":"13081201"},"taxCode":{"type":"string","description":"Alias for `cui`"},"CUI":{"type":"string","description":"Alias for `cui`"},"data":{"type":"string","format":"date","description":"Query date (YYYY-MM-DD). Defaults to today (Europe/Bucharest).","example":"2026-06-03"},"query_date":{"type":"string","format":"date","description":"Alias for `data`"},"queryDate":{"type":"string","format":"date","description":"Alias for `data`"}}}]},"AnafCompanyInfoAddress":{"type":"object","additionalProperties":false,"properties":{"street":{"type":"string","nullable":true},"street_no":{"type":"string","nullable":true},"locality":{"type":"string","nullable":true},"locality_code":{"type":"string","nullable":true},"county":{"type":"string","nullable":true},"county_code":{"type":"string","nullable":true},"county_auto":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"details":{"type":"string","nullable":true}}},"AnafCompanyInfoVatPeriod":{"type":"object","additionalProperties":false,"properties":{"start_date":{"type":"string","nullable":true},"end_date":{"type":"string","nullable":true},"cancel_effective_date":{"type":"string","nullable":true},"message":{"type":"string","nullable":true}}},"AnafCompanyInfoVatCollection":{"type":"object","additionalProperties":false,"properties":{"active":{"type":"boolean"},"start_date":{"type":"string","nullable":true},"end_date":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"published_at":{"type":"string","nullable":true},"act_type":{"type":"string","nullable":true}}},"AnafCompanyInfoInactive":{"type":"object","additionalProperties":false,"properties":{"is_inactive":{"type":"boolean"},"inactivated_at":{"type":"string","nullable":true},"reactivated_at":{"type":"string","nullable":true},"published_at":{"type":"string","nullable":true},"deregistered_at":{"type":"string","nullable":true}}},"AnafCompanyInfoSplitVat":{"type":"object","additionalProperties":false,"properties":{"active":{"type":"boolean"},"start_date":{"type":"string","nullable":true},"cancelled_at":{"type":"string","nullable":true}}},"GetAnafCompanyInfo_roResponseFound":{"type":"object","required":["error","found","query_date","cui","name","debts"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[0]},"found":{"type":"boolean","enum":[true]},"query_date":{"type":"string","format":"date","example":"2026-06-03"},"cui":{"type":"string","example":"13081201"},"name":{"type":"string","description":"ANAF denumire"},"address":{"type":"string","nullable":true,"description":"ANAF adresa (domiciliu fiscal, text)"},"phone":{"type":"string","nullable":true},"fax":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"reg_no":{"type":"string","nullable":true,"description":"Nr. Registrul Comerțului"},"caen":{"type":"string","nullable":true},"registration_status":{"type":"string","nullable":true,"description":"stare_inregistrare"},"registration_date":{"type":"string","nullable":true},"legal_form":{"type":"string","nullable":true},"organization_form":{"type":"string","nullable":true},"ownership_form":{"type":"string","nullable":true},"competent_tax_authority":{"type":"string","nullable":true},"iban":{"type":"string","nullable":true},"ro_e_invoice":{"type":"boolean","description":"În Registrul RO e-Factura la data interogării"},"vat_payer":{"type":"boolean","description":"Platitor TVA la data interogării"},"vat_periods":{"type":"array","items":{"$ref":"#/components/schemas/AnafCompanyInfoVatPeriod"}},"vat_collection":{"$ref":"#/components/schemas/AnafCompanyInfoVatCollection"},"inactive":{"$ref":"#/components/schemas/AnafCompanyInfoInactive"},"split_vat":{"$ref":"#/components/schemas/AnafCompanyInfoSplitVat"},"registered_office":{"$ref":"#/components/schemas/AnafCompanyInfoAddress"},"fiscal_domicile":{"$ref":"#/components/schemas/AnafCompanyInfoAddress"},"debts":{"$ref":"#/components/schemas/Anaf_debts_roResponse","description":"Restanțe publice ANAF (snapshot importat local din cron zilnic)."}}},"GetAnafCompanyInfo_roResponseNotFound":{"type":"object","required":["error","found","query_date","cui","info","debts"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[0]},"found":{"type":"boolean","enum":[false]},"query_date":{"type":"string","format":"date","example":"2026-06-03"},"cui":{"type":"string","example":"99999999"},"info":{"type":"string","example":"CUI not found in ANAF registry at query date."},"debts":{"$ref":"#/components/schemas/Anaf_debts_roResponse"}}},"GetAnafCompanyInfo_roResponseUpstreamError":{"type":"object","required":["error","info","anaf_unavailable","debts"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[1]},"info":{"type":"string","example":"Serviciul ANAF (Platitor TVA) nu răspunde momentan. Încearcă din nou peste câteva minute.","description":"PlatitorTvaRest unreachable; HTTP 502; `debts` may still be populated from local DB"},"anaf_unavailable":{"type":"boolean","enum":[true]},"debts":{"$ref":"#/components/schemas/Anaf_debts_roResponse"}}},"GetAnafCompanyInfo_roResponse":{"oneOf":[{"$ref":"#/components/schemas/GetAnafCompanyInfo_roResponseFound"},{"$ref":"#/components/schemas/GetAnafCompanyInfo_roResponseNotFound"},{"$ref":"#/components/schemas/GetAnafCompanyInfo_roResponseUpstreamError"}]},"GetAnafCompanyFinance_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["cui"],"properties":{"cui":{"type":"string","description":"Tax ID (digits only, max 10). Same validation as `/getAnafCompanyInfo_ro`.","example":"481206"},"taxCode":{"type":"string","description":"Alias for `cui`"},"CUI":{"type":"string","description":"Alias for `cui`"},"years":{"oneOf":[{"type":"integer","minimum":1990,"maximum":2100,"example":2023},{"type":"array","items":{"type":"integer","minimum":1990,"maximum":2100},"example":[2024,2023,2022]}],"description":"Fiscal year(s). Omit to request the last **5** calendar years (newest first). Aliases: `an`, `year` for a single year. Longer lists are truncated to the service maximum."},"an":{"type":"integer","minimum":1990,"maximum":2100,"description":"Alias for single `years` value"},"year":{"type":"integer","minimum":1990,"maximum":2100,"description":"Alias for single `years` value"}}}]},"AnafBilantIndicatorCode":{"type":"string","enum":["I1","I2","I3","I4","I5","I6","I7","I8","I9","I10","I11","I12","I13","I14","I15","I16","I17","I18","I19","I20"],"description":"ANAF bilanț indicator code (WS Bilant V1). See `AnafBilantIndicatorCatalog`."},"AnafBilantIndicatorCatalog":{"type":"object","description":"Read-only reference — not returned by the API; documents `indicators[].code` meanings.","additionalProperties":false,"properties":{"I1":{"type":"string","const":"Active imobilizate — total","description":"Active imobilizate — total"},"I2":{"type":"string","const":"Active circulante — total","description":"Active circulante — total"},"I3":{"type":"string","const":"Stocuri","description":"Stocuri"},"I4":{"type":"string","const":"Creanțe","description":"Creanțe"},"I5":{"type":"string","const":"Casa și conturi la bănci","description":"Casa și conturi la bănci"},"I6":{"type":"string","const":"Cheltuieli în avans","description":"Cheltuieli în avans"},"I7":{"type":"string","const":"Datorii","description":"Datorii"},"I8":{"type":"string","const":"Venituri în avans","description":"Venituri în avans"},"I9":{"type":"string","const":"Provizioane","description":"Provizioane"},"I10":{"type":"string","const":"Capitaluri — total","description":"Capitaluri — total"},"I11":{"type":"string","const":"Capital subscris vărsat","description":"Capital subscris vărsat"},"I12":{"type":"string","const":"Patrimoniul regiei","description":"Patrimoniul regiei"},"I13":{"type":"string","const":"Cifra de afaceri netă","description":"Cifra de afaceri netă"},"I14":{"type":"string","const":"Venituri totale","description":"Venituri totale"},"I15":{"type":"string","const":"Cheltuieli totale","description":"Cheltuieli totale"},"I16":{"type":"string","const":"Profit brut","description":"Profit brut"},"I17":{"type":"string","const":"Pierdere brută","description":"Pierdere brută"},"I18":{"type":"string","const":"Profit net","description":"Profit net"},"I19":{"type":"string","const":"Pierdere netă","description":"Pierdere netă"},"I20":{"type":"string","const":"Număr mediu de salariați","description":"Număr mediu de salariați"}}},"AnafBilantIndicator":{"type":"object","additionalProperties":false,"required":["code","value","label"],"properties":{"code":{"$ref":"#/components/schemas/AnafBilantIndicatorCode"},"value":{"type":"number","example":1263653,"description":"Amount in RON (lei), except **I20** (average employee count)."},"label":{"type":"string","example":"Cifra de afaceri neta","description":"Romanian label as returned by ANAF (`val_den_indicator`)."}}},"AnafBilantYearReport":{"type":"object","additionalProperties":false,"required":["an","found","from_cache"],"properties":{"an":{"type":"integer","example":2023,"description":"Fiscal year requested from ANAF (`an` query parameter)."},"found":{"type":"boolean","description":"`true` when ANAF returned a company name and/or at least one indicator; `false` when bilanț was not filed / not published for this CUI and year."},"from_cache":{"type":"boolean","description":"`true` when the year was served from cache; `false` after a fresh fetch."},"name":{"type":"string","nullable":true,"example":"CISCOM EXPO 92 SRL","description":"Company name from ANAF (`deni`) when `found: true`."},"caen":{"type":"integer","nullable":true,"example":4120,"description":"CAEN code from bilanț when `found: true`."},"caen_description":{"type":"string","nullable":true,"example":"Lucrari de constructii a cladirilor rezidentiale si nerezidentiale","description":"CAEN description (`den_caen`) when `found: true`."},"indicators":{"type":"array","description":"Balance-sheet indicators I1–I20 when `found: true`. Order matches ANAF. Values in RON except I20.","items":{"$ref":"#/components/schemas/AnafBilantIndicator"}},"info":{"type":"string","description":"Human-readable note when `found: false` (no bilanț) or when `fetch_failed: true` (per-year fetch error).","example":"No ANAF bilant record for this CUI and fiscal year."},"fetch_failed":{"type":"boolean","description":"Per-year fetch failure (timeout, HTTP error, rate limit). Other years in the same response may still succeed."}}},"GetAnafCompanyFinance_roResponseSuccess":{"type":"object","required":["error","cui","years"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[0]},"cui":{"type":"string","example":"481206","description":"Normalized CUI (digits only)."},"years":{"type":"array","description":"One entry per requested fiscal year, newest first when using the default year window.","items":{"$ref":"#/components/schemas/AnafBilantYearReport"}}}},"GetAnafCompanyFinance_roResponseUpstreamError":{"type":"object","required":["error","info","anaf_unavailable","cui","years"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[1]},"info":{"type":"string","example":"Serviciul ANAF (bilanț) nu răspunde momentan. Încearcă din nou peste câteva minute.","description":"Romanian user-facing message when at least one live ANAF fetch failed."},"anaf_unavailable":{"type":"boolean","enum":[true]},"cui":{"type":"string","example":"481206"},"years":{"type":"array","description":"Per-year rows; each live fetch that failed has `fetch_failed: true`.","items":{"$ref":"#/components/schemas/AnafBilantYearReport"}}}},"GetAnafCompanyFinance_roResponse":{"oneOf":[{"$ref":"#/components/schemas/GetAnafCompanyFinance_roResponseSuccess"},{"$ref":"#/components/schemas/GetAnafCompanyFinance_roResponseUpstreamError"},{"$ref":"#/components/schemas/StandardApiError"}]},"GetCourtCases_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":3,"description":"**Required.** Company legal name as it appears as a court party. Aliases: `companyName`, `company_name`, `denumire`.","example":"BORG DESIGN SRL"},"companyName":{"type":"string","minLength":3,"description":"Alias for `name`"},"company_name":{"type":"string","minLength":3,"description":"Alias for `name`"},"denumire":{"type":"string","minLength":3,"description":"Alias for `name`"},"includeDetails":{"type":"integer","enum":[0,1],"description":"1 = include `parties`, `hearings`, `appeals` per case (default **0** = summary rows only). Aliases: `include_details`, `showDetails`, `show_details`."},"include_details":{"type":"integer","enum":[0,1]},"showDetails":{"type":"integer","enum":[0,1]},"show_details":{"type":"integer","enum":[0,1]},"force_refresh":{"type":"integer","enum":[0,1],"description":"1 = bypass cache and fetch fresh results. Aliases: `forceRefresh`, `refresh`."},"forceRefresh":{"type":"integer","enum":[0,1]},"refresh":{"type":"integer","enum":[0,1]}}}]},"JustCourtCaseSummary":{"type":"object","additionalProperties":false,"required":["caseNumber","institution"],"properties":{"caseNumber":{"type":"string","example":"25799/299/2024"},"numarVechi":{"type":"string","nullable":true},"date":{"type":"string","nullable":true,"description":"Case registration datetime (ISO from just.ro)."},"lastUpdate":{"type":"string","nullable":true,"description":"Last modification datetime from just.ro."},"institution":{"type":"string","example":"Judecatoria Sectorul 1 Bucuresti"},"department":{"type":"string","nullable":true},"caseCategory":{"type":"string","nullable":true},"caseCategoryName":{"type":"string","nullable":true},"proceduralStage":{"type":"string","nullable":true},"proceduralStageName":{"type":"string","nullable":true},"subject":{"type":"string","nullable":true},"partyStatus":{"type":"string","nullable":true,"description":"Procedural role of the matched company party in this case.","example":"Pârât"},"companyName":{"type":"string","nullable":true,"description":"Matched party name as registered at the court."}}},"JustCourtCaseParty":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string"},"role":{"type":"string","nullable":true}}},"JustCourtCaseHearing":{"type":"object","additionalProperties":false,"properties":{"date":{"type":"string","nullable":true},"time":{"type":"string","nullable":true},"panel":{"type":"string","nullable":true},"solution":{"type":"string","nullable":true},"solutionSummary":{"type":"string","nullable":true},"pronouncementDate":{"type":"string","nullable":true},"documentType":{"type":"string","nullable":true},"documentNumber":{"type":"string","nullable":true},"documentDate":{"type":"string","nullable":true}}},"JustCourtCaseAppeal":{"type":"object","additionalProperties":false,"properties":{"declaredAt":{"type":"string","nullable":true},"declaringParty":{"type":"string","nullable":true},"type":{"type":"string","nullable":true}}},"JustCourtCaseDetail":{"allOf":[{"$ref":"#/components/schemas/JustCourtCaseSummary"},{"type":"object","additionalProperties":false,"properties":{"parties":{"type":"array","items":{"$ref":"#/components/schemas/JustCourtCaseParty"}},"hearings":{"type":"array","items":{"$ref":"#/components/schemas/JustCourtCaseHearing"}},"appeals":{"type":"array","items":{"$ref":"#/components/schemas/JustCourtCaseAppeal"}}}}]},"GetCourtCases_roResponseSuccess":{"type":"object","additionalProperties":false,"required":["error","found","name","searchName","from_cache","totalCases","truncated","includeDetails","portalUrl","cases"],"properties":{"error":{"type":"integer","enum":[0]},"found":{"type":"boolean","description":"`true` when at least one court case was returned for the party name search."},"name":{"type":"string","example":"BORG DESIGN SRL","description":"Normalized party name from the request (echo)."},"companyName":{"type":"string","nullable":true,"description":"Same as `name` — display label for the searched company."},"searchName":{"type":"string","description":"Search term actually used (may be a shortened fallback of `name`)."},"from_cache":{"type":"boolean","description":"`true` when served from cache; `false` after a fresh fetch."},"cached_at":{"type":"string","format":"date-time","nullable":true,"description":"Present when `from_cache: true`."},"totalCases":{"type":"integer","minimum":0},"truncated":{"type":"boolean","description":"`true` when results were truncated at the source API cap (~1000 cases)."},"includeDetails":{"type":"boolean"},"portalUrl":{"type":"string","example":"https://portal.just.ro","description":"Public portal URL for manual lookup. Per-case deep links are not provided."},"cases":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/JustCourtCaseSummary"},{"$ref":"#/components/schemas/JustCourtCaseDetail"}]}}}},"GetCourtCases_roResponseUpstreamError":{"type":"object","additionalProperties":false,"required":["error","info","just_unavailable","name"],"properties":{"error":{"type":"integer","enum":[1]},"info":{"type":"string","example":"Serviciul instanțelor nu răspunde momentan. Încearcă din nou peste câteva minute."},"just_unavailable":{"type":"boolean","enum":[true]},"name":{"type":"string","example":"BORG DESIGN SRL"}}},"GetCourtCases_roResponse":{"oneOf":[{"$ref":"#/components/schemas/GetCourtCases_roResponseSuccess"},{"$ref":"#/components/schemas/GetCourtCases_roResponseUpstreamError"},{"$ref":"#/components/schemas/StandardApiError"}]},"IdentificarePad_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["cnpCuiAsigurat","judet","localitate"],"properties":{"cnpCuiAsigurat":{"type":"string","description":"CNP (PF) or CUI (PJ) of the insured. Aliases: `cnpCui`, `cnp`, `cui`.","example":""},"cnpCui":{"type":"string","description":"Alias for `cnpCuiAsigurat`"},"cnp":{"type":"string","description":"Alias for `cnpCuiAsigurat`"},"cui":{"type":"string","description":"Alias for `cnpCuiAsigurat`"},"judet":{"type":"string","description":"PAID county code (e.g. S4 for București sector 4, IF, BV). For București, use S1–S6; you may also send county/locality with sector and the API normalizes to judet=S* + localitate=Bucuresti. Aliases: `countyCode`, `county`, `judetCod`.","example":"S4"},"countyCode":{"type":"string","description":"Alias for `judet`"},"county":{"type":"string","description":"Alias for `judet`"},"judetCod":{"type":"string","description":"Alias for `judet`"},"localitate":{"type":"string","description":"PAID locality. For București always normalized to `Bucuresti`; sector goes in `judet` (S1–S6). Aliases: `locality`, `city`.","example":"Bucuresti"},"sector":{"type":"string","description":"Optional Bucharest sector hint when judet/locality use county names (e.g. `Sector 4`, `4`). Aliases: `sectorNumber`, `district`, `sectorul`.","example":"4"},"sectorNumber":{"type":"string","description":"Alias for `sector`"},"district":{"type":"string","description":"Alias for `sector`"},"sectorul":{"type":"string","description":"Alias for `sector`"},"city":{"type":"string","description":"Alias for `localitate`"},"locality":{"type":"string","description":"Alias for `localitate`"},"referenceDate":{"type":"string","description":"Alias for `dataRef`"},"data_ref":{"type":"string","description":"Alias for `dataRef`"},"serie_polita":{"type":"string","description":"Alias for `seriePaid`"},"policySeries":{"type":"string","description":"Alias for `seriePaid`"},"numarPolita":{"type":"string","description":"Alias for `nrPaid`"},"policyNumber":{"type":"string","description":"Alias for `nrPaid`"},"email_emitent":{"type":"string","description":"Alias for `emailEmitent`"},"dataRef":{"type":"string","description":"Reference date (YYYY-MM-DD). Aliases: `referenceDate`, `data_ref`."},"seriePaid":{"type":"string","description":"Optional PAD policy series filter. Aliases: `serie_polita`, `policySeries`."},"nrPaid":{"type":"string","description":"Optional PAD policy number filter. Aliases: `numarPolita`, `policyNumber`."},"emailEmitent":{"type":"string","description":"Optional issuer email override. Aliases: `email_emitent`."}}}]},"PadIdentificationPolicy":{"type":"object","additionalProperties":false,"properties":{"idTichet":{"type":"string","nullable":true,"description":"Ticket id from the PAD service."},"numarPolita":{"type":"string","nullable":true,"example":"00242946181"},"seriePolita":{"type":"string","nullable":true,"example":"RA-065"},"dataStartValabilitatePolita":{"type":"string","nullable":true,"example":"2025-09-14T00:00:00","description":"Policy validity start (ISO datetime from upstream PAD service)."},"dataStopValabilitatePolita":{"type":"string","nullable":true,"example":"2026-09-13T00:00:00"},"dataPolita":{"type":"string","nullable":true,"example":"2025-09-10T00:00:00"},"tipCladire":{"type":"string","nullable":true,"example":"A","description":"Building type code on the PAD policy."},"judet":{"type":"string","nullable":true,"example":"B4","description":"PAID county code on the policy (response may use B* for București sectors)."},"localitate":{"type":"string","nullable":true,"example":"Bucuresti"},"codPostal":{"type":"string","nullable":true,"example":"041511"},"strada":{"type":"string","nullable":true,"example":"Secuilor"},"tipStrada":{"type":"string","nullable":true,"example":"Strada"},"numar":{"type":"string","nullable":true,"example":"1A"},"bloc":{"type":"string","nullable":true,"example":"2"},"scara":{"type":"string","nullable":true,"example":"2"},"apartament":{"type":"string","nullable":true,"example":"29"},"dataStopAcoperirePolita":{"type":"string","nullable":true,"example":"2026-09-13T00:00:00"},"politaProprie":{"type":"boolean","nullable":true,"description":"`true` when the policy belongs to the broker account (PolitaProprie)."}}},"IdentificarePad_roResponseSuccess":{"type":"object","additionalProperties":false,"required":["error","found","count","policies"],"properties":{"error":{"type":"integer","enum":[0]},"info":{"type":"string","nullable":true,"description":"Null on success when policies found; message when `found: 0`."},"found":{"type":"integer","enum":[0,1],"description":"1 when at least one PAD policy matches the search criteria."},"count":{"type":"integer","minimum":0,"description":"Number of policies in `policies[]`."},"policies":{"type":"array","items":{"$ref":"#/components/schemas/PadIdentificationPolicy"}}}},"IdentificarePad_roResponseUpstreamError":{"type":"object","additionalProperties":false,"required":["error","info","found","count","policies"],"properties":{"error":{"type":"integer","enum":[1]},"info":{"type":"string","example":"Eroare la conexiunea cu serviciul PAD","description":"Validation, SOAP fault, or upstream connection error."},"found":{"type":"integer","enum":[0]},"count":{"type":"integer","enum":[0]},"policies":{"type":"array","items":{"type":"object"},"maxItems":0}}},"IdentificarePad_roResponse":{"oneOf":[{"$ref":"#/components/schemas/IdentificarePad_roResponseSuccess"},{"$ref":"#/components/schemas/IdentificarePad_roResponseUpstreamError"},{"$ref":"#/components/schemas/StandardApiError"}]},"GetCompanyInfo_byName_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":3,"description":"Company name search query (min. 3 characters)","example":"POOL ASIGURARE"},"companyName":{"type":"string","minLength":3,"description":"Alias for `name`"},"q":{"type":"string","minLength":3,"description":"Alias for `name`"}}}]},"GetCompanyInfo_byName_roMatch":{"type":"object","properties":{"taxCode":{"type":"string","description":"CUI (tax ID)"},"name":{"type":"string","description":"Company legal name"},"regNo":{"type":"string","description":"Trade register number (J…)"},"companyType":{"type":"string","example":"SA"},"status":{"type":"string","example":"functiune"},"city":{"type":"string"},"county":{"type":"string"}}},"GetCompanyInfo_byName_roResponse":{"type":"object","properties":{"error":{"type":"integer","enum":[0,1]},"info":{"type":"string"},"found":{"type":"boolean"},"query":{"type":"string"},"count":{"type":"integer"},"matches":{"type":"array","items":{"$ref":"#/components/schemas/GetCompanyInfo_byName_roMatch"}}}},"GetUboInfo_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["cui"],"properties":{"cui":{"type":"string","example":"12345678"},"taxCode":{"type":"string"},"CUI":{"type":"string"}}}]},"Anaf_debts_roTotals":{"type":"object","additionalProperties":false,"properties":{"state":{"type":"number","nullable":true,"description":"Total restante buget de stat (RON)"},"social_insurance":{"type":"number","nullable":true,"description":"Total CAS (RON)"},"unemployment":{"type":"number","nullable":true,"description":"Total șomaj (RON)"},"health":{"type":"number","nullable":true,"description":"Total sănătate / CASS (RON)"}}},"Anaf_debts_roResponseHit":{"type":"object","required":["error","found","published_at","cui","debtor_name","debtor_type","totals"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[0]},"found":{"type":"boolean","enum":[true]},"published_at":{"type":"string","format":"date","description":"Snapshot date of the imported ANAF restanțe list","example":"2026-03-31"},"cui":{"type":"string","example":"13081201"},"debtor_name":{"type":"string","example":"ITALIA TOBACCO PRODUCTION S.R.L."},"debtor_type":{"type":"string","enum":["pj","pf","unknown"],"example":"pj"},"status":{"type":"string","nullable":true,"description":"Coloana ANAF „Observații” (ex. Faliment, Insolvabil)","example":"Faliment"},"totals":{"$ref":"#/components/schemas/Anaf_debts_roTotals"}}},"Anaf_debts_roResponseMiss":{"type":"object","required":["error","found","published_at","cui","info"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[0]},"found":{"type":"boolean","enum":[false]},"published_at":{"type":"string","format":"date","example":"2026-03-31"},"cui":{"type":"string","example":"26191737"},"info":{"type":"string","description":"Not on the published list at `published_at` — does not prove zero debt","example":"Nu apare pe lista publică ANAF la data indicată. Nu confirmă absența datoriilor — doar că nu este publicat peste plafon."}}},"Anaf_debts_roResponseNoImport":{"type":"object","required":["error","info"],"additionalProperties":false,"properties":{"error":{"type":"integer","enum":[1]},"info":{"type":"string","example":"Nu există încă o ediție ANAF importată."}}},"Anaf_debts_roResponse":{"oneOf":[{"$ref":"#/components/schemas/Anaf_debts_roResponseHit"},{"$ref":"#/components/schemas/Anaf_debts_roResponseMiss"},{"$ref":"#/components/schemas/Anaf_debts_roResponseNoImport"}]},"GetArrCompanyInfoById_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","properties":{"arr_id":{"type":"string","description":"Public ID from `https://licente.arr.ro/publica/{id}` (aliases: `id`, `arr_public_id`)","example":"12345"},"id":{"type":"string","description":"Alias for `arr_id`"},"arr_public_id":{"type":"string"},"arrPublicId":{"type":"string"}}}]},"CheckCnp_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["cnp"],"properties":{"cnp":{"type":"string","description":"13 digits","example":"1800101019999"},"CNP":{"type":"string"}}}]},"CheckSanctionsRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","example":"Ionel Popisteanu"},"sub_user_id":{"type":"string","description":"Broker ID (optional)"},"subUserId":{"type":"string"},"surname":{"type":"string"},"Surname":{"type":"string"},"aka":{"type":"string"},"AKA":{"type":"string"},"min_score":{"type":"integer","default":90},"minScore":{"type":"integer"},"max_result":{"type":"integer","default":10},"maxResult":{"type":"integer"}}}]},"GetAddressCounties_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","properties":{}}]},"GetAddressCities_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["county"],"properties":{"county":{"type":"string","example":"Alba"},"County":{"type":"string"}}}]},"GetAddressStreets_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["county","city","q"],"properties":{"county":{"type":"string","example":"Alba"},"County":{"type":"string"},"city":{"type":"string","example":"Alba Iulia"},"City":{"type":"string"},"q":{"type":"string","description":"Street name prefix (recommended ≥2 chars)","example":"Horea"},"Q":{"type":"string"}}}]},"GetAddressZip_roRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["city","street","number"],"properties":{"city":{"type":"string","example":"Alba Iulia"},"City":{"type":"string"},"street":{"type":"string","example":"Bulevard Horea"},"Street":{"type":"string"},"number":{"type":"integer","minimum":0,"example":10},"Number":{"type":"integer"},"hasAlphaSuffix":{"type":"boolean","description":"House number has letter suffix (e.g. 10A)","example":false},"HasAlphaSuffix":{"type":"boolean"}}}]},"GeminiTokenUsageFields":{"type":"object","description":"Gemini `usageMetadata` token axes (snake_case). Returned by AI routes that call Gemini (e.g. `POST /parseAddress`, compare offers stream `complete`, insurance plan). Use for billing visibility; clients may sum `tokens_in` / `tokens_out` across calls.","properties":{"tokens_in":{"type":"integer","minimum":0,"description":"Prompt / input tokens (`usageMetadata.promptTokenCount`).","example":412},"tokens_out":{"type":"integer","minimum":0,"description":"Completion / output tokens (`usageMetadata.candidatesTokenCount`).","example":89},"tokens_used":{"type":"integer","minimum":0,"description":"Total tokens for this Gemini call (`usageMetadata.totalTokenCount`, or `tokens_in + tokens_out` when total is unset).","example":501}},"required":["tokens_in","tokens_out","tokens_used"]},"ParseAddressRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["address"],"properties":{"address":{"type":"string","description":"Free-text postal address (EU / UK / NO / CH) to split into atomic fields","example":"Bucuresti Aleea secuilor 1a sector 4"},"Address":{"type":"string"}}}]},"ParseAddressResponse":{"allOf":[{"type":"object","required":["address_input","address_parsed"],"properties":{"address_input":{"type":"string","description":"Echo of request `address`"},"address_parsed":{"$ref":"#/components/schemas/ParsedAddress"}}},{"$ref":"#/components/schemas/GeminiTokenUsageFields"}],"description":"Parsed atomic address plus token usage for the parse call. Token fields are `0` when parsing falls back to raw `formatted_query`."},"GetBuildingByAddressRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["address_parsed"],"properties":{"address_parsed":{"$ref":"#/components/schemas/ParsedAddress","description":"**Required.** Atomic fields from `POST /parseAddress` (or your own parser). Used for geocoding and EUBUCCO spatial match."},"addressParsed":{"$ref":"#/components/schemas/ParsedAddress"},"address":{"type":"string","description":"Optional original free-text for audit / `address_input` in the response","example":"Bucuresti Aleea secuilor 1a sector 4"},"Address":{"type":"string"},"radius_m":{"type":"number","minimum":25,"maximum":300,"default":150,"description":"Search radius (m): nearest-building fallback, and max distance for `candidates[]` when `include_candidates` is true. Clamped to 25–300 (campus/site coverage saturates by ~300 m; denser areas are limited by candidates_limit)."},"radiusM":{"type":"number"},"include_footprint":{"type":"boolean","default":true,"description":"Include building footprint as GeoJSON (WGS84) in `map.building_footprint` (and on each candidate when listing)"},"includeFootprint":{"type":"boolean"},"include_candidates":{"type":"boolean","default":false,"description":"When true, return `candidates[]` — buildings within `radius_m` (contains preferred, then nearest). Use for FE disambiguation on multi-building sites."},"includeCandidates":{"type":"boolean"},"candidates_limit":{"type":"integer","minimum":1,"maximum":25,"default":12,"description":"Max length of `candidates[]` (capped at 25)"},"candidatesLimit":{"type":"integer"},"building_id":{"type":"string","description":"Pin a specific EUBUCCO building id after geocode/partition (skips spatial auto-pick). Use after the user selects a candidate.","example":"8671c18424e64c04-0"},"buildingId":{"type":"string"},"geocoder":{"type":"string","enum":["photon","nominatim"],"default":"photon","description":"Geocoding provider for `address_parsed.formatted_query`. Photon is default; Nominatim adds ~1 s delay."},"Geocoder":{"type":"string","enum":["photon","nominatim"]}}}]},"ParsedAddress":{"type":"object","description":"Atomic address components returned by `POST /parseAddress` or supplied by the client. Country (`country`, `country_code`) is extracted from the string or inferred from locality (e.g. București → RO / Romania).","example":{"country_code":"RO","country":"Romania","city":"București","district":"Sector 4","street":"Aleea Secuilor","street_number":"1A","postcode":null,"formatted_query":"1A Aleea Secuilor, Sector 4, București, Romania","bounding_box":{"min_lat":43.62,"min_lon":20.26,"max_lat":48.27,"max_lon":29.75}},"properties":{"country_code":{"type":"string","nullable":true,"example":"RO","description":"ISO 3166-1 alpha-2 uppercase; from input or inferred from city/region"},"country":{"type":"string","nullable":true,"example":"Romania","description":"Full country name in English; from input or inferred when not spelled out"},"city":{"type":"string","nullable":true,"example":"București"},"district":{"type":"string","nullable":true,"example":"Sector 4","description":"Sector, arrondissement, borough, or similar subdivision"},"street":{"type":"string","nullable":true,"example":"Aleea Secuilor","description":"Street name without house number"},"street_number":{"type":"string","nullable":true,"example":"1A"},"postcode":{"type":"string","nullable":true,"example":"041516","description":"Only when present in input"},"formatted_query":{"type":"string","nullable":true,"example":"1A Aleea Secuilor, Sector 4, București, Romania","description":"Single-line query sent to Photon/Nominatim (includes country when known)"},"bounding_box":{"$ref":"#/components/schemas/CountryBoundingBox","nullable":true,"description":"WGS84 geographic extent of the detected country"}}},"CountryBoundingBox":{"type":"object","description":"Country bounding box in WGS84 (southwest → northeast corners)","properties":{"min_lat":{"type":"number","example":43.62,"description":"Southern latitude (SW corner)"},"min_lon":{"type":"number","example":20.26,"description":"Western longitude (SW corner)"},"max_lat":{"type":"number","example":48.27,"description":"Northern latitude (NE corner)"},"max_lon":{"type":"number","example":29.75,"description":"Eastern longitude (NE corner)"}}},"EubuccoGeocoding":{"type":"object","properties":{"query":{"type":"string"},"provider":{"type":"string","enum":["photon","nominatim"]},"display_name":{"type":"string"},"lat":{"type":"number"},"lon":{"type":"number"},"osm_type":{"type":"string","nullable":true},"osm_id":{"oneOf":[{"type":"string"},{"type":"integer"}],"nullable":true},"class":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"country_code":{"type":"string","nullable":true}}},"EubuccoBuilding":{"type":"object","description":"Matched EUBUCCO v0.2 building record (ML/OSM attributes; see `*_source` / `*_confidence` in full response)","properties":{"id":{"type":"string"},"region_id":{"type":"string"},"city_id":{"type":"string"},"type":{"type":"string","nullable":true},"subtype":{"type":"string","nullable":true},"height_m":{"type":"number","nullable":true},"floors":{"type":"number","nullable":true},"construction_year":{"type":"integer","nullable":true},"distance_m":{"type":"number","description":"Distance from geocoded point to footprint (m)"},"match_mode":{"type":"string","enum":["contains","nearest"],"description":"`contains` = point inside footprint; `nearest` = closest within `radius_m`"},"footprint_area_m2":{"type":"number","nullable":true,"description":"Footprint area in m² (EPSG:3035)"}}},"EubuccoBuildingCandidate":{"type":"object","description":"Compact building row for multi-building FE selection","properties":{"id":{"type":"string"},"region_id":{"type":"string"},"city_id":{"type":"string"},"type":{"type":"string","nullable":true},"subtype":{"type":"string","nullable":true},"height_m":{"type":"number","nullable":true},"floors":{"type":"number","nullable":true},"construction_year":{"type":"integer","nullable":true},"distance_m":{"type":"number"},"match_mode":{"type":"string","enum":["contains","nearest"]},"footprint_area_m2":{"type":"number","nullable":true},"building_footprint":{"type":"object","nullable":true,"description":"GeoJSON Polygon/MultiPolygon (WGS84) when include_footprint is true"}}},"GetBuildingByAddressResponse":{"type":"object","description":"Success payload: geocode atomic `address_parsed` → NUTS partition → EUBUCCO S3 spatial match.","properties":{"address_input":{"type":"string","description":"Original `address` from request"},"address_parsed":{"$ref":"#/components/schemas/ParsedAddress"},"geocode_query":{"type":"string","description":"Query sent to Photon/Nominatim after parsing (usually `address_parsed.formatted_query`)"},"geocoding":{"$ref":"#/components/schemas/EubuccoGeocoding"},"coordinates_wgs84":{"type":"object","properties":{"lat":{"type":"number"},"lon":{"type":"number"}}},"coordinates_epsg3035":{"type":"object","description":"EPSG:3035 (ETRS89-LAEA) used for EUBUCCO partition lookup","properties":{"x":{"type":"number"},"y":{"type":"number"}}},"eubucco_partition":{"type":"object","properties":{"nuts_id":{"type":"string","example":"RO32"},"nuts_name":{"type":"string"},"nuts_level":{"type":"integer"}}},"search_radius_m":{"type":"number","description":"Effective search radius used for nearest / candidates"},"building":{"$ref":"#/components/schemas/EubuccoBuilding"},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/EubuccoBuildingCandidate"},"description":"Present when `include_candidates` is true"},"map":{"type":"object","properties":{"address_point":{"type":"object","description":"GeoJSON Point (WGS84)"},"building_footprint":{"type":"object","nullable":true,"description":"GeoJSON Polygon/MultiPolygon (WGS84); null when `include_footprint` is false"}}},"notes":{"type":"array","items":{"type":"string"},"description":"Human-readable caveats (geocoder precision, ML estimates, etc.)"}}},"SendSmsRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["to","text"],"properties":{"to":{"type":"string","description":"Destination phone number","example":"40722123456"},"text":{"type":"string","example":"Code: 123456"}}}]},"SendEmailRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["to","subject"],"properties":{"to":{"type":"string","format":"email","example":"client@example.com"},"subject":{"type":"string","example":"Subject"},"text":{"type":"string","description":"Plain text message (require `text` or `html`)"},"html":{"type":"string","description":"HTML message"},"from":{"type":"string"},"replyTo":{"type":"string"}}}]},"CompareOfferFile":{"type":"object","required":["name","data"],"properties":{"name":{"type":"string","example":"offer.pdf","description":"File name with extension (`.pdf`, `.txt`, `.doc`, `.docx`)."},"data":{"type":"string","description":"Base64 file contents (may include `data:...;base64,` prefix). For non-encrypted PDFs omit `pdf_password`."},"pdf_password":{"type":"string","description":"Optional. Only for **encrypted PDFs**: password for that file. Ignored for `.txt` / `.doc` / `.docx`.","example":"secret-pdf-password"},"pdfPassword":{"type":"string","description":"Alias for `pdf_password`."}}},"AiVerdict":{"type":"object","description":"Final recommendation produced by Gemini. Influenced by optional request **`scoreCard`** weights (see `CompareScoreCard`). `ai_delta` SSE events carry raw text; after parsing, verdict data also appears in `excelExport`.","properties":{"bestValueInsurer":{"type":"string","example":"Company X SA","description":"Insurer name for the offer ranked best under weighted criteria and 3-pillar review."},"reasoning":{"type":"string","description":"Markdown with ### Coverages, ### Price, ### Recommended approach (language per `lang`). Explains how **`scoreCard`** weights affected the ranking. Up to ~100 words (speed) or more (expert); without diacritics for ro/cs where applicable."}}},"CompareOfferExcelRow":{"type":"object","description":"One row per offer; `headers` in `excelExport` list column names in the same order.","properties":{"offerIndex":{"type":"integer","minimum":1},"insurerName":{"type":"string","nullable":true},"premium":{"type":"number","nullable":true},"sumInsured":{"type":"number","nullable":true},"startDate":{"type":"string","nullable":true},"endDate":{"type":"string","nullable":true},"mainCovers":{"type":"string"},"specialClauses":{"type":"string"},"deductible":{"type":"string"},"majorExclusions":{"type":"string"},"installments":{"type":"string","nullable":true}}},"CompareOffersExcelExport":{"type":"object","description":"Tabular payload ready to map to an Excel sheet (headers + rows + metadata + embedded `aiVerdict`).","properties":{"sheetName":{"type":"string","example":"compare_offers"},"headers":{"type":"array","items":{"type":"string"},"example":["offerIndex","insurerName","premium","sumInsured","startDate","endDate","mainCovers","specialClauses","deductible","majorExclusions","installments"]},"rows":{"type":"array","items":{"$ref":"#/components/schemas/CompareOfferExcelRow"}},"comparisonMetadata":{"type":"object","properties":{"policyType":{"type":"string"},"currency":{"type":"string","example":"RON"},"numberOfOffers":{"type":"integer","minimum":0}}},"aiVerdict":{"$ref":"#/components/schemas/AiVerdict"},"buildingSumCheck":{"allOf":[{"$ref":"#/components/schemas/BuildingSumCheck"}],"nullable":true,"description":"Orientative building sum vs replacement band (property/home only). Parsed from model JSON `buildingSumCheck`."}}},"BuildingSumCheck":{"type":"object","description":"Orientative replacement-cost plausibility vs insured building sum (EU location tiers, per m² + total band). Not market value or expert appraisal.","properties":{"status":{"type":"string","enum":["ok","review","not_comparable","not_applicable"]},"applicable":{"type":"boolean"},"locationTier":{"type":"string","enum":["metropolitan_core","major_urban","urban","periurban","rural","unknown"]},"builtAreaSqmUsed":{"type":"number","nullable":true},"indicativeReplacementCostPerSqm":{"type":"object","nullable":true,"properties":{"min":{"type":"number"},"max":{"type":"number"}}},"indicativeReplacementRangeEur":{"type":"object","nullable":true,"properties":{"min":{"type":"number"},"max":{"type":"number"}}},"assumptions":{"type":"string"},"alerts":{"type":"array","items":{"type":"string"}},"perOffer":{"type":"array","items":{"type":"object","properties":{"offerIndex":{"type":"integer"},"insurerName":{"type":"string","nullable":true},"sumInsuredBuilding":{"type":"number","nullable":true},"valuationBasis":{"type":"string","nullable":true},"impliedInsuredPerSqm":{"type":"number","nullable":true},"deltaVsRange":{"type":"string","enum":["within","below","above","unknown"]}}}}}},"CompareOffersSyncSuccessResponse":{"type":"object","required":["error","response_transport","aiRawResponse","tokensUsed","parse_ok"],"properties":{"error":{"type":"integer","enum":[0],"description":"Gemini success; raw JSON text in `aiRawResponse`."},"response_transport":{"type":"string","enum":["sync"],"description":"Default mode when `response_transport` is omitted from the request."},"aiRawResponse":{"type":"string","description":"JSON text from the model (`comparisonMetadata`, `offers[]`, `buildingSumCheck`, `aiVerdict`). Same payload as stream `complete`; also parsed into `excelExport` when valid."},"tokensUsed":{"type":"integer","minimum":0,"description":"Total tokens reported by Gemini for this request (`usageMetadata.totalTokenCount`). One number for billing/visibility; prompt vs. completion breakdown is not exposed here.","example":12800},"aiVerdict":{"allOf":[{"$ref":"#/components/schemas/AiVerdict"}],"nullable":true,"description":"Parsed recommendation when `parse_ok` is true."},"excelExport":{"allOf":[{"$ref":"#/components/schemas/CompareOffersExcelExport"}],"nullable":true,"description":"Tabular export; `headers` lists only keys with `analysisCriteria` = 1 (no `offerIndex` column)."},"parse_ok":{"type":"boolean","description":"Whether `aiRawResponse` was parsed into structured `excelExport` / `aiVerdict`."},"parse_error":{"type":"string","description":"Present when `parse_ok` is false."}}},"TrainingAgentsRequest":{"type":"object","required":["user_id","api_key","client_role_by","history","input"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"country":{"type":"string","example":"RO"},"lang":{"type":"string","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"example":"speed"},"conversation_id":{"type":"string","description":"Optional session indicator. If omitted, server generates one."},"client_role_by":{"type":"string","enum":["ai","agent"],"description":"Who plays the client role: \"ai\" or \"agent\"."},"client_behavioral":{"type":"string","enum":["agreeable","skeptic","neutral","hostile"],"description":"Required when client_role_by=\"ai\". Controls client tone/stance."},"history":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["agent","client"]},"content":{"type":"string"}}}},"input":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["agent","client"]},"content":{"type":"string"}}}}},"TrainingAgentsMessage":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["agent","client"]},"content":{"type":"string"}}},"TrainingAgentsSyncSuccessResponse":{"type":"object","required":["error","response_transport","conversation_id","answer_id","next"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["sync"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"next":{"$ref":"#/components/schemas/TrainingAgentsMessage"}}},"TrainingAgentsStreamCompleteSuccess":{"type":"object","required":["error","response_transport","conversation_id","answer_id","next"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"next":{"$ref":"#/components/schemas/TrainingAgentsMessage"}}},"TrainingAgentsStreamCompleteError":{"type":"object","required":["error","response_transport","info"],"properties":{"error":{"type":"integer","enum":[1]},"response_transport":{"type":"string","enum":["stream"]},"info":{"type":"string"}}},"TrainingAgentEvaluationRequest":{"type":"object","required":["user_id","api_key","history"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"country":{"type":"string","example":"RO"},"lang":{"type":"string","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"example":"speed"},"conversation_id":{"type":"string","description":"Optional session indicator (correlates with /trainingAgents)."},"history":{"type":"array","minItems":1,"items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["agent","client"]},"content":{"type":"string"}}}}}},"TrainingAgentEvaluationEvidence":{"type":"object","required":["role","quote"],"properties":{"role":{"type":"string","enum":["agent","client"]},"quote":{"type":"string","description":"Short verbatim excerpt from transcript."},"turn_index":{"type":"integer","minimum":1,"description":"1-based turn index in transcript."}}},"TrainingAgentEvaluationCriterionScore":{"type":"object","required":["key","name","weight","score","strengths","improvements","evidence"],"properties":{"key":{"type":"string","enum":["need_discovery","active_listening_empathy","objection_handling","value_positioning","call_control_next_steps"]},"name":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"example":0.35},"score":{"type":"integer","minimum":0,"maximum":100,"example":85},"strengths":{"type":"array","items":{"type":"string"}},"improvements":{"type":"array","items":{"type":"string"}},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/TrainingAgentEvaluationEvidence"}}}},"TrainingAgentEvaluation":{"type":"object","required":["version","total_score","criteria","red_flags","next_step_suggestion"],"properties":{"version":{"type":"integer","enum":[1]},"total_score":{"type":"integer","minimum":0,"maximum":100,"example":73},"criteria":{"type":"array","items":{"$ref":"#/components/schemas/TrainingAgentEvaluationCriterionScore"}},"red_flags":{"type":"array","items":{"type":"string"}},"next_step_suggestion":{"type":"string","description":"One suggested next agent message (1-2 sentences)."},"notes":{"type":"array","items":{"type":"string"}}}},"TrainingAgentEvaluationSyncSuccessResponse":{"type":"object","required":["error","response_transport","conversation_id","answer_id","evaluation","parse_ok","aiRawResponse"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["sync"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean","enum":[true]},"aiRawResponse":{"type":"string","description":"Raw JSON returned by the model."},"evaluation":{"$ref":"#/components/schemas/TrainingAgentEvaluation"}}},"TrainingAgentEvaluationSyncParseErrorResponse":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","aiRawResponse","parse_error"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["sync"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean","enum":[false]},"aiRawResponse":{"type":"string","description":"Raw model output which failed JSON parsing/validation."},"parse_error":{"type":"string"}}},"TrainingAgentEvaluationStreamCompleteSuccess":{"type":"object","required":["error","response_transport","conversation_id","answer_id","aiRawResponse","parse_ok","evaluation"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"aiRawResponse":{"type":"string"},"parse_ok":{"type":"boolean","enum":[true]},"evaluation":{"$ref":"#/components/schemas/TrainingAgentEvaluation"}}},"TrainingAgentEvaluationStreamCompleteParseError":{"type":"object","required":["error","response_transport","conversation_id","answer_id","aiRawResponse","parse_ok","parse_error"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"aiRawResponse":{"type":"string"},"parse_ok":{"type":"boolean","enum":[false]},"parse_error":{"type":"string"}}},"TrainingAgentEvaluationStreamCompleteError":{"type":"object","required":["error","response_transport","info"],"properties":{"error":{"type":"integer","enum":[1]},"response_transport":{"type":"string","enum":["stream"]},"info":{"type":"string"}}},"CompareOffersStreamCompleteSuccess":{"type":"object","required":["error","response_transport","tokensUsed","aiRawResponse","parse_ok"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"tokensUsed":{"type":"integer","minimum":0,"description":"Same as sync: total tokens (`usageMetadata.totalTokenCount`) for this streamed request.","example":11830},"aiRawResponse":{"type":"string","description":"Full text aggregated from Gemini after streaming completes."},"aiVerdict":{"description":"Parsed from the model JSON; `null` when `parse_ok` is false or the field is missing.","nullable":true,"allOf":[{"$ref":"#/components/schemas/AiVerdict"}]},"excelExport":{"description":"`null` when `parse_ok` is false.","nullable":true,"allOf":[{"$ref":"#/components/schemas/CompareOffersExcelExport"}]},"parse_ok":{"type":"boolean","description":"`true` if `aiRawResponse` could be parsed as the expected comparison JSON."},"parse_error":{"type":"string","description":"Present when `parse_ok` is false."}}},"CompareOffersStreamCompleteError":{"type":"object","required":["error","response_transport","info"],"properties":{"error":{"type":"integer","enum":[1]},"response_transport":{"type":"string","enum":["stream"]},"info":{"type":"string"}}},"CompareAnalysisCriteria":{"type":"object","description":"Optional object controlling which keys appear in each element of **`offers[]`** in the model output. **Only the 10 keys below are allowed** (`additionalProperties` is forbidden; unknown keys → **400**).\n\n**Flag values (integer only, not string):**\n- **`1`** — **Include** this attribute in the comparison: the AI may extract it and **must** output the corresponding property in every `offers[]` object.\n- **`0`** — **Exclude** this attribute: **do not** include this property in `offers[]` objects.\n\n**If the whole `analysisCriteria` is omitted, `null`, or `{}`**, the server behaves as if **every key were `1`** (full legacy template).\n**If you pass a partial object**, any **omitted** key defaults to **`1`**. After merge, **at least one** key must be **`1`**, or the API returns **400**.","example":{"insurerName":1,"premium":1,"sumInsured":1,"startDate":1,"endDate":1,"mainCovers":1,"specialClauses":1,"deductible":1,"majorExclusions":1,"installments":1},"additionalProperties":false,"properties":{"insurerName":{"type":"integer","enum":[0,1],"description":"Insurer / company name in the offer. **1** = include; **0** = exclude."},"premium":{"type":"integer","enum":[0,1],"description":"Premium amount. **1** = include; **0** = exclude."},"sumInsured":{"type":"integer","enum":[0,1],"description":"Sum insured. **1** = include; **0** = exclude."},"startDate":{"type":"integer","enum":[0,1],"description":"Policy start date. **1** = include; **0** = exclude."},"endDate":{"type":"integer","enum":[0,1],"description":"Policy end date. **1** = include; **0** = exclude."},"mainCovers":{"type":"integer","enum":[0,1],"description":"Main covers (list). **1** = include; **0** = exclude."},"specialClauses":{"type":"integer","enum":[0,1],"description":"Special clauses / extra benefits. **1** = include; **0** = exclude."},"deductible":{"type":"integer","enum":[0,1],"description":"Deductibles / franchises (list). **1** = include; **0** = exclude."},"majorExclusions":{"type":"integer","enum":[0,1],"description":"Major exclusions. **1** = include; **0** = exclude."},"installments":{"type":"integer","enum":[0,1],"description":"Installment count / payment frequency (`installments` in JSON output). **1** = include; **0** = exclude."}}},"CompareScoreCard":{"type":"object","description":"Optional **recommendation score weights** (% per criterion) passed to the comparison prompt. They steer how Gemini ranks offers in **`aiVerdict`** (not which keys appear in `offers[]` — that is **`analysisCriteria`**).\n\n**Defaults when omitted / `null`:** `premium` 12, `sumInsured` 11, `mainCovers` 23, `specialClauses` 23, `deductible` 14, `majorExclusions` 17; `insurerName`, `startDate`, `endDate`, `installments` = 0. **Active scoring fields total 100%.**\n\n**Validation:** For every key with `analysisCriteria[k]=1`, the corresponding weight is included in the total. After merge, **`analysisCriteria[k]=0` forces `scoreCard[k]=0`**. The sum of weights on **active** criteria must be exactly **100** or the API returns **400** (`scoreCard active weights must total 100%`).\n\nTypically only the six scoring fields (`premium`, `sumInsured`, `mainCovers`, `specialClauses`, `deductible`, `majorExclusions`) carry non-zero defaults; other keys may be sent as `0`.","example":{"insurerName":0,"premium":12,"sumInsured":11,"startDate":0,"endDate":0,"mainCovers":23,"specialClauses":23,"deductible":14,"majorExclusions":17,"installments":0},"additionalProperties":false,"properties":{"insurerName":{"type":"number","minimum":0,"maximum":100,"example":0,"description":"Weight % for insurer name in recommendation (usually 0)."},"premium":{"type":"number","minimum":0,"maximum":100,"example":12,"description":"Weight % for premium."},"sumInsured":{"type":"number","minimum":0,"maximum":100,"example":11,"description":"Weight % for sum insured."},"startDate":{"type":"number","minimum":0,"maximum":100,"example":0,"description":"Weight % for start date (usually 0)."},"endDate":{"type":"number","minimum":0,"maximum":100,"example":0,"description":"Weight % for end date (usually 0)."},"mainCovers":{"type":"number","minimum":0,"maximum":100,"example":23,"description":"Weight % for main covers."},"specialClauses":{"type":"number","minimum":0,"maximum":100,"example":23,"description":"Weight % for special clauses."},"deductible":{"type":"number","minimum":0,"maximum":100,"example":14,"description":"Weight % for deductible."},"majorExclusions":{"type":"number","minimum":0,"maximum":100,"example":17,"description":"Weight % for major exclusions."},"installments":{"type":"number","minimum":0,"maximum":100,"example":0,"description":"Weight % for installments (usually 0)."}}},"CompareOffersRequest":{"type":"object","required":["user_id","api_key","files"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`) with `meta`, token deltas, and `complete`."},"responseTransport":{"type":"string","enum":["sync","stream"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`) with `meta`, token deltas, and `complete`. camelCase alias for `response_transport`."},"country":{"type":"string","example":"RO","description":"Optional. Broker operating country as **ISO 3166-1 alpha-2** (e.g. `RO`, `CZ`). Used for market/regulatory context. Invalid values are ignored."},"lang":{"type":"string","example":"ro","description":"Output language (optional, default `ro`). UI locale / interface language (e.g. `ro`, `en`, `cs`). Listed immediately after `country` in this schema."},"profile":{"type":"string","enum":["speed","expert"],"description":"Optional. \"speed\" (default) → concise `aiVerdict.reasoning`; \"expert\" → more detailed comparison.","example":"speed"},"analysisCriteria":{"description":"See schema **`CompareAnalysisCriteria`**: ten fixed keys, each **`0`** or **`1`**. Omitted / `{}` = all **`1`** (full template).","allOf":[{"$ref":"#/components/schemas/CompareAnalysisCriteria"}]},"analysis_criteria":{"description":"Snake_case alias for `analysisCriteria`.","allOf":[{"$ref":"#/components/schemas/CompareAnalysisCriteria"}]},"scoreCard":{"description":"See **`CompareScoreCard`**. Omitted / `null` → default weights (100% on scoring fields). Custom object must sum to **100%** on active criteria.","allOf":[{"$ref":"#/components/schemas/CompareScoreCard"}]},"score_card":{"description":"Snake_case alias for `scoreCard`.","allOf":[{"$ref":"#/components/schemas/CompareScoreCard"}]},"files":{"type":"array","description":"At least 2 offers. Each item: `name` + `data`. For encrypted PDFs add `pdf_password` only on that item.","items":{"$ref":"#/components/schemas/CompareOfferFile"},"minItems":2}}},"ExtractPolicyFromPdfRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["data"],"properties":{"name":{"type":"string","example":"polita.pdf","description":"File name with extension: **`.pdf`**, **`.txt`**, **`.doc`**, **`.docx`**. (Internal default `policy.pdf` is only used if `name` is missing; for .txt / Word you must set the correct extension.)"},"fileName":{"type":"string"},"filename":{"type":"string"},"data":{"type":"string","description":"Document content in **Base64**: PDF, UTF-8 text file, or Office Word. Type is inferred from `name`."},"file":{"type":"string","description":"Alias for `data`."},"pdf":{"type":"string","description":"Alias for `data`."},"pdf_password":{"type":"string","description":"Optional, **only for encrypted `.pdf`**. If the PDF is encrypted and the field is missing → 400. Ignored for `.txt` / `.doc` / `.docx` (password-protected Word is not supported).","example":"secret-pdf-password"},"pdfPassword":{"type":"string","description":"Alias for `pdf_password`."}}}]},"GetSeismicEventsRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["from","to","min_mag","minlat","maxlat","minlon","maxlon"],"properties":{"from":{"type":"string","format":"date","example":"2026-04-01","description":"Start date UTC (inclusive), YYYY-MM-DD"},"to":{"type":"string","format":"date","example":"2026-04-27","description":"End date UTC (inclusive), YYYY-MM-DD"},"min_mag":{"type":"number","example":3,"description":"Minimum magnitude (rows with NULL magnitude are excluded)"},"minMag":{"type":"number"},"minlat":{"type":"number","example":43.5},"minLat":{"type":"number"},"maxlat":{"type":"number","example":48.5},"maxLat":{"type":"number"},"minlon":{"type":"number","example":20.5},"minLon":{"type":"number"},"maxlon":{"type":"number","example":29.5},"maxLon":{"type":"number"}}}]},"GetRiskDataHubLossesRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","format":"date","example":"2020-01-01","description":"Start date (inclusive) on column `start`, YYYY-MM-DD"},"to":{"type":"string","format":"date","example":"2025-12-31","description":"End date (inclusive) on column `start`, YYYY-MM-DD"},"country_code":{"type":"string","minLength":2,"maxLength":2,"example":"RO","description":"Optional ISO-2 country filter (`country_code`)"},"countryCode":{"type":"string","description":"Alias for `country_code`"},"admin_unit_code":{"type":"string","example":"RO32","description":"Optional exact `admin_unit_code` (e.g. EUBUCCO NUTS2 `nuts_id`)"},"adminUnitCode":{"type":"string","description":"Alias for `admin_unit_code`"},"admin_unit_level":{"type":"string","example":"NUTS2","description":"Optional exact `admin_unit_level` (Country | NUTS1 | NUTS2 | NUTS3)"},"adminUnitLevel":{"type":"string","description":"Alias for `admin_unit_level`"},"event_code":{"type":"string","example":"FLRO202507280001","description":"Optional exact `event_code`"},"eventCode":{"type":"string","description":"Alias for `event_code`"},"hazard_type":{"type":"string","example":"Flood","description":"Optional exact `hazard_type` (English, as in RDH)"},"hazardType":{"type":"string","description":"Alias for `hazard_type`"}}}]},"CyberAuditScanModule":{"type":"string","enum":["dns_email","attack_surface","web_tls"],"description":"Passive collector group. `dns_email` = apex DNS + MX + SPF/DKIM/DMARC/MTA-STS/TLS-RPT; `attack_surface` = crt.sh subdomains; `web_tls` = HTTPS/TLS/headers on a limited hostname set."},"CyberAuditScanOptions":{"type":"object","description":"Select which passive modules to run under a single `consent_acknowledged`. **Omitted or null = all three modules enabled** (backward compatible). At least one property must be `true`. Unknown keys are rejected.","properties":{"dns_email":{"type":"boolean","default":true,"description":"DNS & email posture collectors (A/AAAA/NS, MX, SPF, DKIM, DMARC, MTA-STS, TLS-RPT)."},"attack_surface":{"type":"boolean","default":true,"description":"Passive certificate transparency subdomain discovery (crt.sh)."},"web_tls":{"type":"boolean","default":true,"description":"HTTPS reachability, TLS certificate/protocol, security headers, server banner (up to 8 hosts; MX-only hosts excluded)."}},"additionalProperties":false,"example":{"dns_email":true,"attack_surface":true,"web_tls":true}},"CyberAuditModuleRun":{"type":"object","required":["module","requested","executed","skipped"],"description":"Per-module execution trace (fixed order: dns_email, attack_surface, web_tls).","properties":{"module":{"$ref":"#/components/schemas/CyberAuditScanModule"},"requested":{"type":"boolean","description":"Broker selection from `scan_options` in the request."},"executed":{"type":"boolean","description":"Collector ran to completion for this module."},"skipped":{"type":"boolean","description":"`true` when `requested` is `false` (module not selected)."},"error":{"type":"string","nullable":true,"description":"Set when `requested` is true but `executed` is false (timeout, upstream error)."}}},"CyberAuditScopeLine":{"type":"object","required":["module","text_en"],"description":"Human-readable scope line for UI/PDF/LLM — only modules that executed.","properties":{"module":{"$ref":"#/components/schemas/CyberAuditScanModule"},"text_en":{"type":"string","description":"English scope description."},"text_ro":{"type":"string","nullable":true,"description":"Romanian scope description (Maya UI)."}}},"CyberAuditRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["domain","consent_acknowledged"],"properties":{"domain":{"type":"string","example":"example.com","description":"Target apex domain to assess (no `https://`, no path). Normalized server-side (lowercase, `www.` stripped)."},"target_domain":{"type":"string","description":"Alias for `domain`"},"targetDomain":{"type":"string","description":"Alias for `domain`"},"consent_acknowledged":{"type":"boolean","example":true,"description":"Must be `true`. Single general consent for all selected passive modules on this domain."},"consentAcknowledged":{"type":"boolean","description":"Alias for `consent_acknowledged`"},"scan_profile":{"type":"string","enum":["passive"],"example":"passive","description":"Scan profile. Only `passive` is supported."},"scanProfile":{"type":"string","description":"Alias for `scan_profile`"},"scan_options":{"$ref":"#/components/schemas/CyberAuditScanOptions","description":"Optional passive module flags. Omit to run all modules (same as v1 behaviour)."},"scanOptions":{"$ref":"#/components/schemas/CyberAuditScanOptions","description":"Alias for `scan_options`."}},"example":{"user_id":1,"api_key":"YOUR_API_KEY","domain":"example.com","consent_acknowledged":true,"scan_profile":"passive","scan_options":{"dns_email":true,"attack_surface":true,"web_tls":true}}}]},"CyberAuditFinding":{"type":"object","required":["id","severity","category","title","detail"],"properties":{"id":{"type":"string","example":"DNS-03"},"severity":{"type":"string","enum":["info","low","medium","high","critical"],"example":"high"},"category":{"type":"string","example":"email_posture","description":"dns | email_posture | attack_surface | web_tls | pipeline"},"title":{"type":"string","example":"SPF record missing"},"detail":{"type":"string"},"evidence":{"type":"object","additionalProperties":true,"example":{}}}},"CyberAuditScores":{"type":"object","required":["overall"],"properties":{"email_posture":{"type":"integer","minimum":0,"maximum":100,"nullable":true,"example":72,"description":"null if dns_email module was not executed."},"tls_web":{"type":"integer","minimum":0,"maximum":100,"nullable":true,"example":85,"description":"null if web_tls module was not executed."},"attack_surface":{"type":"integer","minimum":0,"maximum":100,"nullable":true,"example":90,"description":"null if attack_surface module was not executed."},"overall":{"type":"integer","minimum":0,"maximum":100,"example":82,"description":"Mean of non-null axis scores."}}},"CyberAuditPrecomputed":{"type":"object","required":["findings_total","findings_critical","findings_high","findings_medium","findings_low","findings_info","hosts_scanned","subdomains_discovered"],"properties":{"findings_total":{"type":"integer","example":12},"findings_critical":{"type":"integer","example":0},"findings_high":{"type":"integer","example":2},"findings_medium":{"type":"integer","example":3},"findings_low":{"type":"integer","example":1},"findings_info":{"type":"integer","example":6},"hosts_scanned":{"type":"integer","example":8},"subdomains_discovered":{"type":"integer","example":15}}},"CyberAuditSuccessResponse":{"type":"object","required":["error","audit_version","status","domain","scan_profile","consent_acknowledged","scanned_at","message","scan_options_requested","scan_modules","scope_preamble_en","scope_lines","scores","precomputed","findings"],"properties":{"error":{"type":"integer","enum":[0]},"audit_version":{"type":"string","enum":["cyber_audit_v2"],"description":"JSON schema version (`cyber_audit_v2`). Responses always use v2 when `scan_options` is supported. Legacy `cyber_audit_v1` is no longer emitted."},"status":{"type":"string","enum":["completed","partial"],"description":"`completed` = every requested module executed; `partial` = at least one requested module failed or did not complete."},"domain":{"type":"string","example":"example.com"},"scan_profile":{"type":"string","enum":["passive"],"example":"passive"},"consent_acknowledged":{"type":"boolean","example":true},"scanned_at":{"type":"string","format":"date-time","example":"2026-05-25T12:00:00.000Z"},"message":{"type":"string","example":"Passive cyber pre-audit completed (3 modules)."},"scan_options_requested":{"$ref":"#/components/schemas/CyberAuditScanOptions","description":"Normalized echo of the module flags used for this run."},"scan_modules":{"type":"array","minItems":3,"maxItems":3,"items":{"$ref":"#/components/schemas/CyberAuditModuleRun"},"description":"Execution status per module (always three entries)."},"scope_preamble_en":{"type":"string","description":"Passive-only disclaimer (always present).","example":"Passive external reconnaissance only: no port scanning, no credential testing, no intrusive or authenticated testing."},"scope_lines":{"type":"array","items":{"$ref":"#/components/schemas/CyberAuditScopeLine"},"description":"Scope lines for modules that executed (for Maya pre-audit block and LLM context)."},"scores":{"$ref":"#/components/schemas/CyberAuditScores"},"precomputed":{"$ref":"#/components/schemas/CyberAuditPrecomputed"},"findings":{"type":"array","items":{"$ref":"#/components/schemas/CyberAuditFinding"}}}},"SearchEiopaUndertakingsRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Undertaking name (free text)","example":"Allianz"},"query":{"type":"string","description":"Alias for `name`"},"q":{"type":"string","description":"Alias for `name`"},"eu_operating_country":{"type":"string","minLength":2,"maxLength":8,"description":"EU country where the undertaking appears to operate (`eiopa_insurance_undertakings.eu_operating_country`, from EIOPA field *EU Country where the entity operates*). Optional filter.","example":"RO"},"home_country":{"type":"string","minLength":2,"maxLength":8,"description":"Home member state (`eiopa_insurance_undertakings.home_country`). Optional filter for country of origin.","example":"DE"},"country":{"type":"string","description":"Deprecated alias for `eu_operating_country` (backward compatibility). Prefer `eu_operating_country`.","example":"RO"},"active_only":{"type":"boolean","description":"Default true. When true, filters `is_active=1`."},"activeOnly":{"type":"boolean","description":"Alias for `active_only`"},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Max rows (default 50)."}}}]},"EiopaUndertakingRow":{"type":"object","required":["id","natural_key","natural_key_sha","activity_status","is_active"],"additionalProperties":false,"properties":{"id":{"type":"integer","example":1},"natural_key":{"type":"string"},"natural_key_sha":{"type":"string"},"lei":{"type":"string","nullable":true},"home_country":{"type":"string","nullable":true},"eu_operating_country":{"type":"string","nullable":true},"cross_border_status":{"type":"string","nullable":true},"national_register_number":{"type":"string","nullable":true},"undertaking_name":{"type":"string","nullable":true},"undertaking_name_norm":{"type":"string","nullable":true},"competent_authority":{"type":"string","nullable":true},"operation_start_date":{"type":"string","nullable":true,"example":"2004-04-29"},"operation_end_date":{"type":"string","nullable":true,"example":"2015-01-01"},"activity_status":{"type":"string","enum":["active","non_active"]},"is_active":{"type":"integer","enum":[0,1]},"city":{"type":"string","nullable":true},"county":{"type":"string","nullable":true},"address":{"type":"string","nullable":true},"website_address":{"type":"string","nullable":true},"raw_json":{"type":"string"},"row_fingerprint":{"type":"string"},"first_seen_at":{"type":"string"},"last_seen_at":{"type":"string"},"last_changed_at":{"type":"string"}}},"SearchEiopaUndertakingsSuccessResponse":{"type":"object","required":["error","results"],"properties":{"error":{"type":"integer","enum":[0]},"results":{"type":"array","items":{"$ref":"#/components/schemas/EiopaUndertakingRow"}}}},"GetTedTendersRequest":{"allOf":[{"$ref":"#/components/schemas/PostAuthBase"},{"type":"object","required":["country"],"properties":{"country":{"type":"string","minLength":3,"maxLength":3,"description":"Buyer country ISO 3166-1 alpha-3 (EU member state). Required.","example":"ROU"},"ted_publication_number":{"type":"string","description":"TED publication number (ND), e.g. 366650-2026. When set, returns a single tender detail; otherwise returns a paginated list.","example":"366650-2026"},"tedPublicationNumber":{"type":"string","description":"Alias for `ted_publication_number`"},"nd":{"type":"string","description":"Alias for `ted_publication_number`"},"cpv_prefix":{"type":"string","description":"Main CPV prefix filter (default 6651 — insurance / broker-relevant services).","example":"6651"},"cpvPrefix":{"type":"string","description":"Alias for `cpv_prefix`"},"limit":{"type":"integer","minimum":1,"maximum":200,"description":"Max list rows (default 50). Ignored for detail."},"offset":{"type":"integer","minimum":0,"description":"List pagination offset (default 0)."}}}]},"TedTenderListItem":{"type":"object","additionalProperties":false,"properties":{"ted_publication_number":{"type":"string","example":"366650-2026"},"title_ro":{"type":"string","nullable":true},"title_en":{"type":"string","nullable":true},"buyer_name":{"type":"string","nullable":true},"buyer_country":{"type":"string","nullable":true,"example":"ROU"},"cpv_main":{"type":"string","example":"66515200"},"estimated_value":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"deadline_receipt_at":{"type":"string","nullable":true,"example":"2026-07-01 15:00:00"},"publication_date":{"type":"string","nullable":true,"example":"2026-05-28"},"notice_type":{"type":"string","nullable":true,"example":"cn-standard"},"lifecycle":{"type":"string","example":"open"},"ted_pdf_url":{"type":"string","nullable":true},"national_notice_url":{"type":"string","nullable":true}}},"TedTenderDetail":{"allOf":[{"$ref":"#/components/schemas/TedTenderListItem"},{"type":"object","properties":{"description_short":{"type":"string","nullable":true},"participation_conditions":{"type":"object","nullable":true,"additionalProperties":true,"example":{}},"award_criteria":{"type":"object","nullable":true,"additionalProperties":true,"example":{}},"lots":{"type":"array","items":{"type":"object","properties":{"lot_key":{"type":"string"},"title":{"type":"string","nullable":true},"cpv":{"type":"string","nullable":true},"estimated_value":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true}}}},"documents":{"type":"array","items":{"type":"object","properties":{"doc_type":{"type":"string"},"url":{"type":"string"},"language":{"type":"string","nullable":true}}}}}}]},"GetTedTendersListSuccessResponse":{"type":"object","required":["error","count","tenders"],"properties":{"error":{"type":"integer","enum":[0]},"count":{"type":"integer"},"tenders":{"type":"array","items":{"$ref":"#/components/schemas/TedTenderListItem"}}}},"GetTedTendersDetailSuccessResponse":{"type":"object","required":["error","tender"],"properties":{"error":{"type":"integer","enum":[0]},"tender":{"$ref":"#/components/schemas/TedTenderDetail"}}},"InsurancePlanForDomesticRequest":{"type":"object","required":["user_id","api_key","query"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"lang":{"type":"string","description":"BCP-47 language code (EU languages supported), e.g. `fr`, `de`, `ro`, `pt-PT`. If omitted: follow the language used in `query`.","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"description":"Optional. \"speed\" (default) → concise plan_text; \"expert\" → more detailed plan.","example":"speed"},"conversation_id":{"type":"string","description":"Optional session ID for refinement.","example":"conv_domestic_001"},"conversationId":{"type":"string","description":"Alias for `conversation_id`."},"query":{"type":"string","minLength":8,"maxLength":32000,"description":"Free-text request describing household, home, assets, goals, budget, and constraints (max 32000 characters).","example":"Familie: 2 adulți (35, 37 ani), copil 6 ani. Apartament București ~250k EUR, ipotecă. Buget lunar asigurări ~80 EUR. Priorități: locuință, răspundere civilă, sănătate."},"user_query":{"type":"string","description":"Alias for `query`."},"userQuery":{"type":"string","description":"Alias for `query`."}}},"InsurancePlanForDomesticStreamCompleteSuccess":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","plan_text"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean","enum":[true]},"plan_text":{"type":"string"},"plan_json":{"type":"object","additionalProperties":true,"example":{}}}},"InsurancePlanForDomesticStreamCompleteParseError":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","plan_text","parse_error"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean","enum":[false]},"plan_text":{"type":"string","description":"Fallback excerpt when JSON parsing failed."},"parse_error":{"type":"string"},"aiRawResponse":{"type":"string"}}},"InsurancePlanForDomesticStreamCompleteError":{"type":"object","required":["error","response_transport","info"],"properties":{"error":{"type":"integer","enum":[1]},"response_transport":{"type":"string","enum":["stream"]},"info":{"type":"string"}}},"InsurancePlanForDomesticSyncSuccessResponse":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","aiRawResponse"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["sync"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean"},"aiRawResponse":{"type":"string","description":"Raw model output (expected strict JSON)."},"plan_json":{"type":"object","additionalProperties":true,"description":"Structured plan JSON (strings in requested lang, money in EUR).","example":{}},"plan_text":{"type":"string","description":"Human-readable plan text (requested lang)."},"parse_error":{"type":"string"}}},"InsurancePlanCompanyDeclaredValuesEur":{"type":"object","description":"Declared insured values extracted from the company risk report (EUR).","properties":{"buildings":{"type":"number","description":"Buildings / premises replacement value.","example":4500000},"equipment":{"type":"number","description":"Machinery and equipment.","example":2200000},"stock_avg":{"type":"number","description":"Average stock / inventory value.","example":1200000},"stock_peak":{"type":"number","description":"Peak stock value (e.g. seasonal).","example":2500000}}},"InsurancePlanCompanyProfileSummary":{"type":"object","description":"Company profile extracted into `plan_json.profile_summary` (corporate plans only).","properties":{"company_name":{"type":"string","nullable":true,"example":"T.B.T. LOGISTIC & PRODUCTION SRL"},"industry":{"type":"string","nullable":true,"example":"Producție ambalaje carton/plastic, depozitare și logistică rutieră"},"legal_form":{"type":"string","nullable":true,"example":"SRL"},"employee_count":{"type":"integer","nullable":true,"example":0,"description":"Use 0 if unknown."},"primary_location":{"type":"string","nullable":true,"example":"Parcul Industrial Ghimbav, Hala 3, jud. Brașov"},"annual_turnover_eur":{"type":"number","example":12000000},"declared_values_eur":{"$ref":"#/components/schemas/InsurancePlanCompanyDeclaredValuesEur"},"fleet_summary":{"type":"string","nullable":true,"example":"15 capete tractor + semiremorci, transport internațional"},"budget_annual_eur":{"type":"number","description":"Target annual insurance budget in EUR (0 if not stated).","example":0}}},"InsurancePlanSumInsuredRangeEur":{"type":"object","nullable":true,"properties":{"min_eur":{"type":"number"},"max_eur":{"type":"number"}}},"InsurancePlanCoverageItem":{"type":"object","required":["coverage_type","why"],"properties":{"coverage_type":{"type":"string","description":"Generic coverage label (no insurer/product names), e.g. property buildings, business interruption, public liability, fleet, group health, cyber.","example":"Asigurare clădiri și construcții (valoare înlocuire)"},"recommended_level":{"type":"string","enum":["basic","standard","premium"]},"suggested_sum_insured_range_eur":{"$ref":"#/components/schemas/InsurancePlanSumInsuredRangeEur"},"deductible_suggestion":{"type":"string","nullable":true,"enum":["none","low","medium","high"]},"why":{"type":"string","description":"Short broker-facing rationale (1–2 sentences)."}}},"InsurancePlanRecommendedLayer":{"type":"object","required":["layer","coverages"],"properties":{"layer":{"type":"string","enum":["must_have","should_have","nice_to_have"]},"coverages":{"type":"array","items":{"$ref":"#/components/schemas/InsurancePlanCoverageItem"}}}},"InsurancePlanBudgetFit":{"type":"object","properties":{"status":{"type":"string","enum":["within","within_or_slightly_above","unknown"]},"notes":{"type":"string"}}},"InsurancePlanCompanyPlanJson":{"type":"object","description":"Structured corporate insurance plan returned in `plan_json`. Audience: broker working document (not end-client letter). All monetary fields in EUR.","required":["recommended_layers"],"properties":{"lang":{"type":"string","example":"ro"},"assumptions":{"type":"array","items":{"type":"string"}},"profile_summary":{"$ref":"#/components/schemas/InsurancePlanCompanyProfileSummary"},"recommended_layers":{"type":"array","items":{"$ref":"#/components/schemas/InsurancePlanRecommendedLayer"}},"budget_fit":{"$ref":"#/components/schemas/InsurancePlanBudgetFit"},"questions_to_finalize":{"type":"array","items":{"type":"string"},"description":"Broker data gaps to clarify with the client (not questions to the insured)."},"warnings":{"type":"array","items":{"type":"string"},"description":"Plan-specific cautions (hazards, protection gaps, stock peak vs average, etc.)."},"disclaimer":{"type":"string","description":"Short broker-facing notice (server may normalize)."}}},"InsurancePlanForCompanyRequest":{"type":"object","required":["user_id","api_key","query"],"properties":{"user_id":{"type":"string","example":"1","description":"Account user id (or use `userId`)"},"userId":{"type":"string","description":"Alias for `user_id`"},"api_key":{"type":"string","example":"YOUR_API_KEY","description":"API key for this account (or use `apiKey`)"},"apiKey":{"type":"string","description":"Alias for `api_key`"},"response_transport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes."},"responseTransport":{"type":"string","enum":["sync","stream","sse"],"default":"sync","example":"sync","description":"Optional. Omit or **`sync`** → JSON response body. **`stream`** → Server-Sent Events (`text/event-stream`). **`sse`** is accepted as an alias for **`stream`** on insurance-plan and training routes. camelCase alias for `response_transport`."},"lang":{"type":"string","description":"BCP-47 language code (EU languages supported), e.g. `fr`, `de`, `ro`, `pt-PT`. If omitted: follow the language used in `query`.","example":"ro"},"profile":{"type":"string","enum":["speed","expert"],"description":"Optional. \"speed\" (default) → concise plan_text; \"expert\" → more detailed corporate plan.","example":"speed"},"conversation_id":{"type":"string","description":"Optional session ID for refinement (use a company-specific ID, separate from domestic plans).","example":"conv_company_001"},"conversationId":{"type":"string","description":"Alias for `conversation_id`."},"query":{"type":"string","minLength":8,"maxLength":120000,"description":"Free-text request describing the company, location, hazards, declared values, fleet, employees, turnover, and insurance budget (max 120000 characters).","example":"T.B.T. LOGISTIC & PRODUCTION SRL — producție ambalaje carton/plastic, depozitare și logistică rutieră. Parcul Industrial Ghimbav, Hala 3, Brașov. Hala 2018 (extindere 2023), panouri sandwich, acoperiș cu 150 kWp PV (2025). Vecinătate: stație carburanți la 12m. Utilaje injecție, praf carton, gaz metan, mentenanță stivuitoare (baterii Li-ion). Sprinklere doar depozit; producție fără sprinklere; ISU în reautorizare. Valori: clădire 4.500.000 EUR, echipamente 2.200.000 EUR, stoc mediu 1.200.000 EUR (vârf 2.500.000 EUR). CA 12.000.000 EUR/an. Flotă 15 tractoare semiremorci transport internațional."},"user_query":{"type":"string","description":"Alias for `query`."},"userQuery":{"type":"string","description":"Alias for `query`."}}},"InsurancePlanForCompanyStreamCompleteSuccess":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","plan_text"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean","enum":[true]},"plan_text":{"type":"string"},"plan_json":{"$ref":"#/components/schemas/InsurancePlanCompanyPlanJson"}}},"InsurancePlanForCompanyStreamCompleteParseError":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","plan_text","parse_error"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["stream"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean","enum":[false]},"plan_text":{"type":"string","description":"Fallback excerpt when JSON parsing failed."},"parse_error":{"type":"string"},"aiRawResponse":{"type":"string"}}},"InsurancePlanForCompanyStreamCompleteError":{"type":"object","required":["error","response_transport","info"],"properties":{"error":{"type":"integer","enum":[1]},"response_transport":{"type":"string","enum":["stream"]},"info":{"type":"string"}}},"InsurancePlanForCompanySyncSuccessResponse":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","aiRawResponse"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["sync"]},"conversation_id":{"type":"string","example":"conv_company_001"},"answer_id":{"type":"string","example":"plan_a1b2c3d4e5f6"},"parse_ok":{"type":"boolean","enum":[true]},"aiRawResponse":{"type":"string","description":"Raw model output (expected strict JSON envelope with plan_json + plan_text)."},"plan_json":{"$ref":"#/components/schemas/InsurancePlanCompanyPlanJson"},"plan_text":{"type":"string","description":"Markdown plan for the broker (third person; server appends standard broker disclaimer)."}}},"InsurancePlanForCompanySyncParseErrorResponse":{"type":"object","required":["error","response_transport","conversation_id","answer_id","parse_ok","aiRawResponse","plan_text","parse_error"],"properties":{"error":{"type":"integer","enum":[0]},"response_transport":{"type":"string","enum":["sync"]},"conversation_id":{"type":"string"},"answer_id":{"type":"string"},"parse_ok":{"type":"boolean","enum":[false]},"aiRawResponse":{"type":"string"},"plan_text":{"type":"string","description":"User-facing fallback message when JSON parsing failed."},"parse_error":{"type":"string"}}}}}}