API Reference

API reference

Compass exposes endpoints for pixel-based event ingest and inbound webhook payloads from pharmacy and payment providers. All requests must include the x-compass-tenant-id header.

Authentication

Tenant-scoped API calls require the x-compass-tenant-id header. Your tenant ID is visible in Settings → Workspace.

Ingest events also require an HMAC signature using your INGEST_SIGNING_SECRET:

x-compass-signature: sha256=<HMAC-SHA256(body, INGEST_SIGNING_SECRET)>

Event ingest

POST/api/pixel/{pixelId}

Track a conversion event via server-side pixel. Used by pharmacy and payment webhook handlers to record order and fulfillment events.

POST /api/pixel/{pixelId}
Content-Type: application/json
x-compass-tenant-id: ten_abc123
x-compass-signature: sha256=...

{
  "event": "order.completed",
  "patientId": "pat_xyz789",
  "pathwayId": "pw_glp1_monthly",
  "orderId": "ord_001",
  "amount": 19900,
  "currency": "usd",
  "source": "meta_capi",
  "ts": "2026-05-15T12:00:00Z"
}

Webhook endpoints

POST/api/webhooks/shipping/{adapter}

Receives inbound shipment events from pharmacy partners. Supported adapters: truepill, empower, hallandale, openloop.

POST /api/webhooks/shipping/truepill
x-compass-tenant-id: ten_abc123

{
  "event": "shipment.shipped",
  "orderId": "ord_001",
  "trackingNumber": "1Z999AA1...",
  "shippedAt": "2026-05-16T08:30:00Z"
}
POST/api/webhooks/payments/{provider}

Receives payment events from Stripe, Shopify, Recharge, and other payment connectors. Supported providers match the connected integration slugs.

POST /api/webhooks/payments/stripe
stripe-signature: t=...

{
  "type": "invoice.payment_succeeded",
  "data": { "object": { ... } }
}

Rate limits

Pixel ingest1,000 req/min per tenant
Webhook handlers500 req/min per adapter
Read API (future)100 req/min

API questions? support@joincompass.ai.