Microsoft Graph で Microsoft Bookings API を使用するUse the Microsoft Bookings API in Microsoft Graph
重要
Microsoft Graph の/beta
バージョンの api は変更される可能性があります。APIs under the /beta
version in Microsoft Graph are subject to change. 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。Use of these APIs in production applications is not supported.
Microsoft Bookings では、中小企業のオーナーが最小限の設定で顧客の予約と情報を管理できます。Microsoft Bookings lets small business owners manage customer bookings and information with minimal setup. ビジネス オーナーは、一連のサービスを提供するビジネスを 1 つ以上作成できます。A business owner can create one or more businesses, with each business offering a set of services. オーナーはスタッフを設定し、各スタッフが実施するサービスを指定できます。The owner can set up staff members, and specify the services that each staff member performs. 顧客は当該ビジネスの特定のサービスをオンラインまたはモバイル アプリから予約できます。A customer can book an appointment for a specific service in that business in an online or mobile app. Bookings では、ビジネス、スタッフ、顧客に対し常に最新の予約情報が提供されます。Bookings ensures that the appointment time is kept up-to-date for the business, staff members, and customers involved.
Bookings API の bookingBusiness は、プログラムで次のオブジェクトを使用します。Programmatically, a bookingBusiness in the Bookings API involves the following objects:
- 1 つまたは複数の bookingStaffMember オブジェクトOne or more bookingStaffMember objects
- 1 つまたは複数の bookingService オブジェクトOne or more bookingService objects
- 一連のbookingAppointmentインスタンスA set of bookingAppointment instances
- 一連のbookingCustomerオブジェクトA set of bookingCustomer objects
Bookings REST API を使用するUsing the Bookings REST API
顧客の予約を初めて受け付ける前に、次の手順を行います。Walk through the following steps before booking customer appointments for a business the first time. 対応する操作のための適切なアクセス トークンを提供していることを確認します。Make sure you provide the appropriate access tokens for the corresponding operations.
- ビジネスで Office 365 Business Premium サブスクリプションを購入していることを確認します。Make sure the business has an Office 365 Business Premium subscription.
- エンティティ セットに POST 操作を送信して新しい bookingBusiness を作成します。Create a new bookingBusiness by sending a POST operation to the entity set. 最小限でも、顧客に対して表示される新しいビジネスの名前を指定してください。At minimum, you should specify a name for the new business that customers will see:
POST https://graph.microsoft.com/beta/bookingBusinesses
Authorization: Bearer {access token}
Content-Type: application/json
{
"displayName":"Contoso"
}
POST 応答で返される新しい bookingBusiness の id プロパティを使用して、ビジネス設定をカスタマイズし、ビジネスのスタッフとサービスを追加します。Use the id property of the new bookingBusiness returned in the POST response to continue to customize business settings, and add staff members and services for the business.
- ビジネスの個々のスタッフを追加します。Add individual staff members for the business:
POST https://graph.microsoft.com/beta/bookingBusinesses/{id}/staffMembers
Authorization: Bearer {access token}
Content-Type: application/json
{
"displayName":"Dana Swope",
"emailAddress": "danas@contoso.com",
"role": "externalGuest"
}
- ビジネスで提供する各サービスを定義します。Define each service offered by the business:
POST https://graph.microsoft.com/beta/bookingBusinesses/{id}/services
Authorization: Bearer {access token}
Content-Type: application/json
{
"displayName":"Bento"
}
- ビジネスのスケジュール ページを公開し、顧客とビジネス運営担当者が予約の受付を開始できるようにします。Publish the scheduling page for the business, to let customers and business operators start booking appointments:
POST https://graph.microsoft.com/beta/bookingBusinesses/{id}/publish
Authorization: Bearer {access token}
一般に、Office 365 テナントの予約ビジネスをすべて一覧表示するには次のようにします。In general, to list all the booking businesses in the Office 365 tenant:
GET https://graph.microsoft.com/beta/bookingBusinesses
Authorization: Bearer {access token}
一般的なユース ケースCommon use cases
次の表は、Bookings API でのビジネスの一般的な操作を示します。The following table lists the common operations for a business in the Bookings API.
関連項目See also
- Graph エクスプローラーで API をお試しください。Try the API in the Graph Explorer.
- 「パートナーによる Microsoft Graph の活用方法」を参照してください。See how some of our partners are using Microsoft Graph.
- Microsoft Graph で権限を選択する方法を理解してください。Learn how to choose permissions in Microsoft Graph.