{"openapi":"3.1.0","info":{"title":"IVE Editorial Ingestion API","version":"1.0.0"},"servers":[{"url":"https://data.jamesfeltonkeith.com"}],"components":{"securitySchemes":{"IngestionKey":{"type":"http","scheme":"bearer","description":"Scoped research:write-draft key. Issued and revoked in the protected Editorial Desk."}},"schemas":{"ResearchImport":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://data.jamesfeltonkeith.com/research/import.schema.json","title":"ChatGPT research import","type":"object","required":["schemaVersion","cases"],"additionalProperties":false,"properties":{"schemaVersion":{"const":"research-import-1.0"},"mode":{"enum":["create","revise"],"default":"create"},"cases":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"object","required":["id","company","buyer","value","originalFigure","currency","period","metric","basis","stage","industry","geography","dataType","evidence","sourceUrl","sourceTitle","notes"],"properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{3,100}$"},"company":{"type":"string","minLength":1},"buyer":{"type":"string","minLength":1},"value":{"type":["number","null"],"minimum":0},"originalFigure":{"type":"string","minLength":1},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"period":{"type":"string","pattern":"^[0-9]{4}$"},"reportingPeriod":{"type":"string"},"metric":{"enum":["announced-transaction","realized-transaction","forecast","asking-price","settlement","revenue","profit","cost-savings","data-licensing","actual-compensation"]},"basis":{"type":"string"},"stage":{"type":"string"},"industry":{"type":"string"},"geography":{"type":"string"},"dataType":{"enum":["employee","consumer","historical","other"]},"evidence":{"enum":["primary-source","secondary-source","unverified"]},"sourceUrl":{"type":"string","format":"uri","pattern":"^https://"},"sourceTitle":{"type":"string"},"sourceIdentifier":{"type":"string","maxLength":500},"sourceEvidence":{"type":"object","description":"Original evidence references, section, supporting excerpt and optional document hash; retained in append-only private snapshots."},"franchises":{"type":"array","maxItems":6,"items":{"enum":["data-wealth-100","automation-economy","who-pays","unpaid-economy","private-equity","what-youre-owed"]}},"notes":{"type":"string","minLength":1},"publication":{"type":"object","properties":{"title":{"type":"string"},"dek":{"type":"string"},"body":{"type":"string"},"videoUrl":{"type":["string","null"]}}}}}}}}}},"paths":{"/api/ingest/v1/observations":{"post":{"summary":"Atomically ingest 1–50 draft observations without redeployment","security":[{"IngestionKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":12,"maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchImport"}}}},"responses":{"200":{"description":"Idempotent replay"},"201":{"description":"Draft observations and revision identifiers"},"400":{"description":"Schema or evidence reference validation failure"},"401":{"description":"Expired, invalid or revoked key"},"409":{"description":"Duplicate identity, concurrent import or idempotency conflict"},"413":{"description":"Request too large"},"429":{"description":"Daily ingestion quota exhausted"}}}}}}