{
  "openapi": "3.1.0",
  "info": {
    "title": "Cybiq CRA classification (static artifact)",
    "summary": "Free, deterministic EU Cyber Resilience Act applicability classification. The full decision engine is published as a versioned static JSON artifact: no account, no payment.",
    "description": "Cybiq classifies products with digital elements against Regulation (EU) 2024/2847 (Cyber Resilience Act). This document describes the live agent surface: a static classification artifact regenerated from the same deterministic, citation-anchored engine that powers the wizard at https://cybiq.eu. Purchasing today happens by email (human-facing, manual delivery); an automated checkout endpoint will be documented here once it launches.",
    "version": "1.0.0"
  },
  "servers": [{ "url": "https://cybiq.eu" }],
  "paths": {
    "/api/decisions.json": {
      "get": {
        "operationId": "getDecisions",
        "summary": "Fetch the complete classification artifact",
        "description": "Returns every possible complete answer combination (14,904) mapped to its full decision. The artifact is deterministic: identical engine input yields a byte-identical file. Cache-friendly; safe to cache aggressively and re-fetch when `schema` changes.",
        "tags": ["classify"],
        "security": [],
        "responses": {
          "200": {
            "description": "The artifact.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/DecisionsArtifact" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DecisionsArtifact": {
        "type": "object",
        "required": [
          "schema",
          "celex",
          "answerKeys",
          "combinations",
          "distinctOutcomes",
          "index",
          "outcomes"
        ],
        "properties": {
          "schema": { "type": "string", "const": "cybiq.decisions/v1" },
          "celex": { "type": "string", "examples": ["32024R2847"] },
          "ojReference": { "type": "string" },
          "answerKeys": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Answer dimensions in index-key order."
          },
          "combinations": { "type": "integer", "const": 14904 },
          "distinctOutcomes": { "type": "integer" },
          "index": {
            "type": "object",
            "description": "Key format: \"market|ossMonetized|productKind|otherRegime|role|category\" → outcome id. The category segment is one of #/components/schemas/AnswerCategory.",
            "additionalProperties": { "type": "string" }
          },
          "outcomes": {
            "type": "object",
            "description": "Outcome id → full CraDecision. Deduplicated across combinations.",
            "additionalProperties": { "$ref": "#/components/schemas/CraDecision" }
          }
        }
      },
      "AnswerCategory": {
        "type": "string",
        "description": "Product category; Annex III Class I, Class II, Annex IV critical, or the not-listed default route.",
        "enum": [
          "general_app",
          "browser",
          "password_manager",
          "identity_access_management",
          "anti_malware",
          "vpn",
          "network_management",
          "siem",
          "boot_manager",
          "pki_certificate_issuance",
          "operating_system",
          "security_microprocessor_microcontroller",
          "smart_home_assistant_or_security",
          "connected_toy",
          "health_wearable",
          "network_device",
          "network_critical_infrastructure",
          "firewall_ids_ips",
          "tamper_resistant_chip",
          "hypervisor_container_runtime",
          "hsm_secure_element",
          "industrial_control",
          "other"
        ]
      },
      "CraDecision": {
        "type": "object",
        "required": [
          "verdict",
          "headline",
          "reasons",
          "sources",
          "nextSteps",
          "operatorRole",
          "conformityRoute",
          "obligations",
          "timeline",
          "packTier",
          "missing"
        ],
        "properties": {
          "verdict": {
            "type": "string",
            "enum": ["in_scope", "out_of_scope", "likely_out_of_scope", "needs_review"]
          },
          "headline": { "type": "string" },
          "reasons": { "type": "array", "items": { "type": "string" } },
          "sources": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Corpus quote IDs anchoring the decision; resolve pinpoints/quotes via https://cybiq.eu (rendered) or the published corpus module."
          },
          "nextSteps": {
            "type": "array",
            "items": { "type": "string" },
            "description": "Concrete follow-up actions for non-final verdicts; empty otherwise."
          },
          "operatorRole": { "enum": [null, "manufacturer", "importer", "distributor"] },
          "conformityRoute": {
            "enum": [null, "self_assessment", "class_one_route", "notified_body"]
          },
          "obligations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "article": { "type": "string" },
                "title": { "type": "string" },
                "detail": { "type": "string" },
                "sources": { "type": "array", "items": { "type": "string" } }
              }
            }
          },
          "timeline": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": { "type": "string", "format": "date" },
                "label": { "type": "string" },
                "description": { "type": "string" },
                "applies": { "type": "boolean" },
                "sources": { "type": "array", "items": { "type": "string" } }
              }
            }
          },
          "packTier": { "enum": ["single_doc", "full_pack", "full_pack_plus"] },
          "missing": { "type": "array", "items": { "type": "string" }, "const": [] }
        }
      }
    }
  }
}
