{
  "type": "object",
  "properties": {
    "billing_event": {
      "type": [
        "string",
        "null"
      ]
    },
    "billing_quantity": {
      "type": "integer",
      "minimum": 0,
      "maximum": 1
    },
    "checked_at": {
      "type": "string",
      "format": "date-time"
    },
    "company_website": {
      "type": [
        "null",
        "string"
      ]
    },
    "completed_at": {
      "type": "string",
      "format": "date-time"
    },
    "coverage_complete": {
      "type": "boolean"
    },
    "downloaded_bytes": {
      "type": "integer",
      "minimum": 0
    },
    "duration_ms": {
      "type": "integer",
      "minimum": 0
    },
    "http_request_count": {
      "type": "integer",
      "minimum": 0
    },
    "message": {
      "type": "string"
    },
    "program_count": {
      "type": "integer",
      "minimum": 0
    },
    "programs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "action_destination_checked": {
            "type": "boolean"
          },
          "action_link_text": {
            "type": [
              "null",
              "string"
            ]
          },
          "action_link_url": {
            "type": [
              "null",
              "string"
            ]
          },
          "application_link_checked": {
            "type": "boolean"
          },
          "application_link_text": {
            "type": [
              "null",
              "string"
            ]
          },
          "application_url": {
            "type": [
              "null",
              "string"
            ]
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "evidence_field": {
            "type": "string"
          },
          "evidence_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "evidence_text": {
            "type": "string"
          },
          "program_title": {
            "type": "string"
          },
          "program_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "source_url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          }
        },
        "required": [
          "checked_at",
          "evidence_field",
          "evidence_sha256",
          "program_title",
          "program_types",
          "source_url"
        ],
        "additionalProperties": false
      }
    },
    "report_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "schema_version": {
      "const": "1.0"
    },
    "source_errors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "error_code": {
            "type": "string"
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          }
        },
        "required": [
          "error_code",
          "url"
        ],
        "additionalProperties": false
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "discovered_from": {
            "type": [
              "null",
              "string"
            ]
          },
          "evidence_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "source_type": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "checked_at",
          "discovered_from",
          "evidence_sha256",
          "source_type",
          "url"
        ],
        "additionalProperties": false
      }
    },
    "status": {
      "enum": [
        "verified_partner_program",
        "unknown",
        "invalid_input"
      ]
    }
  },
  "required": [
    "billing_event",
    "billing_quantity",
    "checked_at",
    "company_website",
    "completed_at",
    "coverage_complete",
    "downloaded_bytes",
    "duration_ms",
    "http_request_count",
    "message",
    "program_count",
    "programs",
    "report_id",
    "schema_version",
    "source_errors",
    "sources",
    "status"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Partner Program Finder — Verified B2B Evidence report"
}
