Microsoft Booking Appointment Graph API -Only Post Request Not working

257 Views Asked by At

when I trying to create Microsoft Booking Appointment through Graph API Only Post Request Not working . GET , PATCH , DELETE Reuqest are working fine through postman

same post request is working find on graph explorer platform . but not on posmant with my auth token

my post API

https://graph.microsoft.com/v1.0/solutions/bookingBusinesses/XXXXXXXXXXXXXXX.com/appointments

and body (took example from here) excluded optional properties like servicename and customers

     {
    "@odata.type": "#microsoft.graph.bookingAppointment",
    "customerTimeZone": "America/Chicago",
    "smsNotificationsEnabled": false,
    "endDateTime": {
        "@odata.type": "#microsoft.graph.dateTimeTimeZone",
        "dateTime": "2023-01-02T14:30:00.0000000",
        "timeZone": "UTC"
    },
    "isLocationOnline": true,
    "optOutOfCustomerEmail": false,
    "anonymousJoinWebUrl": null,
    "postBuffer": "PT10M",
    "preBuffer": "PT5M",
    "price": 10,
    "[email protected]": "#microsoft.graph.bookingPriceType",
    "priceType": "fixedPrice",
    "[email protected]": "#Collection(microsoft.graph.bookingReminder)",
    "reminders": [
        {
            "@odata.type": "#microsoft.graph.bookingReminder",
            "message": "This service is tomorrow",
            "offset": "P1D",
            "[email protected]": "#microsoft.graph.bookingReminderRecipients",
            "recipients": "allAttendees"
        },
        {
            "@odata.type": "#microsoft.graph.bookingReminder",
            "message": "Please be available to enjoy your lunch service.",
            "offset": "PT1H",
            "[email protected]": "#microsoft.graph.bookingReminderRecipients",
            "recipients": "customer"
        },
        {
            "@odata.type": "#microsoft.graph.bookingReminder",
            "message": "Please check traffic for next cater.",
            "offset": "PT2H",
            "[email protected]": "#microsoft.graph.bookingReminderRecipients",
            "recipients": "staff"
        }
    ],
    "serviceId": "XXXXXXXXXXXXXXXXXXXXX",
    "serviceLocation": {
        "@odata.type": "#microsoft.graph.location",
        "address": {
            "@odata.type": "#microsoft.graph.physicalAddress",
            "city": "Buffalo",
            "countryOrRegion": "USA",
            "postalCode": "98052",
            "postOfficeBox": null,
            "state": "NY",
            "street": "123 First Avenue",
            "[email protected]": "#microsoft.graph.physicalAddressType",
            "type": null
        },
        "coordinates": null,
        "displayName": "Customer location",
        "locationEmailAddress": null,
        "[email protected]": "#microsoft.graph.locationType",
        "locationType": null,
        "locationUri": null,
        "uniqueId": null,
        "[email protected]": "#microsoft.graph.locationUniqueIdType",
        "uniqueIdType": null
    },
    "serviceNotes": "Customer requires punctual service.",
    "startDateTime": {
        "@odata.type": "#microsoft.graph.dateTimeTimeZone",
        "dateTime": "2023-01-02T14:00:00.0000000",
        "timeZone": "UTC"
    },
    "maximumAttendeesCount": 1,
    "filledAttendeesCount": 1
}
0

There are 0 best solutions below