/api/ws/servicesScope: Page-specific
UI usage: List alle tjenester
Response fields used: items[] med id, title, description, price, estimated_time, category_ids, images
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 Tjenestesiden (`/services`) lar verkstedet: - liste tjenester - opprette/redigere tjenester - slette tjenester - knytte tjenester til servicekategorier/workshop-kategorier
Source: API-DOC/page-api-mapping/05-tjenester.md
| Method | Path | Scope | UI usage | Test |
|---|---|---|---|---|
| GET | /api/ws/services | Page-specific | List alle tjenester | Try-It |
| GET | /api/ws/categories/services | Shared | Fetch servicekategorier | Try-It |
| GET | /api/co/categories/services | Shared fallback | Fallback ved ws-kategori-feil | Try-It |
| GET | /api/ws/categories | Shared | Fetch workshop-kategorier for gruppering i UI | Try-It |
| GET | /api/co/categories | Shared fallback | Fallback ved ws-kategori-feil | Try-It |
| POST | /api/ws/services | Page-specific | Create ny tjeneste | Try-It |
| PUT | /api/ws/services/:id | Page-specific | Update tjeneste | Try-It |
| DELETE | /api/ws/services/:id | Page-specific | Delete tjeneste | Try-It |
/api/ws/servicesScope: Page-specific
UI usage: List alle tjenester
Response fields used: items[] med id, title, description, price, estimated_time, category_ids, images
/api/ws/categories/servicesScope: Shared
UI usage: Fetch servicekategorier
Response fields used: id, name, workshop_category_id, level
/api/co/categories/servicesScope: Shared fallback
UI usage: Fallback ved ws-kategori-feil
Response fields used: servicekategorier
/api/ws/categoriesScope: Shared
UI usage: Fetch workshop-kategorier for gruppering i UI
Response fields used: workshop_category_id, workshop_category_name, workshop_category_code
/api/co/categoriesScope: Shared fallback
UI usage: Fallback ved ws-kategori-feil
Response fields used: workshop-kategorier
/api/ws/servicesScope: Page-specific
UI usage: Create ny tjeneste
Response fields used: opprettet service
/api/ws/services/:idScope: Page-specific
UI usage: Update tjeneste
Response fields used: oppdatert service
/api/ws/services/:idScope: Page-specific
UI usage: Delete tjeneste
Response fields used: message/OK
Interactive console below is filtered to endpoints mapped for this page contract.
Tjenestesiden (/services) lar verkstedet:
src/app/(private)/services/page.tsxgetServices, getServiceCategories, deleteServicesrc/features/services/AddServiceModal.tsxcreateService, updateServicegetServiceCategories, getWorkshopCategories| Scope | Method | Endpoint | UI usage | Request | Response fields used by frontend |
|---|---|---|---|---|---|
| Page-specific | GET |
/api/ws/services |
List alle tjenester | valgfri paging/filter | items[] med id, title, description, price, estimated_time, category_ids, images |
| Shared | GET |
/api/ws/categories/services |
Fetch servicekategorier | ingen | id, name, workshop_category_id, level |
| Shared fallback | GET |
/api/co/categories/services |
Fallback ved ws-kategori-feil | ingen | servicekategorier |
| Shared | GET |
/api/ws/categories |
Fetch workshop-kategorier for gruppering i UI | ingen | workshop_category_id, workshop_category_name, workshop_category_code |
| Shared fallback | GET |
/api/co/categories |
Fallback ved ws-kategori-feil | ingen | workshop-kategorier |
| Page-specific | POST |
/api/ws/services |
Create ny tjeneste | JSON eller multipart (title, description, price, estimated_time, category_ids, valgfri file/images) |
opprettet service |
| Page-specific | PUT |
/api/ws/services/{id} |
Update tjeneste | samme felter som create | oppdatert service |
| Page-specific | DELETE |
/api/ws/services/{id} |
Delete tjeneste | path id |
message/OK |
data.items.categories i serviceobjekt beriker frontend selv via category_ids + kategorioppslag.getServices + kategorioppslag.createService eller updateService.deleteService + reload av liste.