Skip to content

Commit 628ac86

Browse files
authored
Merge pull request #9854 from dylanstetts/patch-12
Enhance booking appointment update documentation examples
2 parents b1803d1 + c82c0ff commit 628ac86

File tree

1 file changed

+57
-2
lines changed

1 file changed

+57
-2
lines changed

api-reference/v1.0/api/bookingappointment-update.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,15 @@ If successful, this method returns a `204 No Content` response code. It doesn't
8383

8484
## Examples
8585

86-
### Request
86+
### Example 1: Change the date of service
87+
88+
#### Request
8789

8890
The following example changes the date of service by a day.
8991

9092
<!-- {
9193
"blockType": "request",
94+
"name": "update_bookingappointment_date",
9295
"sampleKeys": ["AAMkADKnAAA=", "Contosolunchdelivery@contoso.com"]
9396
}-->
9497
```http
@@ -110,7 +113,59 @@ Content-type: application/json
110113
}
111114
```
112115

113-
### Response
116+
#### Response
117+
118+
The following example shows the response.
119+
<!-- {
120+
"blockType": "response"
121+
} -->
122+
```http
123+
HTTP/1.1 204 No Content
124+
```
125+
126+
### Example 2: Update the customers for an appointment
127+
128+
The following example updates the customers array for a multi-customer appointment. The **customers** property is a full replacement array — include all customers that should be part of the appointment, not just the new ones.
129+
130+
> [!NOTE]
131+
> - Each object in the **customers** array must include `@odata.type` set to `#microsoft.graph.bookingCustomerInformation`. Omitting this property causes the request to fail.
132+
> - Include customer details such as **name**, **emailAddress**, and **phone** for each entry. The API does not automatically populate these fields from the **customerId** — if omitted, they will be blank on the appointment.
133+
> - The **customerId** must reference a valid [bookingCustomer](../resources/bookingcustomer.md) that exists in the Booking Calendar. If it doesn't exist, create one using the [Create bookingCustomer](bookingbusiness-post-customers.md) operation.
134+
> - The associated [bookingService](../resources/bookingservice.md) must have **maximumAttendeesCount** greater than 1 to support multiple customers.
135+
136+
#### Request
137+
138+
<!-- {
139+
"blockType": "request",
140+
"name": "update_bookingappointment_customers",
141+
"sampleKeys": ["AAMkADKoAAA=", "Contosolunchdelivery@contoso.com"]
142+
}-->
143+
```http
144+
PATCH https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/Contosolunchdelivery@contoso.com/appointments/AAMkADKoAAA=
145+
Content-type: application/json
146+
147+
{
148+
"@odata.type":"#microsoft.graph.bookingAppointment",
149+
"customers": [
150+
{
151+
"@odata.type": "#microsoft.graph.bookingCustomerInformation",
152+
"customerId": "cd56bb19-c348-42c6-af5c-09818c87fb8c",
153+
"name": "John Doe",
154+
"emailAddress": "john.doe@example.com",
155+
"phone": "313-555-5555"
156+
},
157+
{
158+
"@odata.type": "#microsoft.graph.bookingCustomerInformation",
159+
"customerId": "72f148fa-9a86-4c59-b277-f5089d9ea0e7",
160+
"name": "Jane Smith",
161+
"emailAddress": "jane.smith@example.com",
162+
"phone": "248-555-5678"
163+
}
164+
]
165+
}
166+
```
167+
168+
#### Response
114169

115170
The following example shows the response.
116171
<!-- {

0 commit comments

Comments
 (0)