In the request body, supply only the values for properties that should be updated. Existing properties that are not included in the request body will maintain their previous values or be recalculated based on changes to other property values.
The following table specifies the properties that can be updated.
Property
Type
Description
answerInputType
answerInputType
The expected answer type. The possible values are: text, radioButton, unknownFutureValue. Optional.
answerOptions
String collection
List of possible answer values. Optional.
displayName
String
The question. Required.
Response
If successful, this method returns a 200 OK response code and an updated bookingCustomQuestion object in the response body.
PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.onmicrosoft.com/customQuestions/91f1ef26-ca00-451c-1c64-8f3560c80d3d
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.bookingCustomQuestion",
"displayName": "What is your age?",
"answerInputType": "text",
"answerOptions": []
}
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new BookingCustomQuestion
{
OdataType = "#microsoft.graph.bookingCustomQuestion",
DisplayName = "What is your age?",
AnswerInputType = AnswerInputType.Text,
AnswerOptions = new List<string>
{
},
};
var result = await graphClient.Solutions.BookingBusinesses["{bookingBusiness-id}"].CustomQuestions["{bookingCustomQuestion-id}"].PatchAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc solutions booking-businesses custom-questions patch --booking-business-id {bookingBusiness-id} --booking-custom-question-id {bookingCustomQuestion-id} --body '{\
"@odata.type": "#microsoft.graph.bookingCustomQuestion",\
"displayName": "What is your age?",\
"answerInputType": "text",\
"answerOptions": []\
}\
'
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BookingCustomQuestion();
$requestBody->setOdataType('#microsoft.graph.bookingCustomQuestion');
$requestBody->setDisplayName('What is your age?');
$requestBody->setAnswerInputType(new AnswerInputType('text'));
$requestBody->setAnswerOptions([ ]);
$result = $graphServiceClient->solutions()->bookingBusinesses()->byBookingBusinessId('bookingBusiness-id')->customQuestions()->byBookingCustomQuestionId('bookingCustomQuestion-id')->patch($requestBody)->wait();
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(request_adapter)
request_body = BookingCustomQuestion(
odata_type = "#microsoft.graph.bookingCustomQuestion",
display_name = "What is your age?",
answer_input_type = AnswerInputType.Text,
answer_options = [
]
)
result = await graph_client.solutions.booking_businesses.by_booking_businesse_id('bookingBusiness-id').custom_questions.by_custom_question_id('bookingCustomQuestion-id').patch(body = request_body)