Update bookingbusiness

Important

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

Update the properties of a bookingBusiness object.

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) Bookings.ReadWrite.All, Bookings.Manage.All
Delegated (personal Microsoft account) Not supported.
Application Not supported.

HTTP request

PATCH /bookingBusinesses/<id>

Optional request headers

Name Description
Authorization Bearer {code}

Request body

In the request body, supply the values for relevant fields 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. For best performance you shouldn't include existing values that haven't changed.

Property Type Description
address physicalAddress The street address of the business.
businessHours bookingWorkHours collection The hours of operation for the business.
businessType String The type of business.
defaultCurrencyIso String The code for the currency that the business operates in on Microsoft Bookings.
displayName String A name for the business that interfaces with customers.
email String The email address for the business.
phone String The telephone number for the business.
schedulingPolicy bookingSchedulingPolicy Specifies how bookings can be created for this business.
webSiteUrl String The URL of the business web site.

Response

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

Example

Request

The following example updates the business email address and scheduling policy, to change the business default booking time slot to an hour, and advance booking up to 30 days.

PATCH https://graph.microsoft.com/beta/bookingBusinesses/fabrikam@M365B489948.onmicrosoft.com
Content-type: application/json

{
  "email": "admin@fabrikam.com",
  "schedulingPolicy": {
      "timeSlotInterval": "PT60M",
      "minimumLeadTime": "P1D",
      "maximumAdvance": "P30D",
      "sendConfirmationsToOwner": true,
      "allowStaffSelection": true
  }
}
Response

The following is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.

HTTP/1.1 204 No Content

SDK sample code


GraphServiceClient graphClient = new GraphServiceClient( authProvider );

var bookingBusiness = new BookingBusiness
{
	Email = "admin@fabrikam.com",
	SchedulingPolicy = new BookingSchedulingPolicy
	{
		TimeSlotInterval = "PT60M",
		MinimumLeadTime = "P1D",
		MaximumAdvance = "P30D",
		SendConfirmationsToOwner = true,
		AllowStaffSelection = true
	}
};

await graphClient.BookingBusinesses["fabrikam@M365B489948.onmicrosoft.com"]
	.Request()
	.UpdateAsync(bookingBusiness);

Read the SDK documentation for details on how to add the SDK to your project and create an authProvider instance.