Update bookingAppointment

Namespace: microsoft.graph

Update the properties of a bookingAppointment object in the specified bookingBusiness.

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) BookingsAppointment.ReadWrite.All, Bookings.ReadWrite.All, Bookings.Manage.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

PATCH /solutions/bookingBusinesses/{id}/appointments/{id}

Request headers

Name Description
Authorization Bearer {code}. Required.

Request body

In the request body, supply only the values for properties that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values.

The following table specifies the properties that can be updated.

Property Type Description
customers bookingCustomerInformation collection It lists down the customer properties for an appointment. An appointment will contain a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional.
customerTimeZone String The time zone of the customer. For a list of possible values, see dateTimeTimeZone.
duration Duration The length of the appointment, denoted in ISO8601 format.
endDateTime dateTimeTimeZone The date, time, and time zone that the appointment ends.
filledAttendeesCount Int32 The current number of customers in the appointment. Required.
isLocationOnline Boolean If true, indicates that the appointment will be held online. Default value is false.
maximumAttendeesCount Int32 The maximum number of customers allowed in the appointment. Required.
optOutOfCustomerEmail Boolean If true, indicates that the bookingCustomer for this appointment does not wish to receive a confirmation for this appointment.
postBuffer Duration The amount of time to reserve after the appointment ends, for cleaning up, as an example. The value is expressed in ISO8601 format.
preBuffer Duration The amount of time to reserve before the appointment begins, for preparation, as an example. The value is expressed in ISO8601 format.
price Double The regular price for an appointment for the specified bookingService.
priceType bookingPriceType A setting to provide flexibility for the pricing structure of services. Possible values are: undefined, fixedPrice, startingAt, hourly, free, priceVaries, callUs, notSet, unknownFutureValue.
reminders bookingReminder collection The collection of customer reminders sent for this appointment. The value of this property is available only when reading this bookingAppointment by its ID.
selfServiceAppointmentId String An additional tracking ID for the appointment, if the appointment has been created directly by the customer on the scheduling page, as opposed to by a staff member on behalf of the customer. Only supported for appointment if maxAttendeeCount is 1.
serviceId String The ID of the bookingService associated with this appointment.
serviceLocation location The location where the service is delivered.
serviceName String The name of the bookingService associated with this appointment.
This property is optional when creating a new appointment. If not specified, it is computed from the service associated with the appointment by the serviceId property.
serviceNotes String Notes from a bookingStaffMember. The value of this property is available only when reading this bookingAppointment by its ID.
smsNotificationsEnabled Boolean If true, indicates SMS notifications will be sent to the customers for the appointment. Default value is false.
staffMemberIds String collection The ID of each bookingStaffMember who is scheduled in this appointment.
startDateTime dateTimeTimeZone The date, time, and time zone that the appointment begins.

Note

If the maximum number of customers (maximumAttedeesCount) allowed in the service is greater than 1:

  • Make sure that the customers exist in the Booking Calendar. If they don’t, create using the Create bookingCustomer operation.
  • Pass valid customer IDs when you create or update the appointment. If the customer ID is not valid, that customer won't be included in the appointment object.

Response

If successful, this method returns a 204 No Content response code. It does not return anything in the response body.

Examples

Request

The following example changes the date of service by a day.

PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.onmicrosoft.com/appointments/AAMkADKnAAA=
Content-type: application/json

{
    "@odata.type":"#microsoft.graph.bookingAppointment",
    "endDateTime":{
        "@odata.type":"#microsoft.graph.dateTimeTimeZone",
        "dateTime":"2018-05-06T12:30:00.0000000+00:00",
        "timeZone":"UTC"
    },
    "startDateTime":{
        "@odata.type":"#microsoft.graph.dateTimeTimeZone",
        "dateTime":"2018-05-06T12:00:00.0000000+00:00",
        "timeZone":"UTC"
    }
}

Response

The following is an example of the response.

HTTP/1.1 204 No Content