BookProposedTimeSlot

Creates the patient in our system and books an appointment from the time slot. Returns the new appointment.

JavaScript library method

patientportal.anonBooking.bookProposedTimeSlot({
    proposedTimeSlot: <proposeTimeSlot>,
    clinician: <clinician>,
    clinicianSex: <clinicianSex>,
    method: <method>,
    price: <price>
});

HTTP Method

Verb URL
POST /patientportalapi/anon-booking/book-time-slot

POST Parameters

Parameter Type Description
proposedTimeSlot AppointmentData The proposed time slot data, which can be constructed using the data provided by the GetProposedTimeSlots.
clinician int (optional) Clinician filter. Identifier provided by the API upon GetClinicians. Allow 0 for any clinician.
clinicianSex int (optional)

Clinician’s gender filter:

  • 0 = any sex
  • 1 = male
  • 2 = female
method int (optional)

The method that will be used to determine which slot to select if multiple are found that match the given input criteria:

  • 0 = random
price decimal (optional) Limit the bookable slots to only those that match the given price exactly

POST data example

{
    "proposedTimeSlot": {
        "Location": {
            "Key": 214
        },
        "Modules": [
            {
                "Key": 10382
            }
        ],
        "PayerType": "example",
        "Services": [],
        "Site": {
            "Key": 1123
        },
        "Start": "2025-01-01T09:30:00",
        "Type": {
            "Key": "00000000fc0af8e9"
        }
    },
    "clinicianSex": 1,
    "method": 0,
    "price": 100
}

Returns

AppointmentData

Remarks

If no appropriate slot can be found for the proposed time slot, for example it was booked in the meantime, then an error is returned, see Error handling.