MS Graph Integration
Version: 1.0.0 | Status: DRAFT | Updated: 2026-04-22
Endpunkte
| Methode | Endpunkt | Zweck |
|---|---|---|
GET |
/solutions/bookingBusinesses/{id}/calendarView |
Gebuchte Zeiträume |
POST |
/solutions/bookingBusinesses/{id}/appointments |
Neue Buchung |
PATCH |
/solutions/bookingBusinesses/{id}/appointments/{apptId} |
Zahlungsstatus |
Authentifizierung
// Scope erforderlich:
// BookingsAppointment.ReadWrite.All
// Calendars.ReadWrite
const token = await getAccessToken(); // MSAL PublicClientApplication
Mock → Produktion
// src/lib/api/msGraph.ts
const USE_MOCK = true; // ← false für Produktion
// Mock: Liest JSON-Dateien aus /src/lib/mock/
// Prod: Echter Fetch mit Bearer Token
Request-Shapes
GET calendarView Response
{
"value": [
{
"id": "mock-001",
"startDateTime": { "dateTime": "2026-07-14T14:00:00", "timeZone": "UTC" },
"endDateTime": { "dateTime": "2026-07-21T10:00:00", "timeZone": "UTC" },
"status": "booked"
}
]
}
POST /appointments Body
{
"serviceId": "hausboot-grasten",
"start": { "dateTime": "2026-08-01T14:00:00", "timeZone": "UTC" },
"end": { "dateTime": "2026-08-08T10:00:00", "timeZone": "UTC" },
"customers": [{ "name": "Max Mustermann", "emailAddress": "max@example.com" }],
"price": 1200,
"priceType": "fixed"
}