创建 bookingBusiness
命名空间:microsoft.graph
在租户中创建新的 Microsoft Bookings 业务 。
这是设置 Bookings 业务的第一步,你必须在其中指定业务显示名称。 可以包含其他信息,例如业务地址、网站地址和计划策略,或稍后通过更新 bookingBusiness 来设置该信息。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | Bookings.Manage.All |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| Application | 不支持。 |
HTTP 请求
POST /solutions/bookingBusinesses
请求标头
| 名称 | 说明 |
|---|---|
| Authorization | Bearer {code} |
请求正文
在请求正文中,提供 bookingBusiness 对象的 JSON 表示形式。
响应
如果成功,此方法在响应正文中返回 201 Created 响应代码和 bookingBusiness 对象。
示例
请求
下面展示了示例请求。
POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses
Content-type: application/json
{
"displayName":"Fourth Coffee",
"address":{
"postOfficeBox":"P.O. Box 123",
"street":"4567 Main Street",
"city":"Buffalo",
"state":"NY",
"countryOrRegion":"USA",
"postalCode":"98052"
},
"phone":"206-555-0100",
"email":"manager@fourthcoffee.com",
"webSiteUrl":"https://www.fourthcoffee.com",
"defaultCurrencyIso":"USD"
}
响应
这是一个示例响应。注意:为提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 201 Created
Content-type: application/json
{
"@odata.context":"https://graph.microsoft.com/v1.0/solutions/$metadata#bookingBusinesses/$entity",
"id":"fourthcoffee@contoso.onmicrosoft.com",
"displayName":"Fourth Coffee",
"businessType":"",
"phone":"206-555-0100",
"email":"manager@fourthcoffee.com",
"webSiteUrl":"https://www.fourthcoffee.com",
"defaultCurrencyIso":"USD",
"isPublished":false,
"publicUrl":null,
"address":{
"postOfficeBox":"P.O. Box 123",
"street":"4567 Main Street",
"city":"Buffalo",
"state":"NY",
"countryOrRegion":"USA",
"postalCode":"98052"
},
"businessHours":[
{
"day":"monday",
"timeSlots":[
{
"startTime":"08:00:00.0000000",
"endTime":"17:00:00.0000000"
}
]
},
{
"day":"tuesday",
"timeSlots":[
{
"startTime":"08:00:00.0000000",
"endTime":"17:00:00.0000000"
}
]
},
{
"day":"wednesday",
"timeSlots":[
{
"startTime":"08:00:00.0000000",
"endTime":"17:00:00.0000000"
}
]
},
{
"day":"thursday",
"timeSlots":[
{
"startTime":"08:00:00.0000000",
"endTime":"17:00:00.0000000"
}
]
},
{
"day":"friday",
"timeSlots":[
{
"startTime":"08:00:00.0000000",
"endTime":"17:00:00.0000000"
}
]
},
{
"day":"saturday",
"timeSlots":[
]
},
{
"day":"sunday",
"timeSlots":[
]
}
],
"schedulingPolicy":{
"timeSlotInterval":"PT30M",
"minimumLeadTime":"P1D",
"maximumAdvance":"P365D",
"sendConfirmationsToOwner":true,
"allowStaffSelection":true
}
}
反馈
提交和查看相关反馈