{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hostinger/main/json-schema/hostinger-agent-readiness-v1-scans-scan-resource-schema.json",
  "title": "AgentReadiness.V1.Scans.ScanResource",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hostinger-agent-readiness-scans-api-openapi.yml#/components/schemas/AgentReadiness.V1.Scans.ScanResource",
  "required": [
    "domain",
    "status",
    "score",
    "grade",
    "is_unreachable",
    "scanner_version",
    "is_outdated",
    "scanned_at",
    "categories",
    "unassessed_categories",
    "results"
  ],
  "properties": {
    "domain": {
      "description": "Domain name that was scanned",
      "type": "string"
    },
    "status": {
      "description": "Scan status. Result fields are null until the status is `completed`.",
      "type": "string",
      "enum": [
        "pending",
        "completed",
        "failed"
      ]
    },
    "score": {
      "description": "Agent readiness score from 0 to 100. Null unless completed, and null when unreachable.",
      "type": [
        "integer",
        "null"
      ]
    },
    "grade": {
      "description": "Letter grade for the score, from `A` to `F`. Null unless completed, and null when unreachable.",
      "type": [
        "string",
        "null"
      ]
    },
    "is_unreachable": {
      "description": "Whether the website homepage could not be fetched",
      "type": "boolean"
    },
    "scanner_version": {
      "description": "Version of the scoring method that produced this scan",
      "type": "integer"
    },
    "is_outdated": {
      "description": "Whether the scan was produced by an older scoring method than the current one",
      "type": "boolean"
    },
    "scanned_at": {
      "description": "When the scan finished. Null unless completed.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "categories": {
      "oneOf": [
        {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoriesResource"
        }
      ],
      "description": "Score breakdown per category. Null unless completed."
    },
    "unassessed_categories": {
      "description": "Categories where no check could be counted. They still cost their full weight. Null unless completed.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "results": {
      "description": "Result of every check. Null unless completed.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/AgentReadiness.V1.Scans.CheckResultResource"
      }
    }
  },
  "type": "object",
  "$defs": {
    "AgentReadiness.V1.Scans.CategoriesResource": {
      "required": [
        "crawl_permission",
        "findability",
        "readability",
        "structured_meaning",
        "commercial_legibility",
        "agent_native_content",
        "agent_interaction"
      ],
      "properties": {
        "crawl_permission": {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoryScoreResource"
        },
        "findability": {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoryScoreResource"
        },
        "readability": {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoryScoreResource"
        },
        "structured_meaning": {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoryScoreResource"
        },
        "commercial_legibility": {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoryScoreResource"
        },
        "agent_native_content": {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoryScoreResource"
        },
        "agent_interaction": {
          "$ref": "#/$defs/AgentReadiness.V1.Scans.CategoryScoreResource"
        }
      },
      "type": "object"
    },
    "AgentReadiness.V1.Scans.CategoryScoreResource": {
      "required": [
        "score",
        "weight",
        "earned",
        "possible"
      ],
      "properties": {
        "score": {
          "description": "Points this category contributes to the 0-100 total score",
          "type": "integer"
        },
        "weight": {
          "description": "Maximum points this category can contribute",
          "type": "integer"
        },
        "earned": {
          "description": "Points earned by the counted checks in this category",
          "type": "integer"
        },
        "possible": {
          "description": "Points possible for the counted checks in this category",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "AgentReadiness.V1.Scans.CheckResultResource": {
      "required": [
        "check_id",
        "category",
        "status",
        "earned",
        "possible",
        "evidence",
        "fix"
      ],
      "properties": {
        "check_id": {
          "description": "Check ID, as listed by the `List checks` operation",
          "type": "string"
        },
        "category": {
          "description": "Category the check belongs to",
          "type": "string"
        },
        "status": {
          "description": "Check outcome. `not_applicable` and `error` checks do not count towards the category score.",
          "type": "string",
          "enum": [
            "pass",
            "partial",
            "fail",
            "not_applicable",
            "error"
          ]
        },
        "earned": {
          "description": "Points earned by this check",
          "type": "integer"
        },
        "possible": {
          "description": "Points this check can earn",
          "type": "integer"
        },
        "evidence": {
          "description": "What the scanner observed",
          "type": "string"
        },
        "fix": {
          "description": "How to improve the result, or null when there is nothing to fix",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    }
  }
}