{
  "datasetVersion": "1.0.0",
  "datasetId": "treatment-prices",
  "title": "Cosmeds quoted treatment price bands",
  "summary": "Quartile price bands derived from quotes UK clinics submitted through this site's request-a-quote service, published nationally and per city only where the sample clears the platform's disclosure floors.",
  "licence": {
    "name": "Creative Commons Attribution 4.0 International (CC BY 4.0)",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "attribution": "Cosmeds platform open data",
    "statement": "Free to reuse, republish and build on, including commercially, provided the dataset is credited and linked. Credit the source and link to the dataset page."
  },
  "page": "/open-data",
  "catalogue": "/api/open-data/catalogue.json",
  "endpoints": {
    "json": "/api/open-data/treatment-prices.json",
    "schema": "/api/open-data/treatment-prices/schema.json",
    "nationalCsv": "/api/open-data/treatment-prices/national.csv",
    "citiesCsv": "/api/open-data/treatment-prices/cities.csv"
  },
  "disclosureControl": {
    "minimumDistinctBusinesses": 5,
    "minimumSampleSize": 8,
    "maximumSingleBusinessSharePct": 50,
    "note": "Cells below either floor are withheld and counted in `withheld` by reason. Prescription-only medicines are excluded entirely. Minimum and maximum are never published: a cell's minimum is one clinic's exact quote."
  },
  "jsonDocument": {
    "endpoint": "/api/open-data/treatment-prices.json",
    "topLevelFields": {
      "datasetVersion": "Semantic version of this shape.",
      "asOf": "ISO timestamp the snapshot was served.",
      "latestComputedDay": "The single computation day (YYYY-MM-DD) every row is pinned to. Null when nothing has been computed.",
      "windowDays": "Recency window in days behind the published bands.",
      "provenance": "What is counted, the window, when it was computed, the source, and what is excluded.",
      "disclosureControl": "The floors a cell must clear, and the statistics that are published.",
      "national": "UK-wide band per treatment. Null when the section could not be computed.",
      "byCity": "Band per treatment per city. Null when unavailable.",
      "withheld": "Cells refused, by reason, with a count each. A withheld cell is not a zero. Reason vocabulary: below_k_anonymity, below_sample_floor, prescription_only_medicine, unknown_treatment, non_gbp_or_implausible, malformed_row, compliance_blocker.",
      "derivations": "Plain-language formula for every published figure.",
      "limitations": "What this dataset is not, stated before anyone cites it.",
      "emptyReason": "Why the dataset is empty, when it is. Null otherwise."
    }
  },
  "tables": {
    "national": {
      "endpoint": "/api/open-data/treatment-prices/national.csv",
      "grain": "One row per treatment across the UK.",
      "columns": {
        "treatmentSlug": "URL slug of the treatment.",
        "treatmentName": "Treatment name as published on the directory.",
        "currencyCode": "Always GBP. Non-GBP quotes are excluded, never converted.",
        "sampleSize": "Usable quotes behind the band after outlier trimming and the per-clinic cap.",
        "distinctBusinesses": "Clinics that contributed to the band.",
        "p25Gbp": "25th percentile of quoted amounts, whole pounds.",
        "medianGbp": "Median quoted amount, whole pounds.",
        "p75Gbp": "75th percentile of quoted amounts, whole pounds.",
        "windowDays": "Recency window the quotes were drawn from.",
        "computedDay": "Computation day the row is pinned to.",
        "basis": "Provenance sentence written when the aggregate was computed."
      }
    },
    "cities": {
      "endpoint": "/api/open-data/treatment-prices/cities.csv",
      "grain": "One row per treatment per city.",
      "columns": {
        "citySlug": "City slug the brief was placed in.",
        "treatmentSlug": "URL slug of the treatment.",
        "treatmentName": "Treatment name as published on the directory.",
        "currencyCode": "Always GBP.",
        "sampleSize": "Usable quotes behind the band.",
        "distinctBusinesses": "Clinics that contributed to the band.",
        "p25Gbp": "25th percentile, whole pounds.",
        "medianGbp": "Median, whole pounds.",
        "p75Gbp": "75th percentile, whole pounds.",
        "windowDays": "Recency window the quotes were drawn from.",
        "computedDay": "Computation day the row is pinned to.",
        "basis": "Provenance sentence written when the aggregate was computed."
      }
    }
  }
}