Espacio de nombres: microsoft.graph
Actualice las propiedades de un objeto bookingAppointment en el objeto bookingBusiness especificado.
Esta API está disponible en las siguientes implementaciones nacionales de nube.
| Servicio global |
Gobierno de EE. UU. L4 |
Us Government L5 (DOD) |
China operada por 21Vianet |
| ✅ |
✅ |
✅ |
❌ |
Permissions
Elija el permiso o los permisos marcados como con privilegios mínimos para esta API. Use un permiso o permisos con privilegios superiores 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 se incluyen 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 de bookingCustomer que reserva la cita. |
| customerName |
Cadena |
Nombre del cliente. |
| customerNotes |
Cadena |
Notas del cliente asociado a esta cita. Solo puede obtener el valor cuando lea esta bookingAppointment por su identificador. Esta propiedad solo se puede establecer cuando se crea inicialmente una cita con un nuevo cliente. |
| customerPhone |
Cadena |
El número de teléfono del cliente. |
| clientes |
bookingCustomerInformation collection |
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 |
Zona horaria del cliente. Para obtener una lista de los valores posibles, vea dateTimeTimeZone. |
| duration |
Duración |
Longitud de la cita, indicada en formato ISO8601 . |
| end |
dateTimeTimeZone |
Fecha, hora y zona horaria que finaliza la cita. |
| invoiceStatus |
string |
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 |
Número actual de clientes en la cita. Obligatorio. |
| isLocationOnline |
Booleano |
True indica que la cita se mantiene en línea. El valor predeterminado es false. |
| maximumAttendeesCount |
Int32 |
Número máximo de clientes permitido en la cita. Obligatorio. |
| optOutOfCustomerEmail |
Booleano |
True indica que bookingCustomer para esta cita no desea recibir una confirmación para esta cita. |
| postBuffer |
Duración |
Cantidad de tiempo que se reserva una vez finalizada la cita, para limpiar, por ejemplo. El valor se expresa en formato ISO8601 . |
| preBuffer |
Duración |
La cantidad de tiempo que se debe reservar antes de que comience la cita, para su preparación, como ejemplo. El valor se expresa en formato ISO8601 . |
| precio |
Doble |
Precio normal de una cita para el bookingService especificado. |
| priceType |
bookingPriceType |
Una configuración para proporcionar flexibilidad para la estructura de precios de los servicios. Los valores posibles son: undefined, fixedPrice, , startingAt, freehourly, priceVaries, callUs, , notSet. unknownFutureValue |
| recordatorios |
bookingReminder collection |
Colección de recordatorios de clientes enviados para esta cita. El valor de esta propiedad solo está disponible al leer esta reservaAppointment por su identificador. |
| selfServiceAppointmentId |
Cadena |
Otro identificador de seguimiento para la cita, si el cliente creó la cita directamente en la página de programación, en lugar de por un miembro del personal en nombre del cliente. |
| serviceId |
Cadena |
Identificador del bookingService asociado a esta cita. |
| serviceLocation |
location |
Ubicación donde se entrega el servicio. |
| serviceName |
Cadena |
Nombre del bookingService 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 bookingStaffMember. El valor de esta propiedad solo está disponible al leer esta reservaAppointment por su identificador. |
| smsNotificationsEnabled |
Booleano |
True indica que las notificaciones SMS se envían a los clientes para la cita. El valor predeterminado es false. |
| staffMemberIds |
Colección string |
El identificador de cada bookingStaffMember que está programado en esta cita. |
| start |
dateTimeTimeZone |
Fecha, hora y zona horaria cuando comienza la cita. |
Nota:
Si el número máximo de clientes (maximumAttedeesCount) permitido en el servicio es mayor que 1:
- Asegúrese de que los clientes existen en la Calendar booking. Si no lo hacen, cree mediante la operación Crear bookingCustomer .
- Pase identificadores de cliente válidos al crear o actualizar la cita. Si el identificador 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: Cambio de la fecha del servicio
Solicitud
En el ejemplo siguiente se cambia la fecha del 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: Actualización de los clientes para una cita
En el ejemplo siguiente se actualiza la matriz de clientes para una cita de varios clientes. La propiedad customers es una matriz de reemplazo completa: incluye todos los clientes que deben formar parte de la cita, no solo los nuevos.
Nota:
- Cada objeto de la matriz customers debe incluir
@odata.type establecido #microsoft.graph.bookingCustomerInformationen . Si se omite esta propiedad, se producirá un error en la solicitud.
- Incluya los detalles del cliente, como el nombre, emailAddress y el teléfono para cada entrada. La API no rellena automáticamente estos campos del customerId ; si se omiten, estarán en blanco en la cita.
- El customerId debe hacer referencia a un bookingCustomer válido que exista en la Calendar booking. Si no existe, cree uno mediante la operación Crear bookingCustomer .
- El bookingService 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