Create a connection in Organisation → Connections. The key is shown once; Aksh stores only its hash. Send it as a bearer token. Every request returns a result code per item, so your system can act on each one.
| Endpoint | Purpose | Accepts |
|---|---|---|
POST /api/connect/v1/slots | Freed or taken slots | FHIR R4 Slot or Bundle, or { slots: [...] } |
POST /api/connect/v1/appointments | Bookings read back from your schedule | FHIR R4 Appointment or Bundle, or { appointments: [...] } |
POST /api/connect/v1/observations | Glucose readings from devices, and laboratory results | FHIR R4 Observation or Bundle |
Slots
curl -X POST https://www.akshhealth.com/api/connect/v1/slots \
-H "Authorization: Bearer <connection key>" \
-H "Content-Type: application/json" \
-d '{ "slots": [ { "id": "S-1042", "version": 1, "status": "free",
"appointmentType": "diabetes_review",
"start": "2026-11-05T09:40:00+00:00", "durationMin": 20, "site": "Main site" } ] }'idand an increasingversionare required; resending the same version is safe. For FHIR, sendmeta.versionIdormeta.lastUpdated.- Times need an offset (
Zor+hh:mm). Slots last 5–240 minutes. - Map your own appointment codes to Aksh types in the connection settings. Unmapped types are reported as
UNKNOWN_APPOINTMENT_TYPE. - Offers close a set number of hours before the slot (default 2). A slot too close to start is reported as
OFFER_WINDOW_CLOSED. - A slot that becomes
busybefore anyone was offered it is withdrawn; after an offer, a person is asked to look.
Appointments
Send bookings with their slot reference and the patient’s record number ({ id, status, slotId, patientRecordNumber } in JSON). A booking for the patient staff selected, with status booked, arrived, fulfilled or checked-in, confirms the slot as filled. A different patient means the slot went elsewhere, and a person resolves it.
Glucose observations
Final, amended or corrected glucose Observations with an exact value and a timestamp with an offset. subject.identifier.value must be the patient’s record number. Duplicates by patient and time are skipped.
Laboratory results
Send laboratory results as FHIR R4 Observations with a LOINC code, an id from your system, an exact value with its unit, and a time with an offset. Aksh converts each value to the unit it stores and refuses values outside a plausible range, which usually means a unit error. Glucose is treated as a laboratory result only when category is laboratory; otherwise it is a device reading.
| Result | Stored as | Also accepted | LOINC (examples) |
|---|---|---|---|
| HbA1c | mmol/mol | % | 4548-4, 17856-6, 41995-2 |
| Glucose (laboratory) | mmol/L | mg/dl | 2345-7, 2339-0, 1558-6 |
| eGFR | mL/min/{1.73_m2} | ml/min/1.73m2, ml/min/1.73_m2 | 33914-3, 48642-3, 48643-1 |
| Urine albumin:creatinine ratio | mg/mmol | mg/g | 14959-1, 9318-7, 13705-9 |
| LDL cholesterol | mmol/L | mg/dl | 22748-8, 13457-7, 18262-6 |
| Total cholesterol | mmol/L | mg/dl | 14647-2, 2093-3 |
| HDL cholesterol | mmol/L | mg/dl | 14646-4, 2085-9 |
| Triglycerides | mmol/L | mg/dl | 14927-8, 2571-8 |
| Creatinine (serum) | umol/L | mg/dl | 14682-9, 2160-0, 38483-4 |
| ALT | U/L | iu/l, [iu]/l | 1742-6, 1743-4, 1744-2 |
- The same result sent again is skipped. A changed value must be sent with status
amendedorcorrected: it replaces the earlier result, and both stay in the record. A changed value sent asfinalis refused (LAB_CONFLICTING_FINAL). - Each result keeps its LOINC code, your
id, the value and unit as sent, and the connection that sent it.
Common result codes
| Code | Meaning |
|---|---|
| MISSING_VERSION / INVALID_VERSION | Send an integer version that increases with every change |
| INVALID_START / INVALID_END | Use an ISO date-time with an offset |
| SLOT_STALE | The slot has already started |
| UNKNOWN_APPOINTMENT_TYPE | Map this type in the connection settings |
| NO_PATIENT_IDENTIFIER | Include the patient’s record number |
| INEXACT_VALUE | A value with <, > or similar is a bound, not a reading |
| OUT_OF_RANGE / FUTURE_TIME | Glucose outside 18–720 mg/dL (1–40 mmol/L), or a time in the future |
| LAB_UNKNOWN_UNIT / LAB_OUT_OF_RANGE | Send a unit from the table above; check the value and unit match |
| LAB_UNKNOWN_CODE / LAB_MISSING_ID | Use a LOINC code from the table, and include the Observation id |
| LAB_CONFLICTING_FINAL | Send the changed result as amended or corrected |
Next: Going live