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 | 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.
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 |
Next: Going live