Newer Version Available

This content describes an older version of this product. View Latest

Book Appointment Action

Create or book a new appointment.

This action is available in API version 65.0 and later.

Supported REST HTTP Methods

URI
/services/data/v65.0/connect/health/appointment-management/appointment
Formats
JSON, XML
HTTP Methods
POST
Authentication
Authorization: OAuth2 Bearer Token

Inputs

Input Details
appointmentTypes
Type
Array
Description
Required, if none of workTypeId, serviceTypes, or serviceCategories is provided.
Type of appointment, for example, Follow-up.
channelId
Type
String
Description
Required, if an engagement channel is configured for a visit type.
The engagement channel associated with the appointment.
comment
Type
String
Description
Optional
The notes associated with the appointment. Maximum length is 256 characters.
description
Type
String
Description
Optional
The description of the appointment.
endDate
Type
String
Description
Optional
The end time of the appointment.
participants
Type
Array
Description
Required. Patient and Facility (Location) are mandatory. Additionally, either a Device (asset) or a Provider is required for a single resource appointment, and both are required for a multi-resource appointment.
List of participants involved in the appointment.
serviceCategories
Type
Array
Description
Required, if none of workTypeId, serviceTypes, or appointmentTypes is provided.
List of broad categorizations of the service to be performed during this appointment.
serviceTypes
Type
Array
Description
Required, if none of workTypeId, appointmentTypes, or serviceCategories is provided.
List of specific services that are to be performed during this appointment.
slots
Type
Array
Description
Required, if the appointment is being booked for an external resource.
List of references to the slots that this appointment is filling.
sourceSystem
Type
String
Description
Required, if workTypeId is not provided but one of appointmentTypes, serviceTypes, or serviceCategories is provided.
Describes the external system defined in Salesforce, such as "cerner".
specialties
Type
Array
Description
Optional
List of the specialty of a practitioner that would be required to perform the service requested in this appointment.
startDate
Type
String
Description
Required
The start time of the appointment.
timeZone
Type
String
Description
Optional
Creates the appointment in the specified time zone.
workTypeId
Type
String
Description
Required, if none of appointmentTypes, serviceTypes, or serviceCategories is provided.
The visit type associated with the appointment.

Outputs

Output Details
id
Type
String
Description
The ID of the Appointment.
isSuccess
Type
Boolean
Description
Indicates whether the appointment was created successfully.
status
Type
String
Description
The status of the Appointment, such as Scheduled or Rejected.
errorMessages
Type
Array
Description
A list of errors that occurred, if any.

Example

Sample Request

1{
2    "workTypeId": "08qxxG000000Axq6xxC",
3    "channelId": "0eFxx000000NNOVxx0",
4    "description": "Discussion",
5    "startDate": "2025-07-21T18:00:00.000Z",
6    "endDate": "2025-07-21T18:30:00.000Z",
7    "comment": "Payload for the testing",
8    "participants": [
9        {
10            "reference": "Patient/001xx000012udqQxxQ"
11        },
12        {
13            "reference": "Practitioner/0bSxx0000005JoaxxE",
14            "isReferenceRequired": true
15        },
16        {
17            "reference": "Facility/001xx000012udqhxxA"
18        }
19    ]
20}

Sample Response

1[
2    {
3        "id": "08pxx000000Axq6xxC",
4        "isSuccess": true,
5        "status": "scheduled",
6        "error": []
7    }
8]