bookingAppointment: cancel

Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported.

Cancel the specified bookingAppointment in the specified bookingbusiness, and send a message to the involved customer and staff members.

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

POST /bookingBusinesses/{id}/appointments/{id}/cancel

Request headers

Name Description
Authorization Bearer {code}

Request body

In the request body, provide a JSON object with the following parameters.

Parameter Type Description
cancellationMessage String A message to acknowledge with the customer that the appointment has been cancelled.

Response

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

If you attempt to cancel an appointment that does not exisit, this method returns HTTP 404 Not found.

Example

The following is an example of how to call this API.

Request

The following is an example of the request.

POST https://graph.microsoft.com/beta/bookingBusinesses/Contosolunchdelivery@M365B489948.onmicrosoft.com/appointments/AAMkADKoAAA=/cancel
Content-type: application/json

{
  "cancellationMessage": "Your appointment has been successfully cancelled. Please call us again."
}
Response

The following is an example of the response.

HTTP/1.1 204 No content