/api/ws/v2/bookingsScope: Shared
UI usage: Fetch bookingliste
Response fields used: items[] med booking-kjernefelt
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 Bestillingsområdet (`/booking` + `/booking/[id]`) dekker liste, filtrering, walk-in opprettelse, statusstyring og meldingsdialog.
Source: API-DOC/page-api-mapping/04-bestillinger.md
| Method | Path | Scope | UI usage | Test |
|---|---|---|---|---|
| GET | /api/ws/v2/bookings | Shared | Fetch bookingliste | Try-It |
| GET | /api/ws/bookings | Shared fallback (feature-flagged) | Legacy fallback ved migrering | Try-It |
| GET | /api/ws/v2/booking-statuses | Shared | Statusfilter/statusvalg | Try-It |
| GET | /api/ws/booking-statuses | Shared fallback (feature-flagged) | Legacy fallback | Try-It |
| GET | /api/ws/v2/bookings/:id | Page-specific | Bookingdetalj | Try-It |
| GET | /api/ws/v2/bookings/:id/valid-transitions | Page-specific | Tillatte overganger | Try-It |
| POST | /api/ws/v2/bookings/status-transitions | Page-specific (kanonisk write) | Bekreft/avbestill/fullfør/reschedule | Try-It |
| POST | /api/ws/v2/bookings/:id/messages | Page-specific (kanonisk write) | Send melding i bookingtråd | Try-It |
| POST | /api/ws/bookings/status | Page-specific fallback (flaggstyrt) | Legacy fallback for status | Try-It |
| POST | /api/ws/bookings/message/:booking_id | Page-specific fallback (flaggstyrt) | Legacy fallback for melding | Try-It |
| POST | /api/ws/bookings | Page-specific | Create walk-in booking | Try-It |
| GET | /api/ws/services | Shared | Services til walk-in dropdown | Try-It |
/api/ws/v2/bookingsScope: Shared
UI usage: Fetch bookingliste
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/booking-statusesScope: Shared
UI usage: Statusfilter/statusvalg
Response fields used: statuses[].code, label, allowed_transitions, color, icon
/api/ws/booking-statusesScope: Shared fallback (feature-flagged)
UI usage: Legacy fallback
Response fields used: legacy statusobjekter
/api/ws/v2/bookings/:idScope: Page-specific
UI usage: Bookingdetalj
Response fields used: booking, messages, timeline, group
/api/ws/v2/bookings/:id/valid-transitionsScope: Page-specific
UI usage: Tillatte overganger
Response fields used: current_status, allowed_transitions[]
/api/ws/v2/bookings/status-transitionsScope: Page-specific (kanonisk write)
UI usage: Bekreft/avbestill/fullfør/reschedule
Response fields used: updated[], failed[], totals
/api/ws/v2/bookings/:id/messagesScope: Page-specific (kanonisk write)
UI usage: Send melding i bookingtråd
Response fields used: booking_id, message
/api/ws/bookings/statusScope: Page-specific fallback (flaggstyrt)
UI usage: Legacy fallback for status
Response fields used: oppdateringsresultat
/api/ws/bookings/message/:booking_idScope: Page-specific fallback (flaggstyrt)
UI usage: Legacy fallback for melding
Response fields used: melding/OK
/api/ws/bookingsScope: Page-specific
UI usage: Create walk-in booking
Response fields used: opprettet booking
/api/ws/servicesScope: Shared
UI usage: Services til walk-in dropdown
Response fields used: items[] med id, title, price
Interactive console below is filtered to endpoints mapped for this page contract.
Bestillingsområdet (/booking + /booking/[id]) dekker liste, filtrering, walk-in opprettelse, statusstyring og meldingsdialog.
src/features/bookings/BookingTable.tsxsrc/lib/hooks/useBookings.tssrc/features/bookings/BookingDetails.tsxsrc/features/bookings/CreateWalkInBookingModal.tsx| Scope | Method | Endpoint | UI usage | Request | Response fields used by frontend |
|---|---|---|---|---|---|
| Shared | GET |
/api/ws/v2/bookings |
Fetch bookingliste | limit, cursor, status, from, to, q, sort, format |
items[] med booking-kjernefelt |
| Shared fallback (feature-flagged) | GET |
/api/ws/bookings |
Legacy fallback ved migrering | legacy query params | legacy booking list |
| Shared | GET |
/api/ws/v2/booking-statuses |
Statusfilter/statusvalg | ingen | statuses[].code, label, allowed_transitions, color, icon |
| Shared fallback (feature-flagged) | GET |
/api/ws/booking-statuses |
Legacy fallback | ingen | legacy statusobjekter |
| Page-specific | GET |
/api/ws/v2/bookings/{id} |
Bookingdetalj | include=services,messages,timeline,group |
booking, messages, timeline, group |
| Page-specific | GET |
/api/ws/v2/bookings/{id}/valid-transitions |
Tillatte overganger | path id |
current_status, allowed_transitions[] |
| Page-specific (kanonisk write) | POST |
/api/ws/v2/bookings/status-transitions |
Bekreft/avbestill/fullfør/reschedule | booking_ids, target_status, apply_scope, reason, scheduled_at, metadata |
updated[], failed[], totals |
| Page-specific (kanonisk write) | POST |
/api/ws/v2/bookings/{id}/messages |
Send melding i bookingtråd | { content/message, attachments, to_carowner } |
booking_id, message |
| Page-specific fallback (flaggstyrt) | POST |
/api/ws/bookings/status |
Legacy fallback for status | legacy body | oppdateringsresultat |
| Page-specific fallback (flaggstyrt) | POST |
/api/ws/bookings/message/{booking_id} |
Legacy fallback for melding | { message, to_carowner, attachments } |
melding/OK |
| Page-specific | POST |
/api/ws/bookings |
Create walk-in booking | service_id, start_at, walk_in, kunde-/kjøretøyfelt, notes |
opprettet booking |
| Shared | GET |
/api/ws/services |
Services til walk-in dropdown | page_size=200, sort=title |
items[] med id, title, price |
/v2/bookings*)./v2/bookings/status-transitions + /v2/bookings/{id}/messages).