PRODUCTION · MEDICARE ENROLLMENT WEBHOOK

Every enrollment submission, captured before it can be lost.

Basecamp is the landing zone for HealthSherpa's Medicare enrollment webhook. One job, no exceptions: catch every submission and persist it durably to Postgres before anything else touches it. Matching and business logic run downstream, against the row already on disk.

Schema healthsherpa · 3 tables Retry-safe upsert GitHub ↗
COMPONENTS
01 · Webhook Ingest
Internal · Railway
Raw capture, nothing inline

The only work done inside the request is one INSERT of the verbatim JSON body. HealthSherpa retries at 20s / 10m / 1h and then gives up permanently, so nothing that can fail is allowed to run before the row is safely on disk.

Endpoint POST /hooks/healthsherpa/<path token>
Auth API key + high-entropy path token
Retries Upsert on medicare_application.id
Stack FastAPI · Postgres · Railway
Internal service · no UI
02 · Normalization
🔄
Internal · Background task
Reads back from the row already on disk

A background pass splits the raw payload into contact and rider records and resolves which fields even apply — a captive downline submission and an independent-agent submission don't carry the same contact data, and normalization is what tells the two apart.

Tables submission · submission_rider · webhook_delivery
Scope Contact scope: full (captive) vs. limited (independent)
Licensing Submitting agent NPN → clean join to ATLAS
Audit Every raw POST retained, replay-flagged
Internal service · no UI
03 · Downstream Handoff
🔗
Internal · JSON
Salesforce sync readiness

Basecamp never writes anything but the pending default to its own Salesforce-reserved columns — matching, sync, and effectuation tracking are all separate consumers of the tables this service fills, not logic that lives inside the webhook itself.

Match key Salesforce Person Account Id, when seeded
Status sf_* columns reserved, default pending
Not in scope Effectuation tracking — separate poller
Consumers Downstream Salesforce worker + matching
Internal · no public UI
Runtime
Python FastAPI Uvicorn
Data Store
Postgres Private networking
Security
API Key auth High-entropy path token Constant-time compare
Infrastructure
Railway Nixpacks

Basecamp is an internal ingestion service — not customer-facing. Deployed on Railway, feeding downstream matching and Salesforce sync. The database holds PHI and is kept on private networking only.