POST https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.onmicrosoft.com/customQuestions
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.PostAsync(requestBody);
// THE CLI IS IN PREVIEW. NON-PRODUCTION USE ONLY
mgc solutions booking-businesses custom-questions create --booking-business-id {bookingBusiness-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()->post($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.post(body = request_body)