{"openapi":"3.1.0","info":{"title":"Apex 3D Case Simulator Case API","version":"0.2.0","description":"Catalogue of the planned Apex 3D Case Simulator cases (public), full dose-free content of 3 free teaser cases (public), and full dose-free content of every authored case for subscribers (Bearer API key issued after Stripe checkout: US$7.99 per month or US$59.99 per year). Operated by Indus Intellect LLC. Every case is a Draft - not clinically validated, pending Dr. Carlo Raj clinical sign-off. Educational simulation content only; not medical advice. No doses are published. No CME. Unknown values are null."},"servers":[{"url":"https://casesims.apexacademy.cloud"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Subscriber API key (acs_...), shown once after checkout at https://casesims.apexacademy.cloud/subscribe. Not needed for the catalogue or the 3 teasers."}}},"paths":{"/api/teasers":{"get":{"operationId":"listTeasers","summary":"List the 3 free teaser cases (catalogue rows)","security":[],"responses":{"200":{"description":"Teaser catalogue rows","content":{"application/json":{"example":{"operator":"Indus Intellect LLC","notice":"Every case is a Draft - not clinically validated, pending Dr. Carlo Raj clinical sign-off. Educational simulation content only; not medical advice. No doses are published. No CME.","count":3,"cases":[{"id":"ER_DKA_001","title":"Endocrinology case 01: vomiting and abdominal pain","system":"Endocrinology","strand":"Core IM","tier":1,"learner_level":"USMLE Step 1 / Step 2 CK","objective_headline":"Mechanism (basic science) · Resuscitation · Diagnostic reasoning · Medication safety · History-taking","platforms_planned":["Desktop","Meta Quest 3"],"content_stage":"scaffold","status":"Draft - not clinically validated","validated":false},{"id":"renal_hyperkalemia_01","title":"Nephrology case 03: weakness","system":"Nephrology","strand":"Core IM","tier":1,"learner_level":"USMLE Step 1 / Step 2 CK","objective_headline":"Diagnostic reasoning · Management reasoning · Mechanism (basic science) · History-taking","platforms_planned":["Desktop","Meta Quest 3"],"content_stage":"authored","status":"Draft - not clinically validated","validated":false},{"id":"hypersens_anaphylaxis_01","title":"Allergy & Immunology case 06: swelling","system":"Allergy & Immunology","strand":"Micro/Immuno","tier":1,"learner_level":"USMLE Step 1 / Step 2 CK","objective_headline":"Diagnostic reasoning · Management reasoning · Mechanism (basic science) · History-taking","platforms_planned":["Desktop","Meta Quest 3"],"content_stage":"authored","status":"Draft - not clinically validated","validated":false}]}}}},"429":{"description":"Too many requests from this IP (token bucket: burst of RATE_LIMIT_BURST, refilled at RATE_LIMIT_PER_SEC per second). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests. Retry after 1 s."}}}}},"503":{"description":"Service temporarily unavailable (maintenance). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"example":{"error":{"code":"unavailable","message":"Temporarily unavailable for maintenance. Retry after 120 s."}}}}}}}},"/api/cases/{id}":{"get":{"operationId":"getCase","summary":"Full dose-free case content (teasers free; others need a subscriber key)","security":[{},{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_]{1,64}$"},"example":"renal_hyperkalemia_01"}],"responses":{"200":{"description":"Case content: presentation, history items, exam findings, orders and results, interventions (no doses), differential, critical and harmful actions, mechanism debrief, disposition","content":{"application/json":{"example":{"operator":"Indus Intellect LLC","notice":"Every case is a Draft - not clinically validated, pending Dr. Carlo Raj clinical sign-off. Educational simulation content only; not medical advice. No doses are published. No CME.","access":"teaser","case":{"id":"renal_hyperkalemia_01","title":"Weakness on spironolactone — hyperkalaemia","draft_flag":"Draft - pending Dr. Carlo Raj clinical sign-off","validated":false,"objectives":["Treat the ECG, not only the number","Order the three steps: stabilise, shift, remove, then monitor glucose and potassium for rebound","Identify drugs that raise potassium"],"foundation_concept":"The resting membrane potential is set mainly by the potassium gradient; raising extracellular K depolarises cells and inactivates sodium channels","presentation":{"age_sex":"60s M","chief_complaint":"Generalised weakness for a day","history_clue":"Chronic kidney disease; spironolactone recently added; also takes an ACE inhibitor","exam_localising":"Symmetric proximal weakness; no focal deficit. The danger localises to the cardiac membrane (ECG), not the muscles"},"vitals":{},"history_items":["Reviews medicines: spironolactone, ACE inhibitor, NSAIDs, potassium supplements","Asks about urine output"],"exam_items":[],"orders":["12-lead ECG immediately","Repeat potassium on a non-haemolysed sample","Serial glucose monitoring for at least 6 hours after insulin/glucose","Serial potassium and repeat ECG to check response and rebound after shift therapy"],"results":{"potassium":"Elevated (value pending source); haemolysis excluded","ecg":"Peaked T waves (reviewer may add wide QRS)","creatinine":"Raised from baseline (value pending source)"},"interventions":["IV calcium to stabilise the cardiac membrane","IV insulin with glucose to shift potassium into cells","Escalates for persistent or rebound hyperkalaemia (repeat shift therapy, renal/dialysis referral)","Stops spironolactone and the ACE inhibitor","Removes potassium from the body (binder, diuretic or dialysis by severity)"],"differential":["Hyperkalaemia (working diagnosis)","Pseudohyperkalaemia (haemolysed sample, normal ECG)","Hypocalcaemia (prolonged QT, tetany)"],"critical_actions":["ECG obtained","Membrane stabilised with IV calcium once the ECG is abnormal","Potassium shifted into cells","Causative drugs stopped","Glucose monitored serially after insulin/glucose","Potassium and ECG reassessed after shift therapy (response and rebound)"],"harmful_actions":["Insulin without glucose (hypoglycaemia)"],"mechanism":{"prompt":"Why does calcium help when it does not lower potassium?","steps":["High extracellular K makes the resting potential less negative","Partly depolarised cells inactivate sodium channels and conduction slows","Calcium raises the threshold potential and restores excitability without changing K"],"question":{"text":"IV calcium protects the heart in hyperkalaemia by:","options":[{"id":"OPT1","text":"Stabilising the cardiac membrane (threshold potential)"},{"id":"OPT2","text":"Moving potassium into cells"},{"id":"OPT3","text":"Increasing renal potassium excretion"},{"id":"OPT4","text":"Binding potassium in the gut"}],"answer":"OPT1"}},"disposition":"Admit with cardiac monitoring","notes":[]}}}}},"401":{"description":"No, malformed or unknown API key (non-teaser case)","content":{"application/json":{"example":{"error":{"code":"unauthorized","message":"This case needs a subscriber API key."}}}}},"403":{"description":"Key is revoked or its subscription is not active","content":{"application/json":{"example":{"error":{"code":"subscription_inactive","message":"This API key's subscription is not active."}}}}},"404":{"description":"Unknown case id, or a catalogue case with no authored content yet","content":{"application/json":{"example":{"error":{"code":"not_found","message":"No such case."}}}}},"429":{"description":"Too many requests from this IP (token bucket: burst of RATE_LIMIT_BURST, refilled at RATE_LIMIT_PER_SEC per second). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests. Retry after 1 s."}}}}},"503":{"description":"Service temporarily unavailable (maintenance). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"example":{"error":{"code":"unavailable","message":"Temporarily unavailable for maintenance. Retry after 120 s."}}}}}}}},"/api/connector":{"get":{"operationId":"searchCases","summary":"Search the Draft case catalogue (public metadata only)","security":[],"parameters":[{"name":"q","in":"query","schema":{"type":"string","maxLength":100},"description":"Case-insensitive text over id, neutral title (system + presenting-complaint category), system and strand.","example":"chest pain"},{"name":"system","in":"query","schema":{"type":"string","enum":["Allergy & Immunology","Cardiology","Emergency Medicine","Endocrinology","Gastroenterology","Hematology/Oncology","Infectious Disease","Nephrology","Neurology","Pulmonology","Rheumatology"]},"description":"Internal-medicine system (case-insensitive exact match).","example":"Cardiology"},{"name":"strand","in":"query","schema":{"type":"string","enum":["Core IM","Micro/Immuno"]},"description":"Curriculum strand (case-insensitive exact match).","example":"Core IM"},{"name":"tier","in":"query","schema":{"type":"integer","enum":[1,2,3]},"description":"Build priority tier (1 = first).","example":1},{"name":"stage","in":"query","schema":{"type":"string","enum":["authored","engine_draft","scaffold"]},"description":"Content stage of the Draft."},{"name":"status","in":"query","schema":{"type":"string","enum":["draft","validated"]},"description":"Validation status. No case is validated yet, so status=validated returns 0 rows.","example":"draft"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"maximum":9999,"default":0}}],"responses":{"200":{"description":"Matching cases","content":{"application/json":{"example":{"operator":"Indus Intellect LLC","notice":"Every case is a Draft - not clinically validated, pending Dr. Carlo Raj clinical sign-off. Educational simulation content only; not medical advice. No doses are published. No CME.","total":1,"count":1,"offset":0,"cases":[{"id":"bact_strep_pneumo_01","title":"Pulmonology case 01: complaint not yet authored","system":"Pulmonology","strand":"Micro/Immuno","tier":1,"learner_level":"USMLE Step 1 / Step 2 CK","objective_headline":null,"platforms_planned":["Desktop","Meta Quest 3"],"content_stage":"engine_draft","status":"Draft - not clinically validated","validated":false}]}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"example":{"error":{"code":"invalid_parameter","message":"tier must be one of: 1, 2, 3."}}}}},"405":{"description":"Method other than GET, HEAD or OPTIONS (Allow: GET, HEAD, OPTIONS)","content":{"application/json":{"example":{"error":{"code":"method_not_allowed","message":"This connector is read-only. Use GET."}}}}},"429":{"description":"Too many requests from this IP (token bucket: burst of RATE_LIMIT_BURST, refilled at RATE_LIMIT_PER_SEC per second). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"example":{"error":{"code":"rate_limited","message":"Too many requests. Retry after 1 s."}}}}},"503":{"description":"Service temporarily unavailable (maintenance). Retry after the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"example":{"error":{"code":"unavailable","message":"Temporarily unavailable for maintenance. Retry after 120 s."}}}}}}}}},"security":[]}