API Reference
Availability

Availability

The Availability API provides real-time booking slot queries. It accounts for clinician sessions, existing bookings, buffer times, holds, blocks, minimum notice periods, and maximum advance booking rules.

Endpoints

MethodEndpointDescription
GET/availabilityList available slots for a date range
GET/availability/nextFind the next available slot
POST/availability/verifyVerify a specific slot is still available

Availability is computed in real-time — it is not a stored resource. Slots can be taken between query and booking, so always verify before confirming.

List Available Slots

GET /availability

Returns all available booking slots for a given date range and appointment template. Maximum date range is 14 days.

Query Parameters

ParameterTypeRequiredDescription
date_fromdateYesStart date (YYYY-MM-DD)
date_todateYesEnd date (YYYY-MM-DD), max 14 days from date_from
appointment_template_idstringYesThe appointment type to check availability for
clinician_profile_iduuidNoFilter to a specific clinician
location_iduuidNoFilter to a specific location

Example Request

curl -H "Authorization: Bearer pk_live_xxx" \
  "https://api.jumpehr.com/api-v1/availability?date_from=2024-07-01&date_to=2024-07-07&appointment_template_id=apt_type_gp_standard"

Example Response

{
  "data": {
    "slots": [
      {
        "start_time": "2024-07-01T09:00:00Z",
        "end_time": "2024-07-01T09:15:00Z",
        "clinician_profile_id": "abc-123",
        "clinician_name": "Dr Sarah Johnson",
        "location_id": "loc-456",
        "appointment_template_id": "apt_type_gp_standard",
        "is_available": true
      }
    ],
    "date_range": {
      "from": "2024-07-01",
      "to": "2024-07-07"
    }
  },
  "meta": {
    "request_id": "req_abc123"
  }
}

Find Next Available

GET /availability/next

Lightweight endpoint that finds the next available slot within 30 days. Returns null data if nothing is available.

Query Parameters

ParameterTypeRequiredDescription
appointment_template_idstringYesThe appointment type to check
clinician_profile_iduuidNoFilter to a specific clinician
location_iduuidNoFilter to a specific location

Example Response

{
  "data": {
    "next_available": "2024-07-01T09:00:00Z",
    "clinician_profile_id": "abc-123",
    "clinician_name": "Dr Sarah Johnson",
    "location_id": "loc-456",
    "appointment_template_id": "apt_type_gp_standard"
  },
  "meta": {
    "request_id": "req_abc123"
  }
}

Verify Slot Availability

POST /availability/verify

Verify that a specific slot is still available before proceeding to payment or booking. This is the recommended step between displaying slots and creating an appointment.

Request Body

FieldTypeRequiredDescription
appointment_template_idstringYesThe appointment type
start_timedatetimeYesSlot start (ISO 8601)
end_timedatetimeYesSlot end (ISO 8601)
clinician_profile_iduuidNoSpecific clinician
location_iduuidNoSpecific location

Example Response (Available)

{
  "data": {
    "available": true,
    "start_time": "2024-07-01T09:00:00Z",
    "end_time": "2024-07-01T09:15:00Z"
  },
  "meta": { "request_id": "req_abc123" }
}

Example Response (Unavailable)

{
  "data": {
    "available": false,
    "reason": "Slot has been booked by another patient",
    "next_available": "2024-07-01T09:30:00Z"
  },
  "meta": { "request_id": "req_abc123" }
}
⚠️

The next_available suggestion is best-effort — verify it again before booking.