Пространство имен: microsoft.graph
Обновите свойства объекта bookingAppointment в указанном bookingBusiness.
Этот API доступен в следующих национальных облачных развертываниях.
| Глобальная служба |
Правительство США L4 |
Правительство США L5 (DOD) |
Китай управляется 21Vianet |
| ✅ |
✅ |
✅ |
❌ |
Разрешения
Выберите разрешение или разрешения, помеченные как наименее привилегированные для этого API. Используйте более привилегированное разрешение или разрешения только в том случае, если это требуется приложению. Дополнительные сведения о делегированных разрешениях и разрешениях приложений см. в разделе Типы разрешений. Дополнительные сведения об этих разрешениях см. в справочнике по разрешениям.
| Тип разрешения |
Разрешения с наименьшими привилегиями |
Более высокие привилегированные разрешения |
| Делегированные (рабочая или учебная учетная запись) |
BookingsAppointment.ReadWrite.All |
Bookings.Manage.All, Bookings.ReadWrite.All |
| Делегированные (личная учетная запись Майкрософт) |
Не поддерживается. |
Не поддерживается. |
| Приложение |
BookingsAppointment.ReadWrite.All |
Bookings.Manage.All, Bookings.Read.All, Bookings.ReadWrite.All |
Примечание.
При создании пользовательского приложения с разрешениями приложения необходимо выполнить проверку бизнес-правил.
HTTP-запрос
PATCH /solutions/bookingBusinesses/{id}/appointments/{id}
| Имя |
Описание |
| Авторизация |
Bearer {код}. Обязательно. |
Текст запроса
В тексте запроса укажите только значения свойств для обновления. Существующие свойства, которые не включены в текст запроса, сохраняют свои предыдущие значения или пересчитываются на основе изменений других значений свойств.
В следующей таблице указаны свойства, которые можно обновить.
| Свойство |
Тип |
Описание |
| customerEmailAddress |
String |
SMTP-адрес bookingCustomer , который заказит встречу. |
| customerName |
String |
Имя клиента. |
| customerNotes |
String |
Заметки от клиента, связанного с этой встречей. Значение можно получить только при чтении этого объекта bookingAppointment по его идентификатору. Это свойство можно задать только при первоначальном создании встречи с новым клиентом. |
| customerPhone |
String |
Номер телефона клиента. |
| Клиентов |
коллекция bookingCustomerInformation |
В нем перечислены свойства клиента для встречи. Встреча содержит список сведений о клиентах, а каждая единица указывает свойства клиента, который является частью этой встречи. Необязательный параметр. |
| customerTimeZone |
String |
Часовой пояс клиента. Список возможных значений см. в разделе dateTimeTimeZone. |
| duration |
Duration (Длительность) |
Длина встречи, обозначенная в ISO8601 формате. |
| end |
dateTimeTimeZone |
Дата, время и часовой пояс окончания встречи. |
| invoiceStatus |
string |
Состояние счета. Допустимые значения: draft, reviewing, open, canceled, paid и corrective. |
| isCustomerAllowedToManageBooking |
Логический |
Указывает, что клиент может управлять заказами, созданными сотрудниками. Значение по умолчанию — false. |
| filledAttendeesCount |
Int32 |
Текущее число клиентов в встрече. Обязательно. |
| isLocationOnline |
Логический |
True указывает, что встреча проводится в режиме онлайн. Значение по умолчанию — false. |
| maximumAttendeesCount |
Int32 |
Максимальное число клиентов, разрешенных в встрече. Обязательно. |
| optOutOfCustomerEmail |
Логический |
True указывает, что bookingCustomer для этой встречи не хочет получать подтверждение для этой встречи. |
| postBuffer |
Duration (Длительность) |
Количество времени, которое необходимо зарезервировать после окончания встречи для очистки, в качестве примера. Значение выражается в формате ISO8601 . |
| preBuffer |
Duration (Длительность) |
Количество времени, которое необходимо зарезервировать до начала встречи для подготовки, в качестве примера. Значение выражается в формате ISO8601 . |
| Цена |
Двойное с плавающей точкой |
Обычная цена за встречу для указанной bookingService. |
| priceType |
bookingPriceType |
Параметр, обеспечивающий гибкость структуры ценообразования служб. Возможные значения: , , , , , free, priceVaries, callUs, notSet, . unknownFutureValuehourlystartingAtfixedPriceundefined |
| Напоминания |
коллекция bookingReminder |
Коллекция напоминаний клиентов, отправленных для этой встречи. Значение этого свойства доступно только при чтении этого объекта bookingAppointment по его идентификатору. |
| selfServiceAppointmentId |
String |
Другой идентификатор отслеживания для встречи, если встреча была создана непосредственно клиентом на странице планирования, а не сотрудником от имени клиента. |
| serviceId |
Строка |
Идентификатор bookingService , связанного с этой встречей. |
| serviceLocation |
location |
Расположение, в котором доставляется служба. |
| serviceName |
String |
Имя службы bookingService , связанной с этой встречей. Это свойство является необязательным при создании новой встречи. Если этот параметр не указан, он вычисляется из службы, связанной с встречей, с помощью свойства serviceId . |
| serviceNotes |
String |
Заметки из bookingStaffMember. Значение этого свойства доступно только при чтении этого объекта bookingAppointment по его идентификатору. |
| smsNotificationsEnabled |
Логический |
True указывает, что клиентам отправляются SMS-уведомления о встрече. Значение по умолчанию — false. |
| staffMemberIds |
Коллекция строк |
Идентификатор каждого bookingStaffMember , запланированного на эту встречу. |
| начать |
dateTimeTimeZone |
Дата, время и часовой пояс, когда начинается встреча. |
Примечание.
Если максимальное число клиентов (maximumAttedeesCount) в службе больше 1:
- Убедитесь, что клиенты существуют в Calendar Booking. Если это не так, создайте с помощью операции Создать bookingCustomer .
- Передайте действительные идентификаторы клиентов при создании или обновлении встречи. Если идентификатор клиента недопустим, этот клиент не будет включен в объект встречи.
Отклик
В случае успешного выполнения этот метод возвращает код отклика 204 No Content. Он не возвращает ничего в теле ответа.
Примеры
Пример 1. Изменение даты обслуживания
Запрос
В следующем примере дата обслуживания изменяется на день.
PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.com/appointments/AAMkADKnAAA=
Content-type: application/json
{
"@odata.type":"#microsoft.graph.bookingAppointment",
"end":{
"@odata.type":"#microsoft.graph.dateTimeTimeZone",
"dateTime":"2018-05-06T12:30:00.0000000+00:00",
"timeZone":"UTC"
},
"start":{
"@odata.type":"#microsoft.graph.dateTimeTimeZone",
"dateTime":"2018-05-06T12:00:00.0000000+00:00",
"timeZone":"UTC"
}
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new BookingAppointment
{
OdataType = "#microsoft.graph.bookingAppointment",
AdditionalData = new Dictionary<string, object>
{
{
"end" , new DateTimeTimeZone
{
OdataType = "#microsoft.graph.dateTimeTimeZone",
DateTime = "2018-05-06T12:30:00.0000000+00:00",
TimeZone = "UTC",
}
},
{
"start" , new DateTimeTimeZone
{
OdataType = "#microsoft.graph.dateTimeTimeZone",
DateTime = "2018-05-06T12:00:00.0000000+00:00",
TimeZone = "UTC",
}
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BookingBusinesses["{bookingBusiness-id}"].Appointments["{bookingAppointment-id}"].PatchAsync(requestBody);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewBookingAppointment()
additionalData := map[string]interface{}{
end := graphmodels.NewDateTimeTimeZone()
dateTime := "2018-05-06T12:30:00.0000000+00:00"
end.SetDateTime(&dateTime)
timeZone := "UTC"
end.SetTimeZone(&timeZone)
requestBody.SetEnd(end)
start := graphmodels.NewDateTimeTimeZone()
dateTime := "2018-05-06T12:00:00.0000000+00:00"
start.SetDateTime(&dateTime)
timeZone := "UTC"
start.SetTimeZone(&timeZone)
requestBody.SetStart(start)
}
requestBody.SetAdditionalData(additionalData)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
appointments, err := graphClient.Solutions().BookingBusinesses().ByBookingBusinessId("bookingBusiness-id").Appointments().ByBookingAppointmentId("bookingAppointment-id").Patch(context.Background(), requestBody, nil)
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BookingAppointment bookingAppointment = new BookingAppointment();
bookingAppointment.setOdataType("#microsoft.graph.bookingAppointment");
HashMap<String, Object> additionalData = new HashMap<String, Object>();
DateTimeTimeZone end = new DateTimeTimeZone();
end.setOdataType("#microsoft.graph.dateTimeTimeZone");
end.setDateTime("2018-05-06T12:30:00.0000000+00:00");
end.setTimeZone("UTC");
additionalData.put("end", end);
DateTimeTimeZone start = new DateTimeTimeZone();
start.setOdataType("#microsoft.graph.dateTimeTimeZone");
start.setDateTime("2018-05-06T12:00:00.0000000+00:00");
start.setTimeZone("UTC");
additionalData.put("start", start);
bookingAppointment.setAdditionalData(additionalData);
BookingAppointment result = graphClient.solutions().bookingBusinesses().byBookingBusinessId("{bookingBusiness-id}").appointments().byBookingAppointmentId("{bookingAppointment-id}").patch(bookingAppointment);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
const options = {
authProvider,
};
const client = Client.init(options);
const bookingAppointment = {
'@odata.type':'#microsoft.graph.bookingAppointment',
end: {
'@odata.type':'#microsoft.graph.dateTimeTimeZone',
dateTime: '2018-05-06T12:30:00.0000000+00:00',
timeZone: 'UTC'
},
start: {
'@odata.type':'#microsoft.graph.dateTimeTimeZone',
dateTime: '2018-05-06T12:00:00.0000000+00:00',
timeZone: 'UTC'
}
};
await client.api('/solutions/bookingBusinesses/Contosolunchdelivery@contoso.com/appointments/AAMkADKnAAA=')
.update(bookingAppointment);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\BookingAppointment;
use Microsoft\Graph\Generated\Models\DateTimeTimeZone;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BookingAppointment();
$requestBody->setOdataType('#microsoft.graph.bookingAppointment');
$additionalData = [
'end' => [
'@odata.type' => '#microsoft.graph.dateTimeTimeZone',
'dateTime' => '2018-05-06T12:30:00.0000000+00:00',
'timeZone' => 'UTC',
],
'start' => [
'@odata.type' => '#microsoft.graph.dateTimeTimeZone',
'dateTime' => '2018-05-06T12:00:00.0000000+00:00',
'timeZone' => 'UTC',
],
];
$requestBody->setAdditionalData($additionalData);
$result = $graphServiceClient->solutions()->bookingBusinesses()->byBookingBusinessId('bookingBusiness-id')->appointments()->byBookingAppointmentId('bookingAppointment-id')->patch($requestBody)->wait();
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
Import-Module Microsoft.Graph.Bookings
$params = @{
"@odata.type" = "#microsoft.graph.bookingAppointment"
end = @{
"@odata.type" = "#microsoft.graph.dateTimeTimeZone"
dateTime = "2018-05-06T12:30:00.0000000+00:00"
timeZone = "UTC"
}
start = @{
"@odata.type" = "#microsoft.graph.dateTimeTimeZone"
dateTime = "2018-05-06T12:00:00.0000000+00:00"
timeZone = "UTC"
}
}
Update-MgBookingBusinessAppointment -BookingBusinessId $bookingBusinessId -BookingAppointmentId $bookingAppointmentId -BodyParameter $params
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.booking_appointment import BookingAppointment
from msgraph.generated.models.date_time_time_zone import DateTimeTimeZone
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BookingAppointment(
odata_type = "#microsoft.graph.bookingAppointment",
additional_data = {
"end" : {
"@odata_type" : "#microsoft.graph.dateTimeTimeZone",
"date_time" : "2018-05-06T12:30:00.0000000+00:00",
"time_zone" : "UTC",
},
"start" : {
"@odata_type" : "#microsoft.graph.dateTimeTimeZone",
"date_time" : "2018-05-06T12:00:00.0000000+00:00",
"time_zone" : "UTC",
},
}
)
result = await graph_client.solutions.booking_businesses.by_booking_business_id('bookingBusiness-id').appointments.by_booking_appointment_id('bookingAppointment-id').patch(request_body)
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
Отклик
Ниже показан пример отклика.
HTTP/1.1 204 No Content
Пример 2. Обновление клиентов для встречи
В следующем примере обновляется массив клиентов для встречи с несколькими клиентами. Свойство customers — это полный массив замены. В него входят все клиенты, которые должны быть частью встречи, а не только новые.
Примечание.
- Каждый объект в массиве customers должен содержать
@odata.type значение #microsoft.graph.bookingCustomerInformation. Пропуск этого свойства приводит к сбою запроса.
- Включите сведения о клиенте, такие как имя, адрес электронной почты и телефон , для каждой записи. API не заполняет эти поля автоматически из customerId — если они опущены, они будут пустыми в встрече.
-
Идентификатор клиента должен ссылаться на действительный bookingCustomer, который существует в Calendar Booking. Если он не существует, создайте его с помощью операции Создать bookingCustomer .
- Для поддержки нескольких клиентов связанная служба bookingService должна иметь значение maximumAttendeesCount больше 1.
Запрос
PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.com/appointments/AAMkADKoAAA=
Content-type: application/json
{
"@odata.type":"#microsoft.graph.bookingAppointment",
"customers": [
{
"@odata.type": "#microsoft.graph.bookingCustomerInformation",
"customerId": "cd56bb19-c348-42c6-af5c-09818c87fb8c",
"name": "John Doe",
"emailAddress": "john.doe@example.com",
"phone": "313-555-5555"
},
{
"@odata.type": "#microsoft.graph.bookingCustomerInformation",
"customerId": "72f148fa-9a86-4c59-b277-f5089d9ea0e7",
"name": "Jane Smith",
"emailAddress": "jane.smith@example.com",
"phone": "248-555-5678"
}
]
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new BookingAppointment
{
OdataType = "#microsoft.graph.bookingAppointment",
Customers = new List<BookingCustomerInformationBase>
{
new BookingCustomerInformation
{
OdataType = "#microsoft.graph.bookingCustomerInformation",
CustomerId = "cd56bb19-c348-42c6-af5c-09818c87fb8c",
Name = "John Doe",
EmailAddress = "john.doe@example.com",
Phone = "313-555-5555",
},
new BookingCustomerInformation
{
OdataType = "#microsoft.graph.bookingCustomerInformation",
CustomerId = "72f148fa-9a86-4c59-b277-f5089d9ea0e7",
Name = "Jane Smith",
EmailAddress = "jane.smith@example.com",
Phone = "248-555-5678",
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BookingBusinesses["{bookingBusiness-id}"].Appointments["{bookingAppointment-id}"].PatchAsync(requestBody);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewBookingAppointment()
bookingCustomerInformationBase := graphmodels.NewBookingCustomerInformation()
customerId := "cd56bb19-c348-42c6-af5c-09818c87fb8c"
bookingCustomerInformationBase.SetCustomerId(&customerId)
name := "John Doe"
bookingCustomerInformationBase.SetName(&name)
emailAddress := "john.doe@example.com"
bookingCustomerInformationBase.SetEmailAddress(&emailAddress)
phone := "313-555-5555"
bookingCustomerInformationBase.SetPhone(&phone)
bookingCustomerInformationBase1 := graphmodels.NewBookingCustomerInformation()
customerId := "72f148fa-9a86-4c59-b277-f5089d9ea0e7"
bookingCustomerInformationBase1.SetCustomerId(&customerId)
name := "Jane Smith"
bookingCustomerInformationBase1.SetName(&name)
emailAddress := "jane.smith@example.com"
bookingCustomerInformationBase1.SetEmailAddress(&emailAddress)
phone := "248-555-5678"
bookingCustomerInformationBase1.SetPhone(&phone)
customers := []graphmodels.BookingCustomerInformationBaseable {
bookingCustomerInformationBase,
bookingCustomerInformationBase1,
}
requestBody.SetCustomers(customers)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
appointments, err := graphClient.Solutions().BookingBusinesses().ByBookingBusinessId("bookingBusiness-id").Appointments().ByBookingAppointmentId("bookingAppointment-id").Patch(context.Background(), requestBody, nil)
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BookingAppointment bookingAppointment = new BookingAppointment();
bookingAppointment.setOdataType("#microsoft.graph.bookingAppointment");
LinkedList<BookingCustomerInformationBase> customers = new LinkedList<BookingCustomerInformationBase>();
BookingCustomerInformation bookingCustomerInformationBase = new BookingCustomerInformation();
bookingCustomerInformationBase.setOdataType("#microsoft.graph.bookingCustomerInformation");
bookingCustomerInformationBase.setCustomerId("cd56bb19-c348-42c6-af5c-09818c87fb8c");
bookingCustomerInformationBase.setName("John Doe");
bookingCustomerInformationBase.setEmailAddress("john.doe@example.com");
bookingCustomerInformationBase.setPhone("313-555-5555");
customers.add(bookingCustomerInformationBase);
BookingCustomerInformation bookingCustomerInformationBase1 = new BookingCustomerInformation();
bookingCustomerInformationBase1.setOdataType("#microsoft.graph.bookingCustomerInformation");
bookingCustomerInformationBase1.setCustomerId("72f148fa-9a86-4c59-b277-f5089d9ea0e7");
bookingCustomerInformationBase1.setName("Jane Smith");
bookingCustomerInformationBase1.setEmailAddress("jane.smith@example.com");
bookingCustomerInformationBase1.setPhone("248-555-5678");
customers.add(bookingCustomerInformationBase1);
bookingAppointment.setCustomers(customers);
BookingAppointment result = graphClient.solutions().bookingBusinesses().byBookingBusinessId("{bookingBusiness-id}").appointments().byBookingAppointmentId("{bookingAppointment-id}").patch(bookingAppointment);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
const options = {
authProvider,
};
const client = Client.init(options);
const bookingAppointment = {
'@odata.type':'#microsoft.graph.bookingAppointment',
customers: [
{
'@odata.type': '#microsoft.graph.bookingCustomerInformation',
customerId: 'cd56bb19-c348-42c6-af5c-09818c87fb8c',
name: 'John Doe',
emailAddress: 'john.doe@example.com',
phone: '313-555-5555'
},
{
'@odata.type': '#microsoft.graph.bookingCustomerInformation',
customerId: '72f148fa-9a86-4c59-b277-f5089d9ea0e7',
name: 'Jane Smith',
emailAddress: 'jane.smith@example.com',
phone: '248-555-5678'
}
]
};
await client.api('/solutions/bookingBusinesses/Contosolunchdelivery@contoso.com/appointments/AAMkADKoAAA=')
.update(bookingAppointment);
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\BookingAppointment;
use Microsoft\Graph\Generated\Models\BookingCustomerInformationBase;
use Microsoft\Graph\Generated\Models\BookingCustomerInformation;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BookingAppointment();
$requestBody->setOdataType('#microsoft.graph.bookingAppointment');
$customersBookingCustomerInformationBase1 = new BookingCustomerInformation();
$customersBookingCustomerInformationBase1->setOdataType('#microsoft.graph.bookingCustomerInformation');
$customersBookingCustomerInformationBase1->setCustomerId('cd56bb19-c348-42c6-af5c-09818c87fb8c');
$customersBookingCustomerInformationBase1->setName('John Doe');
$customersBookingCustomerInformationBase1->setEmailAddress('john.doe@example.com');
$customersBookingCustomerInformationBase1->setPhone('313-555-5555');
$customersArray []= $customersBookingCustomerInformationBase1;
$customersBookingCustomerInformationBase2 = new BookingCustomerInformation();
$customersBookingCustomerInformationBase2->setOdataType('#microsoft.graph.bookingCustomerInformation');
$customersBookingCustomerInformationBase2->setCustomerId('72f148fa-9a86-4c59-b277-f5089d9ea0e7');
$customersBookingCustomerInformationBase2->setName('Jane Smith');
$customersBookingCustomerInformationBase2->setEmailAddress('jane.smith@example.com');
$customersBookingCustomerInformationBase2->setPhone('248-555-5678');
$customersArray []= $customersBookingCustomerInformationBase2;
$requestBody->setCustomers($customersArray);
$result = $graphServiceClient->solutions()->bookingBusinesses()->byBookingBusinessId('bookingBusiness-id')->appointments()->byBookingAppointmentId('bookingAppointment-id')->patch($requestBody)->wait();
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
Import-Module Microsoft.Graph.Bookings
$params = @{
"@odata.type" = "#microsoft.graph.bookingAppointment"
customers = @(
@{
"@odata.type" = "#microsoft.graph.bookingCustomerInformation"
customerId = "cd56bb19-c348-42c6-af5c-09818c87fb8c"
name = "John Doe"
emailAddress = "john.doe@example.com"
phone = "313-555-5555"
}
@{
"@odata.type" = "#microsoft.graph.bookingCustomerInformation"
customerId = "72f148fa-9a86-4c59-b277-f5089d9ea0e7"
name = "Jane Smith"
emailAddress = "jane.smith@example.com"
phone = "248-555-5678"
}
)
}
Update-MgBookingBusinessAppointment -BookingBusinessId $bookingBusinessId -BookingAppointmentId $bookingAppointmentId -BodyParameter $params
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.models.booking_appointment import BookingAppointment
from msgraph.generated.models.booking_customer_information_base import BookingCustomerInformationBase
from msgraph.generated.models.booking_customer_information import BookingCustomerInformation
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BookingAppointment(
odata_type = "#microsoft.graph.bookingAppointment",
customers = [
BookingCustomerInformation(
odata_type = "#microsoft.graph.bookingCustomerInformation",
customer_id = "cd56bb19-c348-42c6-af5c-09818c87fb8c",
name = "John Doe",
email_address = "john.doe@example.com",
phone = "313-555-5555",
),
BookingCustomerInformation(
odata_type = "#microsoft.graph.bookingCustomerInformation",
customer_id = "72f148fa-9a86-4c59-b277-f5089d9ea0e7",
name = "Jane Smith",
email_address = "jane.smith@example.com",
phone = "248-555-5678",
),
],
)
result = await graph_client.solutions.booking_businesses.by_booking_business_id('bookingBusiness-id').appointments.by_booking_appointment_id('bookingAppointment-id').patch(request_body)
Подробнее о том, как добавить SDK в свой проект и создать экземпляр authProvider, см. в документации по SDK.
Отклик
Ниже приводится пример отклика.
HTTP/1.1 204 No Content