{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://withme.so/research/aggregate-contract.json",
  "title": "WithMe Research aggregate pricing candidate v2",
  "description": "Aggregate-only review candidate, never automatic publication. Current list-price snapshot, not historical paid prices. Below-floor cells are omitted entirely. range_minor is for private review only and is never published. Separate precision and disclosure review is required.",
  "type": "object",
  "additionalProperties": false,
  "required": ["contract_version", "metric", "publication_status", "snapshot_at", "data_freshness", "operational_floor", "definition", "exclusions", "cohorts", "yearly_memberships"],
  "properties": {
    "contract_version": {"const": 2},
    "metric": {"const": "current_list_price_snapshot"},
    "publication_status": {"const": "review_required"},
    "snapshot_at": {"type": "string", "format": "date-time"},
    "data_freshness": {"type": "string", "format": "date-time"},
    "operational_floor": {"const": 20},
    "definition": {"const": "unweighted median of business medians of creator list-price medians"},
    "exclusions": {"type": "array", "items": {"type": "string"}},
    "cohorts": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["currency", "interval_unit", "interval_count", "format", "niche", "stage", "n_businesses", "median_minor", "p25_minor", "p75_minor", "range_minor"],
        "properties": {
          "currency": {"enum": ["GBP", "USD", "EUR", "SEK", "AUD", "CAD", "NZD"]},
          "interval_unit": {"enum": ["week", "month", "year", "one_time"]},
          "interval_count": {"type": "integer", "minimum": 1},
          "format": {"enum": ["membership", "async_coaching", "coaching_tier", "course", "digital_product", "coaching_call", "coaching_group", "community", "webinar"]},
          "niche": {"enum": ["pilates", "recipes", "coaching", "other", "all"]},
          "stage": {"enum": ["established", "selling"]},
          "n_businesses": {"type": "integer", "minimum": 20},
          "median_minor": {"type": "number", "exclusiveMinimum": 0},
          "p25_minor": {"type": "number", "exclusiveMinimum": 0},
          "p75_minor": {"type": "number", "exclusiveMinimum": 0},
          "range_minor": {"type": "array", "prefixItems": [{"type": "number", "exclusiveMinimum": 0}, {"type": "number", "exclusiveMinimum": 0}], "minItems": 2, "maxItems": 2}
        }
      }
    },
    "yearly_memberships": {
      "type": "array",
      "description": "Monthly versus yearly membership prices (interval count 1, creator's own currency). Each part is omitted entirely below the floor of 20 businesses; a cell with neither part is omitted.",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["niche", "stage"],
        "minProperties": 3,
        "properties": {
          "niche": {"enum": ["pilates", "recipes", "coaching", "other", "all"]},
          "stage": {"enum": ["established", "selling"]},
          "offers_yearly": {
            "type": "object",
            "additionalProperties": false,
            "required": ["n_monthly_businesses", "n_with_yearly"],
            "properties": {
              "n_monthly_businesses": {"type": "integer", "minimum": 20},
              "n_with_yearly": {"type": "integer", "minimum": 20}
            }
          },
          "discount": {
            "type": "object",
            "description": "1 - yearly / (12 x monthly) per product, median per creator then per business; p25 and p75 are the inclusive quartiles of business medians.",
            "additionalProperties": false,
            "required": ["n_businesses", "median", "p25", "p75"],
            "properties": {
              "n_businesses": {"type": "integer", "minimum": 20},
              "median": {"type": "number"},
              "p25": {"type": "number"},
              "p75": {"type": "number"}
            }
          }
        }
      }
    }
  }
}
