Slot

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

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

All slots are determined through our Google Calendar integration. Find out how to set this up here.

Related guides:

Endpoints

Query Parameters

A Slot Search requires a schedule search parameter.
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
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.

Response Payload Attributes

resourceType
string

The FHIR Resource name.

type
string

This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .

total
integer

The number of resources that match the search parameter.

link
array[json]

Attributes relevant to pagination, see our Pagination page for more detail.

Click to view child attributes
relation
enum [self|first|next|last]

The relation of the page search

url

The search url for the specific relation

entry
array[json]

The results bundle that lists out each object returned in the search

Click to view child attributes
resource
json

The attributes specific to the resource type, see the Attributes section below

Attributes

resourceType
string

The FHIR Resource name.

schedule
json

The Schedule resource that this slot belongs to.

Click to view child attributes
reference
string

The reference string of the schedule in the format of "Schedule/Location.<location_id>-Staff.<staff_id>".

type
string

Type the reference refers to (e.g. “Schedule”).

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.

Value Options Supported:
  • free
start
datetime

Date/Time that the slot is to begin.

end
datetime

Date/Time that the slot is to conclude

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"
          }
        }
      ]
    }