BookingService Resource

Appointment booking service.

POST /bookings

Creates a new appointment from a booking request.

Request Body
media type data type description
application/json Booking (JSON) the booking
Response Body
media type data type description
text/plain (custom) the appointment reference

Example

Request
POST /bookings
Content-Type: application/json
Accept: text/plain

                
{
  "location" : 12345,
  "schedule" : 12345,
  "appointmentType" : 12345,
  "start" : "...",
  "end" : "...",
  "title" : "...",
  "firstName" : "...",
  "lastName" : "...",
  "email" : "...",
  "phone" : "...",
  "mobile" : "...",
  "patientName" : "...",
  "notes" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: text/plain

                
...
                
              

DELETE /bookings/{reference}

Cancels a booking.

Request Parameters
name type description
reference path the booking reference
Response Body
media type data type description
application/json object (JSON) a 204 response on success

Example

Request
DELETE /bookings/{reference}
Accept: application/json

              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /bookings/{reference}

Returns a booking given its reference.

Request Parameters
name type description
reference path the booking reference
Response Body
media type data type description
application/json Booking (JSON) the booking

Example

Request
GET /bookings/{reference}
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "location" : 12345,
  "schedule" : 12345,
  "appointmentType" : 12345,
  "start" : "...",
  "end" : "...",
  "title" : "...",
  "firstName" : "...",
  "lastName" : "...",
  "email" : "...",
  "phone" : "...",
  "mobile" : "...",
  "patientName" : "...",
  "notes" : "..."
}