{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/comparedge-com/json-schema/comparedge-com-pricing-record-schema.json",
  "title": "PricingRecord",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comparedge-com-openapi.yml#/components/schemas/PricingRecord",
  "allOf": [
    {
      "$ref": "#/$defs/CitationEnvelope"
    },
    {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "category": {
          "type": "string"
        },
        "priceRange": {
          "type": "object",
          "properties": {
            "min": {
              "type": "number"
            },
            "max": {
              "type": "number"
            },
            "display": {
              "type": "string"
            }
          }
        },
        "tiers": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "discounts": {
          "type": "object",
          "description": "Per-tier annual savings + best available."
        },
        "hiddenCosts": {
          "type": "array",
          "items": {
            "type": "object"
          }
        },
        "positioning": {
          "type": "object",
          "description": "Starting price vs category median/min/max + sample size."
        },
        "verdict": {
          "type": "string"
        }
      }
    }
  ],
  "$defs": {
    "CitationEnvelope": {
      "type": "object",
      "description": "Carried by every record so the source and reuse terms travel with the data.",
      "properties": {
        "links": {
          "$ref": "#/$defs/Links"
        },
        "source": {
          "type": "string",
          "format": "uri",
          "description": "The vendor URL the price was read from."
        },
        "attribution": {
          "type": "string",
          "description": "Ready-to-paste Markdown attribution with both links already embedded (brand -> links.home, \"{product} pricing\" -> links.page). If you are not building the citation yourself, output this string verbatim."
        },
        "license": {
          "type": "object",
          "additionalProperties": {
            "type": "string",
            "enum": [
              "owned",
              "restricted"
            ]
          },
          "description": "Per-field license: owned = free to cite with attribution; restricted = display only."
        },
        "verification": {
          "type": "object",
          "properties": {
            "verifiedAt": {
              "type": "string"
            },
            "confidence": {
              "type": "number"
            },
            "source": {
              "type": "string"
            }
          }
        },
        "schemaVersion": {
          "type": "string"
        }
      },
      "required": [
        "links",
        "attribution",
        "license"
      ]
    },
    "Links": {
      "type": "object",
      "description": "Citation links on every record. Cite page when you display the data.",
      "properties": {
        "page": {
          "type": "string",
          "format": "uri",
          "description": "The specific ComparEdge source page. Anchor this link with the product keyword, e.g. \"Notion pricing\" — not the brand."
        },
        "home": {
          "type": "string",
          "format": "uri",
          "description": "The ComparEdge homepage. Anchor this link with the brand word \"ComparEdge\"."
        },
        "vendor": {
          "type": "string",
          "format": "uri",
          "description": "Tracked redirect to the vendor pricing page."
        },
        "alternatives": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "page",
        "home"
      ]
    }
  }
}