This is the first step in setting up a Bookings business where you must specify the business display name. You can include other information such as business address, web site address, and scheduling policy, or set that information later by updating the bookingBusiness.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
Bookings.Manage.All
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
Not supported.
Not supported.
HTTP request
POST /solutions/bookingBusinesses
Request headers
Name
Description
Authorization
Bearer {code}
Request body
In the request body, supply a JSON representation of a bookingBusiness object.
Response
If successful, this method returns a 201 Created response code and a bookingBusiness object in the response body.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new BookingBusiness
{
DisplayName = "Fourth Coffee",
Address = new PhysicalAddress
{
Street = "4567 Main Street",
City = "Buffalo",
State = "NY",
CountryOrRegion = "USA",
PostalCode = "98052",
AdditionalData = new Dictionary<string, object>
{
{
"postOfficeBox" , "P.O. Box 123"
},
},
},
Phone = "206-555-0100",
Email = "manager@fourthcoffee.com",
WebSiteUrl = "https://www.fourthcoffee.com",
DefaultCurrencyIso = "USD",
};
// To initialize your graphClient, see https://video2.skills-academy.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BookingBusinesses.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BookingBusiness bookingBusiness = new BookingBusiness();
bookingBusiness.setDisplayName("Fourth Coffee");
PhysicalAddress address = new PhysicalAddress();
address.setStreet("4567 Main Street");
address.setCity("Buffalo");
address.setState("NY");
address.setCountryOrRegion("USA");
address.setPostalCode("98052");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
additionalData.put("postOfficeBox", "P.O. Box 123");
address.setAdditionalData(additionalData);
bookingBusiness.setAddress(address);
bookingBusiness.setPhone("206-555-0100");
bookingBusiness.setEmail("manager@fourthcoffee.com");
bookingBusiness.setWebSiteUrl("https://www.fourthcoffee.com");
bookingBusiness.setDefaultCurrencyIso("USD");
BookingBusiness result = graphClient.solutions().bookingBusinesses().post(bookingBusiness);
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.