{
  "openapi": "3.1.0",
  "info": {
    "title": "ActiPatch Public AI-Queryable API",
    "version": "1.0.0",
    "summary": "Read-only public subset of the ActiPatch and Electrome API intended for AI agents, search engines, and integrators.",
    "description": "This spec describes only the public, AI-queryable surface: product catalog, FAQ, press, science citations, store locator, and Electrome's publicly listed team / leadership / board / scientific advisors. Authenticated portals (clinical, retailer, affiliate, admin, MyCare, investor) are explicitly excluded from this document and from AI crawler access — every authenticated surface is also gated server-side with `X-Robots-Tag: noindex, nofollow, noarchive` via portal-noindex middleware. This spec is part of the v1 Foundational Model Optimization (FMO) blueprint reference implementation (Nilsen & Mayer, JAMIA 2026 — manuscript in draft, pre-print URL to be linked at /ai-policy once available). See https://painkiller.care/ai-policy for the AI usage policy and https://painkiller.care/llms.txt for the corpus index.",
    "contact": {
      "name": "Electrome Corporation",
      "url": "https://painkiller.care/public/connect",
      "email": "press@electrome.com"
    },
    "license": {
      "name": "Public read-only — see /ai-policy",
      "url": "https://painkiller.care/ai-policy"
    }
  },
  "servers": [
    { "url": "https://painkiller.care", "description": "Production" }
  ],
  "tags": [
    { "name": "catalog", "description": "Public product catalog (consumer pricing only)." },
    { "name": "faq", "description": "Frequently asked questions, marked up as FAQPage." },
    { "name": "press", "description": "Press releases and newsroom articles." },
    { "name": "science", "description": "Clinical evidence and citations." },
    { "name": "store-locator", "description": "Authorized retail locations." },
    { "name": "team", "description": "Electrome's publicly listed team, board advisors, and scientific advisors. Names, titles, and published bios — intentionally public, no auth required. Source-of-truth for 'Who runs Electrome?'-style queries." }
  ],
  "paths": {
    "/api/public/catalog": {
      "get": {
        "tags": ["catalog"],
        "summary": "List public products",
        "description": "Returns the public, consumer-priced product catalog. Wholesale pricing requires authentication and is not exposed here.",
        "operationId": "listPublicCatalog",
        "responses": {
          "200": {
            "description": "Array of products.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "$ref": "#/components/schemas/Product" }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/catalog/{slug}": {
      "get": {
        "tags": ["catalog"],
        "summary": "Get one product by slug",
        "operationId": "getPublicProduct",
        "parameters": [
          { "name": "slug", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Product detail.",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Product" } } }
          },
          "404": { "description": "Not found." }
        }
      }
    },
    "/api/public/faq": {
      "get": {
        "tags": ["faq"],
        "summary": "List FAQ entries",
        "operationId": "listFaq",
        "responses": {
          "200": {
            "description": "Array of FAQ entries.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/FaqEntry" } }
              }
            }
          }
        }
      }
    },
    "/api/public/press": {
      "get": {
        "tags": ["press"],
        "summary": "List press releases",
        "operationId": "listPress",
        "responses": {
          "200": {
            "description": "Array of press release summaries.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PressRelease" } }
              }
            }
          }
        }
      }
    },
    "/api/public/science/citations": {
      "get": {
        "tags": ["science"],
        "summary": "List clinical evidence citations",
        "operationId": "listScienceCitations",
        "responses": {
          "200": {
            "description": "Array of citations.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Citation" } }
              }
            }
          }
        }
      }
    },
    "/api/public/team": {
      "get": {
        "tags": ["team"],
        "summary": "List publicly listed team, board, and scientific advisors",
        "description": "Returns Electrome's publicly listed executive team, board advisors, and scientific advisors. Names, titles, and published bios only — never personal contact info, salary, or non-public hires. This endpoint mirrors the team section at https://painkiller.care/public/about#team and is intentionally unauthenticated.",
        "operationId": "listPublicTeam",
        "responses": {
          "200": {
            "description": "Array of team members.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamMember" } }
              }
            }
          }
        }
      }
    },
    "/api/public/store-locator": {
      "get": {
        "tags": ["store-locator"],
        "summary": "Find authorized retail locations",
        "operationId": "findStores",
        "parameters": [
          { "name": "postalCode", "in": "query", "schema": { "type": "string" } },
          { "name": "radiusMiles", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 250, "default": 25 } }
        ],
        "responses": {
          "200": {
            "description": "Array of store locations.",
            "content": {
              "application/json": {
                "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Store" } }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "required": ["slug", "name", "indication", "priceUsd", "url"],
        "properties": {
          "slug": { "type": "string" },
          "name": { "type": "string" },
          "indication": { "type": "string", "description": "FDA-cleared indication summary." },
          "priceUsd": { "type": "number" },
          "currency": { "type": "string", "default": "USD" },
          "url": { "type": "string", "format": "uri" },
          "imageUrl": { "type": "string", "format": "uri" },
          "rxRequired": { "type": "boolean", "default": false }
        }
      },
      "FaqEntry": {
        "type": "object",
        "required": ["question", "answer"],
        "properties": {
          "question": { "type": "string" },
          "answer": { "type": "string" },
          "category": { "type": "string" }
        }
      },
      "PressRelease": {
        "type": "object",
        "required": ["slug", "title", "publishedAt", "url"],
        "properties": {
          "slug": { "type": "string" },
          "title": { "type": "string" },
          "summary": { "type": "string" },
          "publishedAt": { "type": "string", "format": "date-time" },
          "url": { "type": "string", "format": "uri" }
        }
      },
      "Citation": {
        "type": "object",
        "required": ["title", "authors", "year", "source"],
        "properties": {
          "title": { "type": "string" },
          "authors": { "type": "array", "items": { "type": "string" } },
          "year": { "type": "integer" },
          "journal": { "type": "string" },
          "doi": { "type": "string" },
          "pmid": { "type": "string" },
          "source": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "studyType": { "type": "string", "enum": ["RCT", "meta-analysis", "review", "observational", "case-series"] }
        }
      },
      "TeamMember": {
        "type": "object",
        "required": ["name", "role", "bio"],
        "properties": {
          "name": { "type": "string", "description": "Full name as published on /public/about#team." },
          "role": { "type": "string", "description": "Public title (e.g., 'Co-founder & Chief Executive Officer', 'Scientific Advisor')." },
          "bio": { "type": "string", "description": "Published biography. Names, titles, and credentials only — never personal contact info or salary." },
          "category": { "type": "string", "enum": ["executive", "advisor", "board"], "description": "Coarse grouping for UI/agent rendering." },
          "url": { "type": "string", "format": "uri", "description": "Anchor link into the published team section." }
        }
      },
      "Store": {
        "type": "object",
        "required": ["name", "address", "city", "state", "postalCode"],
        "properties": {
          "name": { "type": "string" },
          "address": { "type": "string" },
          "city": { "type": "string" },
          "state": { "type": "string" },
          "postalCode": { "type": "string" },
          "phone": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "lat": { "type": "number" },
          "lng": { "type": "number" }
        }
      }
    }
  }
}
