{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/unflagdomain-com/json-schema/unflagdomain-com-scan-result-schema.json",
  "title": "ScanResult",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/unflagdomain-com-openapi.json#/components/schemas/ScanResult",
  "type": "object",
  "required": [
    "domain",
    "scanned_at",
    "flagged",
    "flag_count",
    "vendors",
    "source_errors",
    "cache",
    "links",
    "next_steps",
    "service"
  ],
  "properties": {
    "domain": {
      "type": "string"
    },
    "scanned_at": {
      "type": "string",
      "format": "date-time"
    },
    "flagged": {
      "type": "boolean"
    },
    "flag_count": {
      "type": "integer"
    },
    "vendors": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ScanVendor"
      }
    },
    "source_errors": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "source",
          "message"
        ],
        "properties": {
          "source": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      }
    },
    "cache": {
      "type": "string",
      "enum": [
        "hit",
        "miss"
      ]
    },
    "links": {
      "type": "object",
      "required": [
        "human_report",
        "vendor_catalog",
        "removal_guide",
        "docs"
      ],
      "properties": {
        "human_report": {
          "type": "string",
          "format": "uri"
        },
        "vendor_catalog": {
          "type": "string",
          "format": "uri"
        },
        "removal_guide": {
          "type": "string",
          "format": "uri"
        },
        "docs": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "next_steps": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "service": {
      "type": "object",
      "required": [
        "name",
        "url",
        "price_eur",
        "pricing_model",
        "summary",
        "guarantees_dispatch_not_delisting",
        "full_details"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "price_eur": {
          "type": "number"
        },
        "pricing_model": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "guarantees_dispatch_not_delisting": {
          "const": true
        },
        "full_details": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  },
  "$defs": {
    "ScanVendor": {
      "type": "object",
      "required": [
        "id",
        "name",
        "category",
        "threat",
        "detected_by",
        "verify_urls"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Canonical vendor id, e.g. symantec."
        },
        "name": {
          "type": "string"
        },
        "category": {
          "type": "string",
          "description": "av, web_blocklist, rbl, or search_engine."
        },
        "threat": {
          "type": [
            "string",
            "null"
          ]
        },
        "detected_by": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Detection sources that reported this vendor."
        },
        "verify_urls": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Public report page of each source in detected_by (same order) for this domain. Open it to confirm the verdict independently of this API."
        }
      }
    }
  }
}