{
  "components": {
    "schemas": {
      "ChangeRecord": {
        "$id": "https://pharmasync.xyz/api/v1/schema/ChangeRecord.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "change_type": {
            "enum": [
              "NEW",
              "UPDATED",
              "RESOLVED",
              "EXPIRED"
            ],
            "type": "string"
          },
          "detected_at": {
            "format": "date-time",
            "type": "string"
          },
          "dmd_code": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "headline": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "description": "WORKFORCE reserved for the Phase-4 module; only SUPPLY is populated before then.",
            "enum": [
              "SUPPLY",
              "WORKFORCE"
            ],
            "type": "string"
          }
        },
        "required": [
          "change_type",
          "detected_at",
          "headline",
          "id",
          "kind"
        ],
        "title": "ChangeRecord",
        "type": "object"
      },
      "Coverage": {
        "$id": "https://pharmasync.xyz/api/v1/schema/Coverage.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "in_scope": {
            "description": "Whether this source for this nation is within what Pharmasync ingests. A declaration of scope, NOT a claim that records are currently held — see records_held in /status.",
            "type": "boolean"
          },
          "nation": {
            "enum": [
              "ENG",
              "SCO",
              "WAL",
              "NIR"
            ],
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "scheduled": {
            "description": "Whether the scheduled pipeline fetches this source. In scope and on a schedule are different claims: dm+d is in scope and arrives by manual TRUD download. Only a scheduled source can be stale.",
            "type": "boolean"
          },
          "since": {
            "format": "date",
            "type": "string"
          },
          "source_id": {
            "type": "string"
          }
        },
        "required": [
          "in_scope",
          "nation",
          "scheduled",
          "source_id"
        ],
        "title": "Coverage",
        "type": "object"
      },
      "DemandStat": {
        "$id": "https://pharmasync.xyz/api/v1/schema/DemandStat.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "dmd_code": {
            "type": "string"
          },
          "items_by_region": {
            "additionalProperties": {
              "type": "number"
            },
            "description": "Keyed by region code; region_type says which kind.",
            "type": "object"
          },
          "items_national": {
            "type": "number"
          },
          "key_basis": {
            "description": "How the product was keyed: SNOMED-native, or bridged from BNF (pre-Nov-2020 backfill).",
            "enum": [
              "snomed_native",
              "bnf_bridged"
            ],
            "type": "string"
          },
          "month": {
            "format": "date",
            "type": "string"
          },
          "nation": {
            "enum": [
              "ENG",
              "SCO",
              "WAL",
              "NIR"
            ],
            "type": "string"
          },
          "region_type": {
            "description": "ICB is England-only — hence the neutral field name.",
            "enum": [
              "ICB",
              "HEALTH_BOARD",
              "LOCALITY"
            ],
            "type": "string"
          },
          "trend_12m": {
            "type": "number"
          }
        },
        "required": [
          "dmd_code",
          "items_by_region",
          "items_national",
          "key_basis",
          "month",
          "nation",
          "region_type"
        ],
        "title": "DemandStat",
        "type": "object"
      },
      "Designation": {
        "$id": "https://pharmasync.xyz/api/v1/schema/Designation.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "first_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "form": {
            "description": "\"All\" where the restriction covers every form.",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "description": "The administrative act this designation records. Only RESTRICTED_EXPORT today.",
            "enum": [
              "RESTRICTED_EXPORT"
            ],
            "type": "string"
          },
          "name": {
            "description": "The medicine name as the source states it — molecule level, not a dm+d presentation.",
            "type": "string"
          },
          "nations": {
            "description": "Where the designation applies. The export prohibition is UK-wide law, so all four nations are evidenced.",
            "enum": [
              "ENG",
              "SCO",
              "WAL",
              "NIR"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "restricted_from": {
            "description": "The date the medicine was listed, as the source states it.",
            "format": "date",
            "type": "string"
          },
          "source_published_at": {
            "description": "When the list itself was last published (gov.uk content API public_updated_at).",
            "format": "date",
            "type": "string"
          },
          "source_url": {
            "format": "uri",
            "type": "string"
          },
          "strength": {
            "description": "\"All\" where the restriction covers every strength.",
            "type": "string"
          }
        },
        "required": [
          "first_seen_at",
          "form",
          "id",
          "kind",
          "name",
          "nations",
          "restricted_from",
          "source_published_at",
          "source_url",
          "strength"
        ],
        "title": "Designation",
        "type": "object"
      },
      "DmdProduct": {
        "$id": "https://pharmasync.xyz/api/v1/schema/DmdProduct.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "dmd_code": {
            "description": "dm+d VMP code (a SNOMED CT identifier). The identity; the name is the convenience.",
            "type": "string"
          },
          "dmd_release": {
            "type": "string"
          },
          "form": {
            "type": "string"
          },
          "name": {
            "description": "The dm+d product name, verbatim.",
            "type": "string"
          },
          "retired": {
            "description": "True when dm+d has retired this concept. The event referencing it stands; the product no longer does.",
            "type": "boolean"
          },
          "strength": {
            "type": "string"
          }
        },
        "required": [
          "dmd_code",
          "dmd_release",
          "name",
          "retired"
        ],
        "title": "DmdProduct",
        "type": "object"
      },
      "Product": {
        "$id": "https://pharmasync.xyz/api/v1/schema/Product.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "aliases": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "atc_class": {
            "type": "string"
          },
          "dmd_code": {
            "type": "string"
          },
          "eu_critical": {
            "type": "boolean"
          },
          "form": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "strength": {
            "type": "string"
          },
          "who_eml": {
            "type": "boolean"
          }
        },
        "required": [
          "aliases",
          "dmd_code",
          "eu_critical",
          "name",
          "who_eml"
        ],
        "title": "Product",
        "type": "object"
      },
      "RegionalRollup": {
        "$id": "https://pharmasync.xyz/api/v1/schema/RegionalRollup.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "items_total": {
            "description": "Sum of items_by_region[region_code] across every referenced medicine for this month.",
            "type": "number"
          },
          "medicine_count": {
            "description": "Distinct dm+d codes with any volume in this region this month.",
            "type": "number"
          },
          "month": {
            "format": "date",
            "type": "string"
          },
          "region_code": {
            "type": "string"
          },
          "region_type": {
            "description": "ICB is England-only — hence the neutral field name.",
            "enum": [
              "ICB",
              "HEALTH_BOARD",
              "LOCALITY"
            ],
            "type": "string"
          }
        },
        "required": [
          "items_total",
          "medicine_count",
          "month",
          "region_code",
          "region_type"
        ],
        "title": "RegionalRollup",
        "type": "object"
      },
      "SlippageRecord": {
        "$id": "https://pharmasync.xyz/api/v1/schema/SlippageRecord.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "dmd_code": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "prior_date": {
            "type": "string"
          },
          "recorded_at": {
            "type": "string"
          },
          "revised_date": {
            "type": "string"
          },
          "slip_days": {
            "type": "number"
          }
        },
        "required": [
          "dmd_code",
          "event_id",
          "prior_date",
          "recorded_at",
          "revised_date",
          "slip_days"
        ],
        "title": "SlippageRecord",
        "type": "object"
      },
      "StatusArtefact": {
        "properties": {
          "api_version": {
            "const": "v1",
            "type": "string"
          },
          "generated_at": {
            "format": "date-time",
            "type": "string"
          },
          "limitations": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "pipeline_healthy": {
            "type": "boolean"
          },
          "sources": {
            "items": {
              "properties": {
                "hours_since_success": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "in_scope": {
                  "type": "boolean"
                },
                "last_run_outcome": {
                  "description": "Outcome of the whole run, not of the HTTP request. `drift` means the source answered and still yielded nothing usable.",
                  "type": "string"
                },
                "last_success_at": {
                  "format": "date-time",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "nation": {
                  "type": "string"
                },
                "records_held": {
                  "description": "Records held for this source. null = not measured; 0 = measured as empty.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "scheduled": {
                  "description": "Fetched by the scheduled run. Only a scheduled source can be stale.",
                  "type": "boolean"
                },
                "source_id": {
                  "type": "string"
                },
                "stale": {
                  "type": "boolean"
                }
              },
              "required": [
                "source_id",
                "nation",
                "in_scope",
                "scheduled",
                "last_success_at",
                "last_run_outcome",
                "stale",
                "records_held"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "stale_after_hours": {
            "type": "number"
          }
        },
        "required": [
          "api_version",
          "generated_at",
          "pipeline_healthy",
          "stale_after_hours",
          "sources",
          "limitations"
        ],
        "type": "object"
      },
      "SupplyEvent": {
        "$id": "https://pharmasync.xyz/api/v1/schema/SupplyEvent.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "detail": {
            "type": "string"
          },
          "dmd_code": {
            "description": "dm+d VMP code (a SNOMED CT identifier)",
            "type": "string"
          },
          "effective_from": {
            "format": "date",
            "type": "string"
          },
          "effective_from_basis": {
            "description": "How effective_from is known: published by the source, or first observed by Pharmasync.",
            "enum": [
              "published",
              "first_observed"
            ],
            "type": "string"
          },
          "effective_to": {
            "format": "date",
            "type": "string"
          },
          "first_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "MSN",
              "SSP",
              "CONCESSION"
            ],
            "type": "string"
          },
          "nations": {
            "description": "Where this event is EVIDENCED to apply — never inferred. See /api/v1/coverage for what Pharmasync ingests.",
            "enum": [
              "ENG",
              "SCO",
              "WAL",
              "NIR"
            ],
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "reason_code": {
            "description": "Taxonomy code only — upstream prose is discarded (OI-008)",
            "enum": [
              "manufacturing",
              "api_supply",
              "discontinuation",
              "shipping",
              "demand",
              "unstated"
            ],
            "type": "string"
          },
          "source_published_at": {
            "format": "date",
            "type": "string"
          },
          "source_published_at_basis": {
            "description": "How source_published_at is known: stated by the source, taken from an HTTP Last-Modified header, or the date Pharmasync first observed the record.",
            "enum": [
              "published",
              "http_last_modified",
              "first_observed"
            ],
            "type": "string"
          },
          "source_url": {
            "format": "uri",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "dmd_code",
          "effective_from",
          "effective_from_basis",
          "first_seen_at",
          "id",
          "kind",
          "nations",
          "source_published_at",
          "source_published_at_basis",
          "source_url",
          "status"
        ],
        "title": "SupplyEvent",
        "type": "object"
      },
      "Tier": {
        "$id": "https://pharmasync.xyz/api/v1/schema/Tier.json",
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "dmd_code": {
            "description": "The dm+d VMP code the tier applies to. Join to /products.json for the name.",
            "type": "string"
          },
          "in_force_until": {
            "description": "Present only where currency is evidenced by a published end date (an SSP expiry). Absent for a WATCH: CPE publishes an MSN's initial notification only, so current resolution is not evidenced — the absent field is that fact.",
            "format": "date",
            "type": "string"
          },
          "market_stress": {
            "description": "Signal (§7.2), never a rung: a price concession for this medicine is present in the current corpus. Reported beside the tier and never folded into it. Month-on-month price movement is not yet computed.",
            "type": "boolean"
          },
          "source_date": {
            "description": "The date of the justifying act, as its source published it.",
            "format": "date",
            "type": "string"
          },
          "source_url": {
            "description": "The act, verifiable at its source without trusting Pharmasync.",
            "format": "uri",
            "type": "string"
          },
          "tier": {
            "description": "The highest rung of government action in force for this medicine (D-009). A citation of an administrative act, not a Pharmasync score.",
            "enum": [
              "WATCH",
              "CONCERN",
              "CRITICAL"
            ],
            "type": "string"
          },
          "triggering_act": {
            "description": "The act that justifies the tier, in plain words — e.g. \"Serious Shortage Protocol in force\".",
            "type": "string"
          }
        },
        "required": [
          "dmd_code",
          "market_stress",
          "source_date",
          "source_url",
          "tier",
          "triggering_act"
        ],
        "title": "Tier",
        "type": "object"
      }
    }
  },
  "info": {
    "contact": {
      "name": "Pharmasync",
      "url": "https://pharmasync.xyz"
    },
    "description": "A free, no-login, deterministic supply-intelligence layer for UK community pharmacy.\nMachines are first-class users (§10): static artefacts on a CDN, stable dm+d identifiers,\nISO-8601 timestamps, and `source_url` + `source_published_at` on every record so an agent\ncan verify a value **without trusting Pharmasync**.\n\nNo authentication, no keys, no registration, no rate limits. Nothing here is clinical:\nPharmasync covers the logistics side of the line only and links out for the clinical layer.\n\n**The corpus and the delta feed are published** — `/events.json` for current state and\n`/changes/index.json` for what moved, with a cursor that is a position in a list rather\nthan a query parameter, because there is no server here to answer one. Both appear only\nwhen the build had a database to read; their absence from `paths` means this build did\nnot look, which is a different claim from an empty corpus.\n\n**What this version does not publish, stated plainly.** No demand statistics, no\nself-audit, no workforce data: `DemandStat` and the workforce enum value are published,\nfrozen and deliberately unpopulated. A schema without records behind it is a reservation,\nnot a promise that data exists. `SupplyEvent.reason_code` is the same: reserved, but absent\non every record — the CPE notifications state no discrete logistics cause to map (D-050),\nand it is left absent rather than guessed. The severity ladder now has all three rungs —\nMSN (WATCH), restricted-export designation (CONCERN) and SSP (CRITICAL) — but the CONCERN\nlist carries no delisting detection yet (see /methodology/severity.json, which says so itself).\n\n**To poll cheaply, fetch /manifest.json first.** It carries one `manifest_sha256` over\nevery artefact, so a single request answers \"has anything moved?\" for the whole surface,\nwhere conditional requests answer it one file at a time. If that value is unchanged,\nnothing is. If it changed, the per-artefact `sha256` says which files are worth\nre-fetching. For the change feed, `changes/index.json` then tells you which segments to\nread and which are closed for ever.\n\n**HTTP validators are the host's rather than ours, and that is a decision (D-041), not an\noversight.** `If-None-Match` returns 304 correctly, but the `ETag` is the CDN's and\n`Last-Modified` is its cache-fill time — an artefact unchanged for days reports itself\nmodified seconds ago, and the value differs between edges for byte-identical content.\nPharmasync does not override them: the manifest is the better mechanism for this contract,\nand a validator we set that the platform silently replaced would be a promise we could not\nkeep. Use the manifest for content identity, and the HTTP validators for transport.",
    "license": {
      "name": "See /api/v1/licence.json for full terms and upstream restrictions",
      "url": "https://pharmasync.xyz/api/v1/licence.json"
    },
    "summary": "UK community-pharmacy medicine supply: shortages, SSPs and price concessions, with provenance on every value.",
    "title": "Pharmasync API",
    "version": "1.0.0",
    "x-generated-at": "2026-09-15T11:42:36.000Z"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.1",
  "paths": {
    "/changes/2026-08.json": {
      "get": {
        "description": "Every change Pharmasync detected during 2026-08, in detection order. A segment for a month that has passed can never gain rows — `detected_at` is the run timestamp, so it only moves forward — and `closed: true` in the feed index says so per segment. Cache a closed segment indefinitely; re-fetch only the open one, and deduplicate by `id`.",
        "operationId": "getChanges202608",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ChangeRecord"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Changes detected in 2026-08",
        "tags": [
          "data"
        ]
      }
    },
    "/changes/2026-09.json": {
      "get": {
        "description": "Every change Pharmasync detected during 2026-09, in detection order. A segment for a month that has passed can never gain rows — `detected_at` is the run timestamp, so it only moves forward — and `closed: true` in the feed index says so per segment. Cache a closed segment indefinitely; re-fetch only the open one, and deduplicate by `id`.",
        "operationId": "getChanges202609",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ChangeRecord"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Changes detected in 2026-09",
        "tags": [
          "data"
        ]
      }
    },
    "/changes/index.json": {
      "get": {
        "description": "The append-only change feed (§10), as a list of month segments. **There is no query parameter and no server**: the cursor is a position in this list. Fetch the segments at or after the cursor you stored, deduplicate by `id` — ids are stable, so re-reading the open segment yields the same id for the same fact — and store the newest cursor you fully consumed. `cursor_protocol` states this in the artefact itself.\n\n**Read `limitations` before trusting a short feed.** Change detection began after the ledger already held rows, so events first seen before that carry no `NEW` record and never will: back-filling would mean inventing detection dates for observations nobody made. The index derives and states the size of that gap. For current state read /events.json, which is complete.",
        "operationId": "getChangeFeed",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Delta feed index and cursor protocol",
        "tags": [
          "data"
        ]
      }
    },
    "/coverage.json": {
      "get": {
        "description": "Answers \"is the gap in the data, or in you?\" (D-003). Every source is listed against every nation including those out of scope, because `in_scope: false` is a statement and a missing row is not.\n\n**This artefact declares scope and nothing else.** `in_scope: true` does not mean records are held — for that, read `records_held` in /status, where `null` means not measured and `0` means measured as empty. The field was called `ingested` until D-023; the past tense read as a claim about holdings and it was not one.",
        "operationId": "getCoverage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Coverage"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Declared ingestion, per source per nation",
        "tags": [
          "honesty"
        ]
      }
    },
    "/demand.json": {
      "get": {
        "description": "Published artefact. No description registered in `openapi.ts` — see the artefact itself.",
        "operationId": "get_demand_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "demand.json",
        "tags": [
          "meta"
        ]
      }
    },
    "/designations.json": {
      "get": {
        "description": "The restricted-medicines list as the state states it (D-009): medicines that cannot be parallel-exported or hoarded from the UK. Being listed is the administrative act that evidences the CONCERN tier — export is legally prohibited — so every row is a citation, not a Pharmasync judgement, and carries the `source_url` and `restricted_from` date.\n\n**Name-level, not dm+d-level.** Most rows restrict *every* strength and form of a molecule, so a designation carries no `dmd_code`: it is not a `SupplyEvent`, it is its own entity. It is joined to dm+d codes for the CONCERN tier via the dm+d VTM (molecule) — name → VTM → VMP codes — which feeds /tiers.json (D-047); this artefact remains the source, ingested and verifiable.\n\n**A current-listing snapshot.** A medicine removed from the list is not yet detected as de-listed, so a designation can outlast its listing until delisting inference lands. The UK-wide `nations` reflect that the prohibition is UK law, not a claim about coverage elsewhere.\n\n**Present only when the build had a database to read** — its absence means the build did not look, which is a different claim from an empty list.",
        "operationId": "getDesignations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Designation"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Government designations over named medicines — the restricted-export (CONCERN) rung",
        "tags": [
          "data"
        ]
      }
    },
    "/events.json": {
      "get": {
        "description": "The current state of the corpus (§10): the newest `SupplyEvent` per subject — an SSP number, or a concession's medicine and pack size. A subject whose row was republished — an SSP expiry re-dated, or a concession list re-issued under a new update date — appears **once** here, as its latest observation, not once per observation.\n\n**The ledger itself is append-only and keeps every observation**, so `/status.records_held`, which counts ledger rows, can legitimately exceed the number served here. This file answers *what is true now*; the change feed answers *what moved*; the ledger keeps both. (The raw ledger row count is what is checked against `records_held` at build time.)\n\n**Present only when the build had a database to read.** Its absence means the build did not look, which is a different claim from an empty corpus — the same distinction `records_held` draws between `null` and `0`.\n\n**It carries dm+d codes and no medicine names.** Resolve a code through dm+d, which is Open Government Licence and published by NHSBSA via TRUD; see /licence.json.",
        "operationId": "getEvents",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SupplyEvent"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "The supply-event corpus — current state",
        "tags": [
          "data"
        ]
      }
    },
    "/index.json": {
      "get": {
        "description": "Entry point: every published artefact, by path. No keys, no registration, no rate limits.",
        "operationId": "getIndex",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Artefact index",
        "tags": [
          "meta"
        ]
      }
    },
    "/licence.json": {
      "get": {
        "description": "Machine-readable licence (§10). States what is openly licensed **and what is deliberately absent**: dm+d is Open Government Licence, and Pharmasync publishes dm+d codes as identifiers rather than mirroring the dataset — a choice, not a restriction. The Bennett BNF→dm+d map is the genuinely restricted input: non-commercial research licence, so nothing derived from it can enter an open corpus.",
        "operationId": "getLicence",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Licence and redistribution terms",
        "tags": [
          "meta"
        ]
      }
    },
    "/manifest.json": {
      "get": {
        "description": "A SHA-256 and byte count per artefact, over **the exact bytes served** — hash the response body as received, without reformatting or trimming, and it will match. Plus a single `manifest_sha256` that changes if any artefact changed, so a consumer can ask \"has anything moved?\" with one request rather than re-fetching everything. `manifest_sha256` is computed over the `artefacts` array as a value, not over this file — the manifest is the one artefact that cannot describe itself.\n\n**This is the intended polling mechanism, in preference to conditional requests** (D-041). One fetch of this file reports change across the entire surface; `If-None-Match` reports it per file, against an `ETag` the CDN computes rather than the SHA-256 published here. The two identities are unrelated by design: this one is the content, that one is the transport.",
        "operationId": "getManifest",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Integrity manifest",
        "tags": [
          "meta"
        ]
      }
    },
    "/methodology/severity.json": {
      "get": {
        "description": "Tiers are **observed state actions, not a Pharmasync formula** (D-009): an MSN in force (WATCH), a restricted-export listing (CONCERN), an SSP in force (CRITICAL). Every assignment carries the `source_url` and date of the act that justifies it, so any agent can recompute a tier from the primary sources without trusting Pharmasync. Publishes its own limitations, including that the CONCERN list is a current-listing snapshot with no delisting detection yet.",
        "operationId": "getSeverityMethodology",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Severity tiers and signal weights",
        "tags": [
          "methodology"
        ]
      }
    },
    "/openapi.json": {
      "get": {
        "description": "The OpenAPI 3.1 description of /api/v1, generated from the emitted artefact set.",
        "operationId": "getOpenApi",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "This document",
        "tags": [
          "meta"
        ]
      }
    },
    "/pharmacy-estate.json": {
      "get": {
        "description": "Published artefact. No description registered in `openapi.ts` — see the artefact itself.",
        "operationId": "get_pharmacy_estate_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "pharmacy-estate.json",
        "tags": [
          "meta"
        ]
      }
    },
    "/products.json": {
      "get": {
        "description": "The lookup that makes a code-keyed corpus readable (D-042). Every event carries a `dmd_code` and no name; this resolves those codes to the dm+d name, form and strength, so an agent does not need a TRUD account and a 217 MB download to learn which medicine is in shortage.\n\n**Referenced products only — this is not a mirror of dm+d.** It covers the codes the ledger mentions, measured at under 1% of the master, and grows only as the corpus does. TRUD publishes the full dataset openly and duplicating it here would serve nobody.\n\n**The code is the identity; the name is the convenience.** dm+d revises names, so each row states the `dmd_release` it was read from. `retired: true` marks a concept dm+d has withdrawn — the event referencing it still stands, which is why the row is published rather than dropped.\n\ndm+d is Open Government Licence; see /licence.json for the attribution this content carries.",
        "operationId": "getProducts",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DmdProduct"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "dm+d names for the products this corpus references",
        "tags": [
          "data"
        ]
      }
    },
    "/region-names.json": {
      "get": {
        "description": "Published artefact. No description registered in `openapi.ts` — see the artefact itself.",
        "operationId": "get_region_names_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "region-names.json",
        "tags": [
          "meta"
        ]
      }
    },
    "/regional-rollup.json": {
      "get": {
        "description": "Published artefact. No description registered in `openapi.ts` — see the artefact itself.",
        "operationId": "get_regional_rollup_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "regional-rollup.json",
        "tags": [
          "meta"
        ]
      }
    },
    "/schema/AuditSnapshotRow.json": {
      "get": {
        "description": "The published schema for `AuditSnapshotRow`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaAuditSnapshotRow",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for AuditSnapshotRow",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/ChangeRecord.json": {
      "get": {
        "description": "The published schema for `ChangeRecord`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaChangeRecord",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for ChangeRecord",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/Coverage.json": {
      "get": {
        "description": "The published schema for `Coverage`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaCoverage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for Coverage",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/DemandStat.json": {
      "get": {
        "description": "The published schema for `DemandStat`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaDemandStat",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for DemandStat",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/Designation.json": {
      "get": {
        "description": "The published schema for `Designation`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaDesignation",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for Designation",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/DmdProduct.json": {
      "get": {
        "description": "The published schema for `DmdProduct`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaDmdProduct",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for DmdProduct",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/PharmacyEstateRecord.json": {
      "get": {
        "description": "The published schema for `PharmacyEstateRecord`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaPharmacyEstateRecord",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for PharmacyEstateRecord",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/Product.json": {
      "get": {
        "description": "The published schema for `Product`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaProduct",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for Product",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/RegionName.json": {
      "get": {
        "description": "The published schema for `RegionName`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaRegionName",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for RegionName",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/RegionalRollup.json": {
      "get": {
        "description": "The published schema for `RegionalRollup`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaRegionalRollup",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for RegionalRollup",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/Sibling.json": {
      "get": {
        "description": "The published schema for `Sibling`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaSibling",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for Sibling",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/SlippageRecord.json": {
      "get": {
        "description": "The published schema for `SlippageRecord`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaSlippageRecord",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for SlippageRecord",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/SupplyEvent.json": {
      "get": {
        "description": "The published schema for `SupplyEvent`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaSupplyEvent",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for SupplyEvent",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/Tier.json": {
      "get": {
        "description": "The published schema for `Tier`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaTier",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for Tier",
        "tags": [
          "schemas"
        ]
      }
    },
    "/schema/WorkforceStat.json": {
      "get": {
        "description": "The published schema for `WorkforceStat`, generated from the same declarations the ingestion pipeline enforces, so the published contract and the enforced one cannot drift. `additionalProperties: false` is emitted deliberately — agents get the same refusal the pipeline does.",
        "operationId": "getSchemaWorkforceStat",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "A JSON Schema 2020-12 document describing one published entity.",
                  "properties": {
                    "$id": {
                      "type": "string"
                    },
                    "$schema": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "boolean"
                    },
                    "properties": {
                      "type": "object"
                    },
                    "required": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "title": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "$schema",
                    "$id",
                    "title",
                    "type",
                    "properties",
                    "required"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "JSON Schema for WorkforceStat",
        "tags": [
          "schemas"
        ]
      }
    },
    "/self-audit.json": {
      "get": {
        "description": "Published artefact. No description registered in `openapi.ts` — see the artefact itself.",
        "operationId": "get_self_audit_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "self-audit.json",
        "tags": [
          "meta"
        ]
      }
    },
    "/siblings.json": {
      "get": {
        "description": "Published artefact. No description registered in `openapi.ts` — see the artefact itself.",
        "operationId": "get_siblings_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "siblings.json",
        "tags": [
          "meta"
        ]
      }
    },
    "/slippage.json": {
      "get": {
        "description": "The slippage signal (§7.2): a shortage-management date **revised later**, the earliest honest sign a shortage is worse than first stated. Each row is one revision of a Serious Shortage Protocol's expiry — `prior_date` → `revised_date`, with `slip_days` signed (positive = pushed back, the slippage proper; negative = brought forward, recorded rather than hidden). Computed from the append-only ledger, which keeps every SSP expiry as its own immutable observation.\n\n**A signal, not a tier (§7.2).** Slippage is published alongside the ladder and **never moves a tier** — it is Pharmasync analysis, labelled as such, kept separate from the state's acts.\n\n**SSP-only, deliberately.** The design also imagined MSN resupply-date slippage, but the public MSN notification states at most a fuzzy initial date and its revisions are published only on the login-gated Medicines Supply Tool, which is out of bounds (§2). So this tracks the one revision source that is public and already ingested. `/methodology/severity.json` says the same in its limitations.\n\n**Present only when the build had a database to read** — its absence means the build did not look, a different claim from an empty array (no revisions observed yet).",
        "operationId": "getSlippage",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SlippageRecord"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "The slippage signal — SSP expiry revisions",
        "tags": [
          "data"
        ]
      }
    },
    "/status.json": {
      "get": {
        "description": "Freshness per source per nation, with `stale_after_hours` and the artefact's own stated limitations. A stale dataset honestly stamped is acceptable; a current-looking dataset that is silently stale is the project's top death pattern (§4.9), which is what this endpoint exists to prevent.",
        "operationId": "getStatus",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusArtefact"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Pipeline health and per-source freshness",
        "tags": [
          "honesty"
        ]
      }
    },
    "/tiers.json": {
      "get": {
        "description": "The highest rung of government action in force for each medicine (D-009), as a citation rather than a Pharmasync score. Every row carries the `triggering_act`, its `source_url` and its date, so a tier is reproducible from primary sources without trusting Pharmasync. `/methodology/severity.json` defines the ladder; this applies it per `dmd_code` (join to /products.json for the name).\n\n**Currency is evidenced where the source publishes it, and only there.** A CRITICAL (SSP in force) carries `in_force_until` — its published expiry — and drops off the day it passes. A WATCH (MSN issued) carries **no** `in_force_until`: CPE publishes an MSN's initial notification only, never its resolution, so current resolution is not evidenced, and the absent field is that fact stated in the shape.\n\nA CONCERN (restricted-export designation) likewise carries no `in_force_until`: delisting is not yet detected, so current resolution is not evidenced.\n\n**The CONCERN rung is joined via the dm+d VTM (D-047).** Restricted-export designations are name-level (see /designations.json), so each is matched to a dm+d molecule (VTM) by name and fanned out to the VMP codes under it. Two under-statements follow (the safe direction): a medicine whose VMP carries no VTM cannot receive CONCERN this way, and a designation whose name does not match a VTM exactly (a brand name, or an ester named differently from its moiety) is not joined. An SSP (CRITICAL) always outranks CONCERN, so no medicine is mis-ranked. `market_stress` is a signal (§7.2), not a rung: it flags a current concession and never moves the tier.\n\n**Present only when the build had a database to read** — its absence means the build did not look, a different claim from an empty ladder.",
        "operationId": "getTiers",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Tier"
                  },
                  "type": "array"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "Per-medicine severity tiers — the state-action ladder applied",
        "tags": [
          "data"
        ]
      }
    },
    "/workforce/stats.json": {
      "get": {
        "description": "Published artefact. No description registered in `openapi.ts` — see the artefact itself.",
        "operationId": "get_workforce_stats_json",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "The artefact: canonical JSON (sorted keys, 2-space indent) with a trailing newline."
          }
        },
        "summary": "workforce/stats.json",
        "tags": [
          "meta"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Production (static artefacts on a CDN).",
      "url": "https://pharmasync.xyz/api/v1"
    }
  ],
  "tags": [
    {
      "description": "Index, manifest, licence and this document.",
      "name": "meta"
    },
    {
      "description": "Published JSON Schema for every frozen entity.",
      "name": "schemas"
    },
    {
      "description": "Coverage and status — what is in scope, how much is held, and how fresh it is.",
      "name": "honesty"
    },
    {
      "description": "How severity is determined, machine-readably.",
      "name": "methodology"
    }
  ]
}
