Skip to content
← Resources

Schedule connector

Send freed slots, bookings, glucose readings and laboratory results from your systems.

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.

EndpointPurposeAccepts
POST /api/connect/v1/slotsFreed or taken slotsFHIR R4 Slot or Bundle, or { slots: [...] }
POST /api/connect/v1/appointmentsBookings read back from your scheduleFHIR R4 Appointment or Bundle, or { appointments: [...] }
POST /api/connect/v1/observationsGlucose readings from devices, and laboratory resultsFHIR 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" } ] }'
  • id and an increasing version are required; resending the same version is safe. For FHIR, send meta.versionId or meta.lastUpdated.
  • Times need an offset (Z or +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 busy before 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.

ResultStored asAlso acceptedLOINC (examples)
HbA1cmmol/mol%4548-4, 17856-6, 41995-2
Glucose (laboratory)mmol/Lmg/dl2345-7, 2339-0, 1558-6
eGFRmL/min/{1.73_m2}ml/min/1.73m2, ml/min/1.73_m233914-3, 48642-3, 48643-1
Urine albumin:creatinine ratiomg/mmolmg/g14959-1, 9318-7, 13705-9
LDL cholesterolmmol/Lmg/dl22748-8, 13457-7, 18262-6
Total cholesterolmmol/Lmg/dl14647-2, 2093-3
HDL cholesterolmmol/Lmg/dl14646-4, 2085-9
Triglyceridesmmol/Lmg/dl14927-8, 2571-8
Creatinine (serum)umol/Lmg/dl14682-9, 2160-0, 38483-4
ALTU/Liu/l, [iu]/l1742-6, 1743-4, 1744-2
  • The same result sent again is skipped. A changed value must be sent with status amended or corrected: it replaces the earlier result, and both stay in the record. A changed value sent as final is 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

CodeMeaning
MISSING_VERSION / INVALID_VERSIONSend an integer version that increases with every change
INVALID_START / INVALID_ENDUse an ISO date-time with an offset
SLOT_STALEThe slot has already started
UNKNOWN_APPOINTMENT_TYPEMap this type in the connection settings
NO_PATIENT_IDENTIFIERInclude the patient’s record number
INEXACT_VALUEA value with <, > or similar is a bound, not a reading
OUT_OF_RANGE / FUTURE_TIMEGlucose outside 18–720 mg/dL (1–40 mmol/L), or a time in the future
LAB_UNKNOWN_UNIT / LAB_OUT_OF_RANGESend a unit from the table above; check the value and unit match
LAB_UNKNOWN_CODE / LAB_MISSING_IDUse a LOINC code from the table, and include the Observation id
LAB_CONFLICTING_FINALSend the changed result as amended or corrected

Next: Going live