bookingAppointment: cancel

Namespace: microsoft.graph

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 /solutions/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 parameter.

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

Response

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

If you attempt to cancel an appointment that doesn't exist, this method returns a 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/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.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