Espacio de nombres: microsoft.graph
Actualizar las propiedades de un objeto bookingAppointment en el bookingBusiness especificado.
Disponibilidad de API
Esta API está disponible en las siguientes implementaciones en la nube nacional.
| Servicio global |
Administración pública de EE. UU. |
Gobierno de EE. UU. L5 (DOD) |
China operado por 21Vianet |
| ✅ |
✅ |
✅ |
❌ |
Permissions
Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use uno o varios permisos con privilegios más altos solo si la aplicación lo requiere. Para obtener más información sobre los permisos delegados y de aplicación, consulte Tipos de permisos. Para obtener más información sobre estos permisos, consulte la referencia de permisos.
| Tipo de permiso |
Permisos con privilegios mínimos |
Permisos con privilegios más altos |
| Delegado (cuenta profesional o educativa) |
BookingsAppointment.ReadWrite.All |
Bookings.Manage.All, Bookings.ReadWrite.All |
| Delegado (cuenta personal de Microsoft) |
No admitida. |
No admitida. |
| Aplicación |
BookingsAppointment.ReadWrite.All |
Bookings.Manage.All, Bookings.Read.All, Bookings.ReadWrite.All |
Solicitud HTTP
PATCH /solutions/bookingBusinesses/{id}/appointments/{id}
| Nombre |
Descripción |
| Autorización |
{code} del portador. Necesario. |
Cuerpo de la solicitud
En el cuerpo de la solicitud, proporcione solo los valores de las propiedades que se van a actualizar. Las propiedades existentes que no están incluidas en el cuerpo de la solicitud mantienen sus valores anteriores o se recalculan en función de los cambios realizados en otros valores de propiedad.
En la tabla siguiente se especifican las propiedades que se pueden actualizar.
| Propiedad |
Tipo |
Description |
| customerEmailAddress |
Cadena |
La dirección SMTP del bookingCustomer que reserva la cita. |
| customerName |
Cadena |
El nombre del cliente. |
| customerNotes |
Cadena |
Notas del cliente asociadas a esta cita. Solo puede obtener el valor cuando lea este bookingAppointment por su identificador. Solo puede establecer esta propiedad cuando cree inicialmente una cita con un nuevo cliente. |
| customerPhone |
Cadena |
El número de teléfono del cliente. |
| Clientes |
Recopilación bookingCustomerInformation |
Enumera las propiedades del cliente para una cita. Una cita contiene una lista de información del cliente y cada unidad indica las propiedades de un cliente que forma parte de esa cita. Opcional. |
| customerTimeZone |
Cadena |
La zona horaria del cliente. Para obtener una lista de los valores posibles, vea dateTimeTimeZone. |
| duration |
Duración |
La duración de la cita, indicada en ISO8601 formato. |
| end |
dateTimeTimeZone |
La fecha, la hora y la zona horaria en que finaliza la cita. |
| invoiceStatus |
string |
El estado de la factura. Los valores posibles son: draft, reviewing, open, canceled, paid y corrective. |
| isCustomerAllowedToManageBooking |
Booleano |
Indica que el cliente puede administrar las reservas creadas por el personal. El valor predeterminado es false. |
| filledAttendeesCount |
Int32 |
El número actual de clientes en la cita. Obligatorio. |
| isLocationOnline |
Booleano |
True Indica que la cita se lleva a cabo en línea. El valor predeterminado es false. |
| maximumAttendeesCount |
Int32 |
El número máximo de clientes permitidos en la cita. Obligatorio. |
| optOutOfCustomerEmail |
Booleano |
True indica que el bookingCustomer de esta cita no desea recibir una confirmación para esta cita. |
| postBuffer |
Duración |
La cantidad de tiempo que se va a reservar una vez finalizada la cita, para la limpieza, por ejemplo. El valor se expresa en formato ISO8601 . |
| preBuffer |
Duración |
La cantidad de tiempo a reservar antes de que comience la cita, para la preparación, por ejemplo. El valor se expresa en formato ISO8601 . |
| precio |
Doble |
El precio regular de una cita para el servicio de reserva especificado. |
| priceType |
bookingPriceType |
Una configuración para proporcionar flexibilidad para la estructura de precios de los servicios. Los valores posibles son: undefined, fixedPrice, startingAt, hourlyfree, priceVaries, callUs, notSet, , unknownFutureValue, . |
| recordatorios |
Colección bookingReminder |
La colección de recordatorios de clientes enviados para esta cita. El valor de esta propiedad está disponible solo cuando se lee este bookingAppointment por su ID. |
| selfServiceAppointmentId |
Cadena |
Otro identificador de seguimiento para la cita, si la cita la creó directamente el cliente en la página de programación, en lugar de hacerlo un miembro del personal en nombre del cliente. |
| serviceId |
Cadena |
El identificador de bookingService asociado a esta cita. |
| serviceLocation |
location |
La ubicación donde se entrega el servicio. |
| serviceName |
Cadena |
El nombre del servicio de reservas asociado a esta cita. Esta propiedad es opcional al crear una nueva cita. Si no se especifica, se calcula a partir del servicio asociado a la cita por la propiedad serviceId . |
| serviceNotes |
Cadena |
Notas de un miembro del personal de booking. El valor de esta propiedad está disponible solo cuando se lee este bookingAppointment por su ID. |
| smsNotificationsEnabled |
Booleano |
True indica que se envían notificaciones SMS a los clientes para la cita. El valor predeterminado es false. |
| staffMemberIds |
Colección string |
El ID de cada bookingStaffMember que está programado en esta cita. |
| start |
dateTimeTimeZone |
La fecha, la hora y la zona horaria en que se inicia la cita. |
Nota:
Si el número máximo de clientes (maximumAttedeesCount) permitidos en el servicio es mayor que 1:
- Asegúrese de que los clientes existen en el calendario de reservas. Si no es así, cree mediante la operación Create bookingCustomer .
- Pase identificaciones de cliente válidas al crear o actualizar la cita. Si el id. de cliente no es válido, ese cliente no se incluirá en el objeto de cita.
Respuesta
Si se ejecuta correctamente, este método devuelve un código de respuesta 204 No Content. No devuelve nada en el cuerpo de la respuesta.
Ejemplos
Ejemplo 1: Cambiar la fecha de servicio
Solicitud
El siguiente ejemplo cambia la fecha de servicio por un día.
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);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
Respuesta
En el ejemplo siguiente se muestra la respuesta.
HTTP/1.1 204 No Content
Ejemplo 2: Actualizar los clientes para una cita
En el ejemplo siguiente se actualiza la matriz customers para una cita de varios clientes. La propiedad de los clientes es una matriz de reemplazo completo: incluya a todos los clientes que deben ser parte de la cita, no solo a los nuevos.
Nota:
- Cada objeto de la matriz customers debe incluirse
@odata.type establecido en #microsoft.graph.bookingCustomerInformation. Si omite esta propiedad, la solicitud dará error.
- Incluye los detalles del cliente, como el nombre, la dirección de correo electrónico y el teléfono para cada entrada. La API no rellena automáticamente estos campos desde el customerId ; si se omiten, quedarán en blanco en la cita.
- El customerId debe hacer referencia a un bookingCustomer válido que exista en el calendario de reservas. Si no existe, cree uno mediante la operación Crear bookingCustomer .
- El servicio de reserva asociado debe tener maximumAttendeesCount mayor que 1 para admitir varios clientes.
Solicitud
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);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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);
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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();
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del 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)
Para obtener más información sobre cómo agregar el SDK al proyecto y crear una instancia de authProvider, consulte la documentación del SDK.
Respuesta
En el ejemplo siguiente se muestra la respuesta.
HTTP/1.1 204 No Content