API Licensing
Status
📋 TBD — no GitHub issues yet. This document captures the vision from the 13 May 2026 catchup so the work has a home, but no acceptance criteria, BDD scenarios, code paths, or issues are committed. Direction confirmation needed from Matt before any AC is written.
Open issues on label:feature:api-licensing — no open issues. Fetched at: 2026-10-13T07:29:49Z — live list on GitHub.
Update — 2026-05-20: doctor-personal data goes via MCP, not this API
Matt drew a hard line on doctor-personal data during the 2026-05-20 session:
Matt (§00:41:28): "this data is only given at the user's choice. because it's their data."
Rob suggested an authenticated API for cross-application queries; Matt redirected to MCP for doctor-personal flows (see mcp-provider.md). API Licensing now covers only cohort/B2B/curated-data-set licensing — it never exposes doctor-personal records.
Boundary:
| Surface | Audience | Data | Spec |
|---|---|---|---|
| MCP Provider | Doctor (own AI) | Doctor's own records (read + limited write) | mcp-provider.md |
| API Licensing | B2B licensee | Anonymised cohort aggregates + curated reference data | this file |
| Exportable CV | Doctor → human | Doctor's own records, doctor-selected subset | exportable-reports.md |
Vision (from 13 May 2026 catchup, 00:56:04)
"Right now we're only exporting. Do we want to create an API interface that allows our data to be integrated with whoever it needs to integrate with… we can license that."
Matt: "That is the idea of building our data set — to potentially have something that we can sell on where other people can access that for other people."
Rob's analogy: Runkeeper as the precursor to Strava — Runkeeper's CEO created an API to ingest data from other trackers and share data out. PPP's equivalent is the curated FHIR-enabled surgical/practical data set + the verified logbook history.
Goals (sketch)
- Outbound API — let licensed third parties read FHIR-shaped resources derived from PPP (logbook cases, competency aggregates, anonymised insights) for systems-of-record they operate.
- Inbound API — let licensed third parties write into PPP (e.g. a hospital theatre system pushes case data the user later claims/verifies).
- Licensable feature surface — clinical reference data sets (the curated SNOMED-mapped procedure libraries we've built) become a stand-alone product Matt can sell into other vendors.
- FHIR-native — outbound resources align with the Australian Health Blueprint to 2032; SNOMED CT terminology end-to-end.
Components (sketch — non-binding)
- API gateway in front of
api/backend-ppp - OAuth 2.0 token issuance with scopes per license tier (read-only / read-write / data-set-only)
- Rate limits + quotas per token
- Audit log (every external call recorded against the license)
- Billing hook (Stripe metered usage)
- Self-serve license management UI (PPP Admin app, not exposed to doctor users)
- Documentation surface (Swagger / OpenAPI auto-generated)
What we already have that supports this
- FHIR client already in use against Ontoserver (
instances/ppp/src/services/fhirApi.ts) - Procedure data set keyed by SNOMED CT codes (
procedurestable) - Curated orthopaedic data set (working example for what every other specialty will look like)
- Activity-polymorphic data model that lets new resource shapes ride on existing infrastructure
Open Questions
| # | Question | Source |
|---|---|---|
| Q1 | Which buyer persona is the first target — hospital system, college (RACS/AMC), commercial training provider? | 13 May 2026 catchup |
| Q2 | Inbound vs outbound — do we lead with outbound (we publish), inbound (others write to us), or both at once? | 13 May 2026 catchup |
| Q3 | License tiers — data-set-only vs full read vs read-write; pricing model (per-call, per-seat, per-month)? | TBD |
| Q4 | Does the data-set licensing surface include only PPP-curated rows or also the user-submitted external-lookup entries? | TBD |
| Q5 | Compliance scope — what HIPAA / Australian Privacy Principles obligations attach when third parties read our data? | TBD |
| Q6 | Tooling — is Vercel / Cloudflare Workers the right gateway, or should this sit inside the existing Azure stack? | TBD |
Decisions
None yet. This document is a placeholder so the work has a home before it has issues.
Change Log
| Date | Change | PR/Issue | Reason |
|---|---|---|---|
| 2026-07-13 | BDD scenario coverage intentionally deferred — spec is status: tbd (roadmap-stage, not built). No @feature:api-licensing scenarios needed yet. | #10578, #10572 | Coverage/BDD gap audit (#10572) flagged this spec as having zero BDD tag match. Confirmed roadmap-only per front-matter status:; BDD is written when the feature is built, not while it is aspirational. This note stops future coverage sweeps from re-flagging the gap. |
| 2026-05-20 | Scope boundary clarified — API Licensing covers cohort/B2B/curated-data-set only; doctor-personal flows go via MCP Provider (mcp-provider.md). | #0 | Transcript 2026-05-20 §00:41:28 — Matt drew a hard line: "this data is only given at the user's choice. because it's their data." API Licensing must not expose doctor-personal records. |
| 2026-05-13 | New feature spec stub — captures the API Licensing vision from the 13 May 2026 catchup as a TBD placeholder. No ACs, no BDD scenarios, no GitHub issues filed yet; the document exists so the work has a home before direction is confirmed with Matt. | Matt and Rob aligned on the 13 May catchup that an outbound + inbound API and a licensable data set are the right strategic direction (Runkeeper analogy). Rather than absorb that into the Logbook spec, separate doc keeps Logbook focused and creates a clean home for the licensing work once direction is confirmed. |
(Change Log fragments at docs/features/.changelog/api-licensing/<YYYY-MM-DD>-<slug>.md once active work begins.)