{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tunnelpowered-com/json-schema/tunnelpowered-com-website-record-schema.json",
  "title": "WebsiteRecord",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tunnelpowered-com-openapi.json#/components/schemas/WebsiteRecord",
  "allOf": [
    {
      "$ref": "#/$defs/RecordSummary"
    },
    {
      "type": "object",
      "properties": {
        "websiteUrl": {
          "type": "string",
          "format": "uri"
        },
        "businessIdentity": {
          "type": "object",
          "additionalProperties": true
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "faq": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "structuredPricing": {
          "type": "object"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "When the crawl behind this record ran — not when you fetched it."
        },
        "machineReadable": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "format": "uri"
          }
        },
        "note": {
          "type": "string",
          "description": "Present instead of the knowledge fields when no crawl has completed yet."
        }
      }
    }
  ],
  "$defs": {
    "HumanReview": {
      "type": "object",
      "description": "Whether a person at tunnel edited this KB entry by hand. This is a statement about the RECORD, not about the business — it is not the verification status. Read `verification.level` for that.",
      "required": [
        "reviewed"
      ],
      "properties": {
        "reviewed": {
          "type": "boolean"
        },
        "reviewedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "reviewedBy": {
          "type": "string"
        }
      }
    },
    "RecordSummary": {
      "type": "object",
      "required": [
        "kind",
        "slug",
        "name",
        "entityType",
        "humanReview",
        "url"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "entity",
            "website"
          ]
        },
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "entityType": {
          "type": "string",
          "enum": [
            "company",
            "merchant",
            "organization",
            "person",
            "other",
            "website"
          ]
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "humanReview": {
          "$ref": "#/$defs/HumanReview"
        },
        "verification": {
          "$ref": "#/$defs/Verification"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Verification": {
      "type": "object",
      "description": "Present on entity records. Absent on website records, which are not verified subjects.",
      "required": [
        "level",
        "status",
        "checkUrl"
      ],
      "properties": {
        "level": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "human",
            "automated",
            null
          ],
          "description": "`human` — a tunnel employee checked legal identity, channel control and that the service is real, and a second employee approved it. `automated` — machines confirmed the merchant controls the channels this record cites, and nothing more. `null` — not verified. Read this field; do not infer verification from the presence of a badge."
        },
        "status": {
          "type": "string",
          "enum": [
            "verified_by_human",
            "verified_automated",
            "unverified"
          ]
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Present when `level` is `automated`. States what the check did NOT establish. The same array is inside the signed attestation, so it cannot be stripped in transit without breaking the signature."
        },
        "checkUrl": {
          "type": "string",
          "format": "uri",
          "description": "Fetch this before a high-stakes action. Revocations propagate faster than caches expire."
        }
      }
    }
  }
}