{"id":9230,"date":"2021-12-21T08:00:05","date_gmt":"2021-12-21T16:00:05","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=9230"},"modified":"2022-10-13T21:08:23","modified_gmt":"2022-10-14T04:08:23","slug":"microsoft-graph-bookings-apis-now-available-on-the-v1-endpoint","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/microsoft-graph-bookings-apis-now-available-on-the-v1-endpoint\/","title":{"rendered":"Microsoft Graph Bookings APIs now available on the v1 endpoint"},"content":{"rendered":"<p>We are pleased to announce that the current set of Bookings APIs will be moving from beta to v1 endpoint. We will continue to provide the core functionalities we offered in beta along with the new features which were introduced recently. \u00a0The new features were highlighted in a recent blog, and it gives our partners the capabilities such as SMS notifications, online meeting, custom questions, and group appointments. Our partners will also receive all the necessary support which Microsoft provides for v1 APIs.<\/p>\n<h3>bookingBusiness<\/h3>\n<p>The bookingBusiness is the parent entity of the other resource types in Bookings. There are no changes to the functionalities under this resource type, except for the Microsoft Graph endpoint.<\/p>\n<p>The beta endpoint was\u00a0<a href=\"https:\/\/graph.microsoft.com\/beta\/bookingBusinesses\/\" target=\"_blank\" rel=\"noopener\"><code>https:\/\/graph.microsoft.com\/beta\/bookingBusinesses\/<\/code><\/a><\/p>\n<p>The new v1 endpoint is\u00a0<a href=\"https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\" target=\"_blank\" rel=\"noopener\"><code>https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses<\/code><\/a><\/p>\n<h3>bookingService<\/h3>\n<p>The endpoint of the bookingService resource type has changed as well. Here is an example to illustrate the new v1 endpoint:<\/p>\n<p><code>GET <a href=\"https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/services\" target=\"_blank\" rel=\"noopener\">https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/services<\/a><\/code><\/p>\n<h3>bookingStaffMember<\/h3>\n<p>We have also changed the endpoint for the bookingStaffMember resource type. Here is an example to illustrate the new v1 endpoint:<\/p>\n<p><code>GET <a href=\"https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/staffMembers\">https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/staffMembers<\/a><\/code><\/p>\n<h3>Attribute removed in v1 from bookingStaffMember<\/h3>\n<p>The following attribute is not available in the v1 endpoint. This was very specific to our web application and was removed as it wasn\u2019t relevant for API developers.<\/p>\n<ul>\n<li>colorIndex<\/li>\n<\/ul>\n<h3>bookingAppointment<\/h3>\n<p>The endpoint for this resource type has changed. Here is an example to illustrate the new v1 endpoint:<\/p>\n<pre style=\"margin-bottom: 12.0pt;\"><span class=\"hljs-attribute\"><span style=\"font-family: Consolas;\">GET <a href=\"https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/appointments\/AAMkADKnAAA=\" target=\"_blank\" rel=\"noopener\">https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/appointments\/AAMkADKnAAA=\r\n<\/a><\/span><\/span><\/pre>\n<h3>Changes in customer Information<\/h3>\n<p>The customer information was available at the root node of bookingAppointment resource type. Now it moves under an attribute \u201ccustomer\u201d which is a collection of bookingCustomerInformation.<\/p>\n<p>The difference can be seen in the two code snippets below.<\/p>\n<p><strong>Old structure of bookingAppointment<\/strong><\/p>\n<pre class=\"prettyprint\">Content-type: application\/json\r\n\r\n{\r\n    \"@odata.context\": \"https:\/\/graph.microsoft.com\/beta\/$metadata#bookingBusinesses('Contosolunchdelivery%40M365B489948.onmicrosoft.com')\/appointments\/$entity\",\r\n    \"id\": \"AAMkADKnAAA=\",\r\n    \"selfServiceAppointmentId\": \"00000000-0000-0000-0000-000000000000\",\r\n    \"customerId\": \"7ed53fa5-9ef2-4f2f-975b-27447440bc09\",\r\n    \"customerName\": \"Jordan Miller\",\r\n    \"customerEmailAddress\": \"jordanm@contoso.com\",\r\n    \"customerPhone\": \"213-555-0199\",\r\n    \"customerNotes\": null,\r\n    \"serviceId\": \"57da6774-a087-4d69-b0e6-6fb82c339976\",\r\n    \"serviceName\": \"Catered bento\",\r\n  ...\r\n  ...     \r\n  ...\r\n}<\/pre>\n<p><strong>New structure of bookingAppointment<\/strong><\/p>\n<pre class=\"prettyprint\">Content-type: application\/json\r\n\r\n{\r\n    \"@odata.context\": \"https:\/\/graph.microsoft.com\/beta\/$metadata#bookingBusinesses('Contosolunchdelivery%40M365B489948.onmicrosoft.com')\/appointments\/$entity\",\r\n    \"id\": \"AAMkADKnAAA=\",\r\n    \"selfServiceAppointmentId\": \"00000000-0000-0000-0000-000000000000\",\r\n    ...\r\n    ...\r\n    ...\r\n   \r\n    \"customers\": [\r\n        {\r\n            \"customerId\": \"7ed53fa5-9ef2-4f2f-975b-27447440bc09\",\r\n            \"customerName\": \"Jordan Miller\",\r\n            \"customerEmailAddress\": \"jordanm@contoso.com\",\r\n            \"customerPhone\": \"213-555-0199\",\r\n            \"customerNotes\": \"notes\",\r\n            \"customQuestionAnswers\": [\r\n                {\r\n                    \"questionId\": \"75fc2eaf-624f-40b2-a289-63e51a56fcf2\",\r\n                    \"question\": \"What's your favourite food\",\r\n                    \"answerInputType\": \"radioButton\",\r\n                    \"answerOptions\": [\r\n                        \"KFC\",\r\n                        \"McDonald's\",\r\n                        \"BurgerKing\"\r\n                    ],\r\n                    \"isRequired\": true,\r\n                    \"answer\": \"KFC\",\r\n                    \"selectedOptions\": [\"KFC\"]\r\n                }\r\n            ],\r\n            \"customerLocation\": {\r\n                \"displayName\": \"home\",\r\n                \"locationEmailAddress\": null,\r\n                \"locationUri\": \"\",\r\n                \"locationType\": null,\r\n                \"uniqueId\": null,\r\n                \"uniqueIdType\": null,\r\n                \"address\": {\r\n                    \"type\": \"home\",\r\n                    \"postOfficeBox\": \"\",\r\n                    \"street\": \"\",\r\n                    \"city\": \"\",\r\n                    \"state\": \"\",\r\n                    \"countryOrRegion\": \"\",\r\n                    \"postalCode\": \"\"\r\n                },\r\n                \"coordinates\": {\r\n                    \"altitude\": null,\r\n                    \"latitude\": null,\r\n                    \"longitude\": null,\r\n                    \"accuracy\": null,\r\n                    \"altitudeAccuracy\": null\r\n                }\r\n            }\r\n        }\r\n    ]\r\n    ...\r\n    ...\r\n}<\/pre>\n<p><strong>The new complex type <\/strong><\/p>\n<p>The complex type is called bookingCustomerInformation. The \u201ccustomers\u201d attribute within appointment is a collection of this type.<\/p>\n<table style=\"width: 77.2694%;\">\n<tbody>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>Attribute<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\"><strong>Complex Type<\/strong><\/td>\n<td style=\"width: 103.816%;\" width=\"208\"><strong>Description<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>Id<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\">bookingCustomerInformation<\/td>\n<td style=\"width: 103.816%;\" width=\"208\">The id of the customer<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>name<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\">bookingCustomerInformation<\/td>\n<td style=\"width: 103.816%;\" width=\"208\">The name of the customer<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>emailAddress<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\">bookingCustomerInformation<\/td>\n<td style=\"width: 103.816%;\" width=\"208\">The email address of the customer<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>phone<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\">bookingCustomerInformation<\/td>\n<td style=\"width: 103.816%;\" width=\"208\">The phone number of the customer<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>notes<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\">bookingCustomerInformation<\/td>\n<td style=\"width: 103.816%;\" width=\"208\">The notes of the customer<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>location<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\">bookingCustomerInformation<\/td>\n<td style=\"width: 103.816%;\" width=\"208\">The address of the customer. Location is of type physicalAddress. However only the \u201cother\u201d address type is supported.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.2273%;\" width=\"208\"><strong>timeZone<\/strong><\/td>\n<td style=\"width: 33.3863%;\" width=\"208\">bookingCustomerInformation<\/td>\n<td style=\"width: 103.816%;\" width=\"208\">The timeZone of the customer<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><\/h3>\n<h3>Attributes removed in v1 from bookingAppointment<\/h3>\n<p>Since we don\u2019t have payment or invoicing capabilities now, the following attributes won\u2019t be available in v1:<\/p>\n<ul>\n<li>invoiceAmount<\/li>\n<li>invoiceDate<\/li>\n<li>invoiceId<\/li>\n<li>invoiceStatus<\/li>\n<li>invoiceUrl<\/li>\n<\/ul>\n<h3>Attributes renamed in bookingAppointment<\/h3>\n<p>The following attributes have been renamed. The older attributes won\u2019t be available in v1.<\/p>\n<table style=\"width: 53.4317%;\">\n<tbody>\n<tr>\n<td style=\"width: 49.9205%;\" width=\"312\">start<\/td>\n<td style=\"width: 87.8728%;\" width=\"312\">Renamed to startDateTime<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 49.9205%;\" width=\"312\">end<\/td>\n<td style=\"width: 87.8728%;\" width=\"312\">Renamed to endDateTime<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><\/h3>\n<h3>bookingCustomer<\/h3>\n<p>The end point for this resource type will change as well. An example to illustrate the new end point for v1 is given below.<\/p>\n<p><code>GET <a href=\"https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/customers\" target=\"_blank\" rel=\"noopener\">https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingBusinesses\/Contosolunchdelivery@M365B489948.onmicrosoft.com\/customers<\/a><\/code><\/p>\n<h3>bookingCurrency<\/h3>\n<p>We have changed the end point for bookingCurrency. An example to illustrate the new end point for v1 is given below.<\/p>\n<p><code>GET <a href=\"https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingCurrencies\" target=\"_blank\" rel=\"noopener\">https:\/\/graph.microsoft.com\/v1.0\/solutions\/bookingCurrencies<\/a><\/code><\/p>\n<h3>Getting Started<\/h3>\n<p>We are really excited to launch the Bookings APIs on the v1 endpoint. Check out this<a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/resources\/booking-api-overview?view=graph-rest-1.0\"> link<\/a> to find resources that will help you get started. We would love to hear your feedback so that we can help fulfill your use cases and requirements.<\/p>\n<p>Happy coding!<\/p>\n<pre style=\"margin-bottom: 12.0pt;\"><code><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>We are pleased to announce that the current set of Bookings APIs will be available on the v1 endpoint. New features include capabilities such as SMS notifications, online meeting, custom questions, and group appointments.<\/p>\n","protected":false},"author":69077,"featured_media":25159,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[160,204],"class_list":["post-9230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-bookings-api","tag-customer-booking"],"acf":[],"blog_post_summary":"<p>We are pleased to announce that the current set of Bookings APIs will be available on the v1 endpoint. New features include capabilities such as SMS notifications, online meeting, custom questions, and group appointments.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/9230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69077"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=9230"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/9230\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=9230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=9230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=9230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}