Hekasoftlink Platform API
Programmatic access to the commercial side of the Hekasoftlink hub: plans, subscriptions, invoices, payments, metered usage (including NHIA claims), facility entitlements, events and webhooks.
Where to start
Quickstart →
Make your first authenticated request in two minutes.
Webhooks →
Receive signed events when invoices are paid or facilities change state.
EHR integration →
Report NHIA claims and usage, and adapt the UI to the facility’s plan.
API reference →
Every endpoint, parameter and schema, generated from the implementation.
The basics
| Topic | Detail |
|---|---|
| Base URL | https://hub.heka.care/api/platform/v1 |
| Auth | Bearer API key — Authorization: Bearer hsl_live_… |
| Format | JSON over HTTPS, snake_case fields |
| Money | Integer pesewas (GH₵ 1.00 = 100) with a currency field. Never floats. |
| Time | ISO-8601 in UTC, e.g. 2026-11-25T08:30:00.000Z. Ghana is GMT all year. |
| Envelope | { "data": … }, lists add has_more and next_cursor |
| Versioning | Path-versioned (/v1). Additive changes ship without a new version; see the changelog. |
List plans
curl https://hub.heka.care/api/platform/v1/plans \
-H "Authorization: Bearer $HSL_API_KEY"Two API surfaces
The hub exposes two APIs for two kinds of client:
| Platform API | Facility API | |
|---|---|---|
| For | Partners, finance systems, resellers, internal tools | The EHR running at each facility |
| Path | /api/platform/v1/* | /api/v1/* |
| Credential | API key with explicit scopes (optionally confined to one facility) | Facility app key exchanged for a 4-hour token |
| Docs | This site | EHR integration |
What the API never returns
The commercial platform holds commercial data only. It has no patient records and the API cannot reach them.
- No patient-identifiable data. Usage is counts and money values — “412 claims worth GH₵ 82,400”, never which patients.
- No secrets after creation. API keys and webhook secrets are shown once; the hub stores a hash or ciphertext.
- No cross-facility leakage. A facility-scoped key gets
404for anything belonging to another facility.
Clinical work is never blocked by billing
A facility that falls behind on payment may see premium add-ons paused, but
clinical_access is always "full". See commercial state.