Full REST and GraphQL APIs for integrating HIPAA-compliant commerce into portals, EHRs, and patient apps.
Before HealthSail
Healthcare organizations with existing portals and EHR integrations face a choice between replacing their entire front end to adopt a commerce platform or building custom integration layers that lack compliance controls. Most end up with fragile point-to-point integrations that break during platform updates.
With HealthSail
HealthSail's headless APIs allow organizations to embed compliant commerce directly into their existing systems with full HIPAA controls inherited automatically. Every API call enforces the same role-based access, consent verification, and audit logging as the native interface.
HealthSail exposes its complete platform functionality through both REST and GraphQL APIs, giving development teams the flexibility to choose the integration pattern that best fits their architecture. The REST API follows resource-oriented design with predictable URL structures, standard HTTP methods, and consistent response formats. Each resource endpoint supports filtering, pagination, sorting, and field selection to minimize payload size and reduce unnecessary data transfer — a consideration that is both a performance optimization and a HIPAA compliance benefit, since requesting only needed fields reduces the surface area of PHI exposure. The GraphQL API enables clients to request exactly the data fields they need in a single query, eliminating over-fetching and reducing the number of round trips required for complex data retrieval scenarios. Both API styles enforce the same compliance controls: every request is authenticated, authorized against the caller's role and permission set, filtered to expose only the fields the caller is permitted to access, and logged in the audit trail. API responses include compliance metadata headers that indicate the consent status under which data was served and the policy rules that governed field visibility, enabling consuming applications to implement their own compliance verification layers if needed.
HealthSail's event system enables real-time integration between the commerce platform and external systems through configurable webhooks. When significant events occur — such as order creation, payment confirmation, fulfillment status changes, consent updates, or compliance alerts — the platform generates event notifications that can be delivered to registered webhook endpoints. Each webhook subscription is scoped to specific event types and filtered through the subscriber's permission profile, ensuring that webhook payloads contain only the data elements the receiving system is authorized to access. A fulfillment partner's webhook, for example, receives shipping addresses and product details but not patient clinical information or insurance data. Webhook delivery includes retry logic with exponential backoff for failed deliveries, dead-letter queuing for persistently failing endpoints, and delivery confirmation logging for audit purposes. The event system supports both push-based webhooks and pull-based event polling for organizations that prefer to consume events on their own schedule. Event payloads are signed with HMAC-SHA256, allowing receiving systems to verify that events originated from HealthSail and were not tampered with in transit. Organizations can define custom event types that trigger on specific workflow conditions, extending the event system beyond the platform's built-in event catalog.
HealthSail provides pre-built embed patterns for common integration scenarios, reducing the development effort required to surface commerce functionality within existing healthcare portals and applications. Embed patterns include drop-in components for product browsing, cart management, checkout flows, order tracking, and account management that can be integrated into existing web applications through iframe embedding or JavaScript SDK integration. The JavaScript SDK approach provides tighter integration, allowing the host application to pass authentication context, apply custom styling that matches the host portal's design system, and intercept commerce events for custom handling. Each embed pattern inherits the platform's compliance controls automatically — an embedded checkout component enforces the same consent verification, payment tokenization, and audit logging as the native checkout flow. Embed patterns support server-side rendering for performance-sensitive applications and client-side rendering for progressive enhancement scenarios. The SDK includes TypeScript type definitions for all API responses and event payloads, providing compile-time safety for consuming applications. Organizations can customize embed patterns through a theming system that controls visual presentation without modifying the underlying commerce logic or compliance controls.
HealthSail API authentication supports multiple mechanisms to accommodate different integration patterns and security requirements. OAuth 2.0 with authorization code flow is recommended for user-facing applications where the API caller acts on behalf of a specific patient or staff member. Client credentials flow is available for system-to-system integrations where the caller operates under a service account with defined permissions. API key authentication is supported for simpler integrations with configurable scope restrictions. All authentication mechanisms produce audit-logged sessions that record the caller identity, authentication method, and scope of access for every API request. Rate limiting is configurable per API consumer, per endpoint, and per authentication scope. Default rate limits are set to prevent abuse while accommodating normal integration traffic patterns, and organizations can request limit adjustments for specific integrations that require higher throughput. Rate limit headers are included in every API response, enabling consuming applications to implement client-side throttling. The platform supports IP allowlisting for API consumers that operate from fixed network addresses, adding a network-layer security control on top of authentication-based access control. All API traffic is encrypted with TLS 1.2 or higher, and the platform enforces certificate validation for webhook delivery endpoints.
The API layer sits in front of the same service layer that powers the native UI, ensuring feature parity and consistent compliance enforcement across access channels. API versioning follows semantic versioning with a deprecation policy that provides at least twelve months of overlap between major versions. The API gateway supports request transformation hooks that allow organizations to inject custom request validation, enrichment, or transformation logic without modifying the core API handlers. All API configurations, including webhook subscriptions, rate limits, and authentication scopes, are managed through declarative configuration files that are preserved through platform updates.
The AI Copilot assists with API integration by analyzing an organization's existing systems and recommending integration patterns, endpoint selections, and webhook configurations. When setting up a new integration, the copilot can generate starter code in common languages and frameworks, pre-configured with the appropriate authentication, error handling, and compliance considerations. It can review existing integration code and identify potential issues such as over-fetching of PHI fields, missing error handling for compliance-related API responses, or webhook configurations that expose more data than the receiving system requires.
AI Copilot — Available on Growth & Enterprise Plans
AI Copilot reduces implementation time for headless commerce apis by automatically generating field mappings, test datasets, and validation scripts based on your compliance schema — so your team can ship faster without writing repetitive configuration code.
Book a Compliance Blueprint call and get a live walkthrough tailored to your healthcare workflows and compliance requirements.
| Area | Before | After HealthSail |
|---|---|---|
| Area 1 | Monolithic commerce platform requiring full front-end replacement | Headless APIs that embed into existing portals and systems |
| Area 2 | Custom integrations that bypass compliance controls | Every API call inherits role-based access, consent checks, and audit logging |
| Area 3 | Batch file transfers for system integration | Real-time webhooks with filtered, signed event payloads |
| Area 4 | No visibility into third-party system data access | Full audit trail for every API call with caller identity and scope |
Our Compliance Blueprint call delivers a written implementation roadmap specific to your healthcare workflows, compliance requirements, and your timeline.