{
  "openapi": "3.1.0",
  "info": {
    "title": "Liebreich Software Deterministic B2B Enrichment & Compliance API",
    "version": "2.3.0",
    "description": "Deterministic Global B2B Company, Tech-Stack, Contacts & Hiring-Intent Enrichment (Clearbit/Apollo/Clay alternative) plus European B2B compliance engines (NIS2 & EU DORA supplier KYB, WCAG 2.2 AA / EAA / BFSG accessibility auditing, GDPR/DSGVO cookie & tracker scanning, XRechnung & ZUGFeRD EN 16931 e-invoice validation, daily EU TED & German DÖE procurement tender feed, official EU VIES VAT & GLEIF LEI verification, and CISA KEV + EPSS CVE triage). Free tier: 8 req/min without auth. Prepaid Agent Wallet: €19 = 500 unlocked Pro calls at 120 req/min via /api/v1/agent/checkout.",
    "contact": {
      "name": "Liebreich Software",
      "url": "https://liebreichsoftware.com/support.html",
      "email": "support@liebreichsoftware.com"
    }
  },
  "servers": [
    {
      "url": "https://liebreichsoftware.com",
      "description": "Production HTTPS API (Germany / EU)"
    }
  ],
  "components": {
    "securitySchemes": {
      "LiebreichApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Liebreich-Api-Key",
        "description": "Optional Pro API key (120 req/min). Instant self-serve checkout at https://liebreichsoftware.com/pricing/"
      }
    },
    "schemas": {
      "DomainInput": {
        "type": "object",
        "required": ["domain"],
        "properties": {
          "domain": {
            "type": "string",
            "maxLength": 300,
            "description": "Public domain, website URL, VAT ID, LEI, or CVE ID depending on endpoint."
          }
        }
      }
    }
  },
  "security": [{}, {"LiebreichApiKey": []}],
  "paths": {
    "/api/v1/company-enrich": {
      "post": {
        "operationId": "enrichB2bCompany",
        "summary": "Global B2B Company, 75+ Tech-Stack, Contacts, GLEIF LEI/VAT & Live Hiring-Intent Enricher",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Unified company profile, tech stack, contacts, registry & ATS hiring signals"}}
      }
    },
    "/api/v1/nis2-supplier-check": {
      "post": {
        "operationId": "auditNis2Supplier",
        "summary": "4-layer NIS2 & EU DORA supplier KYB + cyber hygiene dossier",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Deterministic supplier risk dossier with SHA-256 seal"}}
      }
    },
    "/api/v1/bfsg-check": {
      "post": {
        "operationId": "auditBfsgAccessibility",
        "summary": "26-rule WCAG 2.2 AA, EN 301 549 & German BFSG (§ 14) accessibility audit",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "WCAG score, grade, and findings with copy-paste HTML fixes"}}
      }
    },
    "/api/v1/dsgvo-check": {
      "post": {
        "operationId": "auditGdprDsgvoTrackers",
        "summary": "EU GDPR / German DSGVO & § 25 TDDDG pre-consent cookie, Google Fonts & US-tracker audit",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Privacy score, grade, pre-consent cookies, remote font leaks, eager trackers & fixes"}}
      }
    },
    "/api/v1/website-360-check": {
      "post": {
        "operationId": "auditWebsite360",
        "summary": "4-pillar parallel EU/German website legal & security audit (GDPR/TDDDG + WCAG/BFSG + Imprint + SPF/DMARC/TLS)",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Unified 0-100 legal & security scorecard across all 4 compliance pillars"}}
      }
    },
    "/api/v1/vat-lei-check": {
      "post": {
        "operationId": "verifyVatOrLei",
        "summary": "Official European Commission VIES VAT & GLEIF LEI verification",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Official VIES/GLEIF entity validation result"}}
      }
    },
    "/api/v1/cve-triage": {
      "post": {
        "operationId": "triageCve",
        "summary": "CISA KEV, FIRST EPSS & NIST NVD deterministic patch SLA triage",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Deterministic priority score and SLA patch tier"}}
      }
    },
    "/api/v1/domain-audit": {
      "post": {
        "operationId": "auditDomainSecurity",
        "summary": "SPF, DMARC, CAA, TLS, HTTP security headers, RDAP & tech-stack audit",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Security score, grade, email auth, TLS, headers, and findings"}}
      }
    },
    "/api/v1/impressum-check": {
      "post": {
        "operationId": "extractDachImprint",
        "summary": "Structured DACH Impressum (§ 5 DDG) legal entity extractor",
        "requestBody": {
          "required": true,
          "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DomainInput"}}}
        },
        "responses": {"200": {"description": "Extracted legal name, executives, VAT ID, and register court"}}
      }
    },
    "/api/v1/erechnung-check": {
      "post": {
        "operationId": "validateERechnung",
        "summary": "Deterministic XRechnung (UBL 2.1 / CII) & ZUGFeRD/Factur-X PDF (EN 16931) e-invoice validator (up to 2 MB, zero disk persistence)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["xml"],
                "properties": {"xml": {"type": "string", "description": "Raw XRechnung or ZUGFeRD XML string"}}
              }
            },
            "application/xml": {"schema": {"type": "string", "format": "binary"}},
            "application/pdf": {"schema": {"type": "string", "format": "binary"}}
          }
        },
        "responses": {"200": {"description": "EN 16931 / BR-DE validation score, invoice summary, IBAN Mod-97 & BR-CO-15 findings"}}
      }
    },
    "/api/v1/tenders": {
      "get": {
        "operationId": "listPublicTenders",
        "summary": "Daily refreshed EU TED v3 & German DÖE public procurement feed across 12 B2B sectors (5-item free preview; full feed with Vergabe-Radar Pro or API Pro key)",
        "parameters": [
          {"name": "sector", "in": "query", "schema": {"type": "string"}},
          {"name": "q", "in": "query", "schema": {"type": "string"}},
          {"name": "country", "in": "query", "schema": {"type": "string"}},
          {"name": "limit", "in": "query", "schema": {"type": "integer", "default": 50}}
        ],
        "responses": {"200": {"description": "Filtered EU & DACH procurement notices with deterministic K.O. summaries"}}
      }
    },
    "/api/v1/checkout/status": {
      "get": {
        "operationId": "getCheckoutCatalog",
        "summary": "Live self-serve pricing & Stripe Checkout catalog (includes €19 Prepaid Agent Wallet)",
        "responses": {"200": {"description": "Available fixed-price audits, prepaid agent wallets, and recurring API plans"}}
      }
    },
    "/api/v1/agent/checkout": {
      "post": {
        "operationId": "startAgentCheckout",
        "summary": "Step 1 of Headless AI Agent Commerce: create 1-tap Stripe approval URL (€19 = 500 Pro calls) + cryptographic claim_token (zero form/email required)",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "product_id": {"type": "string", "default": "agent-credits-19"},
                  "target": {"type": "string"},
                  "email": {"type": "string"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "Returns sessionId, claimToken, approvalUrl, and claimEndpoint"}}
      }
    },
    "/api/v1/agent/claim": {
      "post": {
        "operationId": "claimAgentPurchase",
        "summary": "Step 2 of Headless AI Agent Commerce: exchange paid sessionId + claimToken for live lb_live_... Bearer API key in memory",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["session_id", "claim_token"],
                "properties": {
                  "session_id": {"type": "string"},
                  "claim_token": {"type": "string"}
                }
              }
            }
          }
        },
        "responses": {"200": {"description": "Returns live apiKey (or awaiting_payment while human completes 1-tap checkout)"}}
      }
    }
  }
}
