/api/ws/v2/dashboardScope: Page-specific
UI usage: KPI + grafer
Response fields used: kpis.*, status_breakdown, bookings_series
Overview
Docs HomeWorkshop StartCarOwner StartWorkshop Onboarding
Get Started01 API key setup02 API key in requests03 Auth testing04 Bearer token callsCollections
Platform API Collection (Soft Launch)Soft Launch All EndpointsSoft Launch InteractiveFundamentalsCanonical SpecAPI Reference
API RootWorkshop IndexWorkshop InteractiveWorkshop Auth InteractiveAll Workshop EndpointsCarOwner IndexCarOwner InteractiveCarOwner Auth InteractiveAll CarOwner EndpointsCore/Common IndexCore InteractiveAll Core EndpointsWorkshop Namespaces
AuthUserProfileWorkshopCoreWorkshopOwnershipRequestContactsAddressesOpeningHoursServicesManagersCertificatesSocialMediaBookingsRatingsServiceHistoryEmailVerificationNotificationsMessagesBrregLookupBookingStatusesCategoriesReportsServiceRecordsUsersAccessV2RealtimePresenceSupportCarOwner Namespaces
AuthBookingBookingStatusCarBrandsCarOwnerPaymentsCarOwnerServiceRecordsCategoriesFavoritesMarketplaceMarketplaceCompatMarketplaceFiltersMessagesNotificationsPresenceProfileRatingsRealtimeServiceLogSettingsVehiclesCore Namespaces
CoreVehicleServiceHistoryWorkshopCommonCarOwnerCommonPage Introduction
This contract page maps concrete frontend page behavior to API calls, payloads, and response fields.
Platform Page Contract
## Page purpose Dashboardet (`/dashboard`) shows KPI-er, bookingtrender, status distribution, latest bookings og global notification status.
Source: API-DOC/page-api-mapping/02-kontrollpanel.md
| Method | Path | Scope | UI usage | Test |
|---|---|---|---|---|
| GET | /api/ws/v2/dashboard | Page-specific | KPI + grafer | Try-It |
| GET | /api/ws/v2/bookings | Shared | Siste bestillinger-tabell | Try-It |
| GET | /api/ws/bookings | Shared fallback (feature-flagged) | Legacy fallback ved migrering | Try-It |
| GET | /api/ws/v2/notifications/feed | Global | Bell count + dropdown | Try-It |
| POST | /api/ws/v2/notifications/mark-read | Global | Marker varsler som lest | Try-It |
| DELETE | /api/ws/v2/notifications/:id | Global | Slett notifikasjon | Try-It |
| GET | /api/ws/profile | Global | Sidebar-brukerinfo | Try-It |
| POST | /api/ws/auth/logout | Global | Logg ut | Try-It |
| POST | /api/ws/auth/sign-out | Global alias (deprecated) | Temporary compatibility | Try-It |
| GET | /api/ws/shop | Global (guard) | Ownership-guard når session mangler verifiedOwner | Try-It |
/api/ws/v2/dashboardScope: Page-specific
UI usage: KPI + grafer
Response fields used: kpis.*, status_breakdown, bookings_series
/api/ws/v2/bookingsScope: Shared
UI usage: Siste bestillinger-tabell
Response fields used: items[] med booking-kjernefelt
/api/ws/bookingsScope: Shared fallback (feature-flagged)
UI usage: Legacy fallback ved migrering
Response fields used: legacy booking list
/api/ws/v2/notifications/feedScope: Global
UI usage: Bell count + dropdown
Response fields used: items[], unread_count, page_info
/api/ws/v2/notifications/mark-readScope: Global
UI usage: Marker varsler som lest
Response fields used: updated, is_read, all
/api/ws/v2/notifications/:idScope: Global
UI usage: Slett notifikasjon
Response fields used: message
/api/ws/profileScope: Global
UI usage: Sidebar-brukerinfo
Response fields used: display_name, email, profile_image
/api/ws/auth/logoutScope: Global
UI usage: Logg ut
Response fields used: logout-status
/api/ws/auth/sign-outScope: Global alias (deprecated)
UI usage: Temporary compatibility
Response fields used: logout-status
/api/ws/shopScope: Global (guard)
UI usage: Ownership-guard når session mangler verifiedOwner
Response fields used: workshop-data brukt til tilgangsvurdering
Interactive console below is filtered to endpoints mapped for this page contract.
Dashboardet (/dashboard) shows KPI-er, bookingtrender, status distribution, latest bookings og global notification status.
src/app/(private)/dashboard/page.tsxgetDashboardData(...)getBookings(..., { limit: 5, sort: '-created_at' })src/features/notifications/NotificationBell.tsxsrc/features/notifications/NotificationDropdown.tsxsrc/components/layout/Sidebar.tsx| Scope | Method | Endpoint | UI usage | Request | Response fields used by frontend |
|---|---|---|---|---|---|
| Page-specific | GET |
/api/ws/v2/dashboard |
KPI + grafer | tz, ev. from, to |
kpis.*, status_breakdown, bookings_series |
| Shared | GET |
/api/ws/v2/bookings |
Siste bestillinger-tabell | limit=5, sort=-created_at |
items[] med booking-kjernefelt |
| Shared fallback (feature-flagged) | GET |
/api/ws/bookings |
Legacy fallback ved migrering | legacy query params | legacy booking list |
| Global | GET |
/api/ws/v2/notifications/feed |
Bell count + dropdown | limit=5, filter=all |
items[], unread_count, page_info |
| Global | POST |
/api/ws/v2/notifications/mark-read |
Marker varsler som lest | { ids } eller { all: true } |
updated, is_read, all |
| Global | DELETE |
/api/ws/v2/notifications/{id} |
Slett notifikasjon | path id |
message |
| Global | GET |
/api/ws/profile |
Sidebar-brukerinfo | Bearer-token | display_name, email, profile_image |
| Global | POST |
/api/ws/auth/logout |
Logg ut | tom body | logout-status |
| Global alias (deprecated) | POST |
/api/ws/auth/sign-out |
Temporary compatibility | tom body | logout-status |
| Global (guard) | GET |
/api/ws/shop?full=true |
Ownership-guard når session mangler verifiedOwner |
full=true |
workshop-data brukt til tilgangsvurdering |
unread_count konsistent etter handlinger./auth/logout.