Slot

A slot of time on a schedule that may be available for booking appointments.

http://hl7.org/fhir/R4/slot.html

Related guides:

Endpoints

Attributes

schedule
json

The Schedule resource that this slot belongs to

status
string

The status of the available slot. Canvas only returns slots that are available for booking, so this field will always be returned as free.

start
datetime

Date/Time that the slot is to begin

end
datetime

Date/Time that the slot is to conclude

Query Parameters

duration
integer

If included, the request will search for available appointment slots with the given duration value in minutes. If not provided, a duration of 20 minutes will be used.

end
date

If included, the request will search for available appointment slots up until this date. If not included, a week will be used as default (7 days from the start date).

schedule required
string

The Schedule Resource that we are seeking a slot within. The Schedule resource can be used to retrieve a list of Schedule ids.

start
date

If included, the request will search for available appointment slots on or after this date. If not included, the current UTC date will be used.

Responses

200 OK
Request was successful.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
  • curl --request GET \
         --url 'https://fumage-example.canvasmedical.com/Slot?schedule=Location.2-Staff.3640cd20de8a470aa570a852859ac87e&start=2023-09-21&end=2023-09-23&duration=20' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/Slot?schedule=Location.2-Staff.3640cd20de8a470aa570a852859ac87e&start=2023-09-21&end=2023-09-23&duration=20"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
        "resourceType": "Bundle",
        "type": "searchset",
        "total": 3,
        "entry":
        [
            {
                "resource":
                {
                    "resourceType": "Slot",
                    "schedule":
                    {
                        "reference": "Schedule/Location.2-Staff.3640cd20de8a470aa570a852859ac87e",
                        "type": "Schedule"
                    },
                    "status": "free",
                    "start": "2023-09-21T08:45:00-07:00",
                    "end": "2023-09-21T09:05:00-07:00"
                }
            },
            {
                "resource":
                {
                    "resourceType": "Slot",
                    "schedule":
                    {
                        "reference": "Schedule/Location.2-Staff.3640cd20de8a470aa570a852859ac87e",
                        "type": "Schedule"
                    },
                    "status": "free",
                    "start": "2023-09-21T13:45:00-07:00",
                    "end": "2023-09-21T14:05:00-07:00"
                }
            },
            {
                "resource":
                {
                    "resourceType": "Slot",
                    "schedule":
                    {
                        "reference": "Schedule/Location.2-Staff.3640cd20de8a470aa570a852859ac87e",
                        "type": "Schedule"
                    },
                    "status": "free",
                    "start": "2023-09-22T09:15:00-07:00",
                    "end": "2023-09-22T09:35:00-07:00"
                }
            }
        ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "invalid",
          "details": {
            "text": "Bad request"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "unknown",
          "details": {
            "text": "Authentication failed"
          }
        }
      ]
    }
    
  • {
      "resourceType": "OperationOutcome",
      "issue": [
        {
          "severity": "error",
          "code": "forbidden",
          "details": {
            "text": "Authorization failed"
          }
        }
      ]
    }