MinBil Complete API Documentation - Core and Common Endpoints
Generated from live Swagger on 2026-02-16T10:23:22Z.
Core API
- Base path:
/api/core - Primary purpose: cross-domain records shared between workshop and car owner contexts.
Core Endpoints
Generated from live Swagger on 2026-02-16T10:23:22Z.
Scope
- Audience: Platform services
- API title: MinBil Core API
- API version: 1.0
- Base path:
/api/core - Total paths:
1 - Total operations:
1
Authentication
Bearer:Authorization: Bearer <token>APIKey:x-api-key: <api-key>(used on selected auth/bootstrap endpoints)
Response shape guidance
- Newer endpoints usually return
{ data, meta }for success and{ error: { ... } }for failures. - Some modules return RFC7807 (
type/title/status/code/message) responses. - Older endpoints may still return simple
{ error: '...' }payloads. - Client integrations must always branch by HTTP status first.
Endpoint index
- CoreVehicleServiceHistory (1 operations)
CoreVehicleServiceHistory
GET /vehicle-service-history/{registration_number}
Purpose: Endpoint operation.
Typical use cases:
- Show maintenance history and service records per vehicle.
- Generate exports and operational summaries.
Auth: Bearer token (Authorization: Bearer <token>)
Request parameters:
| Name | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
registration_number |
path |
string |
yes |
- | BT57225 |
Responses:
200: Success
{
"data": {},
"meta": {
"request_id": "f59ee325-0445-4bd0-9bf1-73edcd7da151",
"generated_at": "2026-02-12T10:00:00Z"
}
}
cURL example:
curl -X GET 'https://api.minbil.no/api/core/vehicle-service-history/BT57225'\
-H 'Accept: application/json'\
-H 'Authorization: Bearer <access-token>'
Error handling notes:
- Legacy endpoints may return either RFC7807
application/problem+json,{ "error": "..." }, or structured{ "error": { ... } }depending on module age. - Always branch on HTTP status first, then parse payload shape.
- Respect
401/403as auth/scope failures and do not retry blindly.
Common Endpoints
- These endpoints are mounted under both workshop and car owner APIs.
- Realtime config and presence semantics are shared patterns.
Workshop-common routes
PUT /api/ws/presenceGET /api/ws/realtime/config
CarOwner-common routes
PUT /api/co/presenceGET /api/co/realtime/config
Detailed Workshop-common endpoints
PUT /presence
Purpose: Endpoint operation.
Detailed behavior: Update user presence status. When going 'online', queued offline events are delivered.
Typical use cases:
- Track online presence in chat/realtime contexts.
Auth: Bearer token (Authorization: Bearer <token>)
Request parameters:
- No path/query/header parameters.
Request body:
- Schema:
PresenceRequest
{
"status": "online"
}
Responses:
200: Success- Schema:
PresenceResponse
- Schema:
{
"status": "string_value",
"queued_delivered": 1
}
cURL example:
curl -X PUT 'https://api.minbil.no/api/ws/presence'\
-H 'Accept: application/json'\
-H 'Authorization: Bearer <access-token>'\
-H 'Content-Type: application/json'\
-d '{"status": "online"}'
Error handling notes:
- Legacy endpoints may return either RFC7807
application/problem+json,{ "error": "..." }, or structured{ "error": { ... } }depending on module age. - Always branch on HTTP status first, then parse payload shape.
- Respect
401/403as auth/scope failures and do not retry blindly.
GET /realtime/config
Purpose: Endpoint operation.
Detailed behavior: Returns Supabase Realtime connection config and channel names for the authenticated user.
Typical use cases:
- Expose realtime configuration to connected clients.
Auth: Bearer token (Authorization: Bearer <token>)
Request parameters:
- No path/query/header parameters.
Responses:
200: Success- Schema:
RealtimeConfig
- Schema:
{
"supabase_url": "string_value",
"anon_key": "string_value",
"channels": {},
"enabled": true
}
cURL example:
curl -X GET 'https://api.minbil.no/api/ws/realtime/config'\
-H 'Accept: application/json'\
-H 'Authorization: Bearer <access-token>'
Error handling notes:
- Legacy endpoints may return either RFC7807
application/problem+json,{ "error": "..." }, or structured{ "error": { ... } }depending on module age. - Always branch on HTTP status first, then parse payload shape.
- Respect
401/403as auth/scope failures and do not retry blindly.
Detailed CarOwner-common endpoints
PUT /presence
Purpose: Endpoint operation.
Detailed behavior: Update user presence status. When going 'online', queued offline events are delivered.
Typical use cases:
- Track online presence in chat/realtime contexts.
Auth: Bearer token (Authorization: Bearer <token>)
Request parameters:
- No path/query/header parameters.
Request body:
- Schema:
PresenceRequest
{
"status": "online"
}
Responses:
200: Success- Schema:
PresenceResponse
- Schema:
{
"status": "string_value",
"queued_delivered": 1
}
cURL example:
curl -X PUT 'https://api.minbil.no/api/co/presence'\
-H 'Accept: application/json'\
-H 'Authorization: Bearer <access-token>'\
-H 'Content-Type: application/json'\
-d '{"status": "online"}'
Error handling notes:
- Legacy endpoints may return either RFC7807
application/problem+json,{ "error": "..." }, or structured{ "error": { ... } }depending on module age. - Always branch on HTTP status first, then parse payload shape.
- Respect
401/403as auth/scope failures and do not retry blindly.
GET /realtime/config
Purpose: Endpoint operation.
Detailed behavior: Returns Supabase Realtime connection config and channel names for the authenticated user.
Typical use cases:
- Expose realtime configuration to connected clients.
Auth: Bearer token (Authorization: Bearer <token>)
Request parameters:
- No path/query/header parameters.
Responses:
200: Success- Schema:
RealtimeConfig
- Schema:
{
"supabase_url": "string_value",
"anon_key": "string_value",
"channels": {},
"enabled": true
}
cURL example:
curl -X GET 'https://api.minbil.no/api/co/realtime/config'\
-H 'Accept: application/json'\
-H 'Authorization: Bearer <access-token>'
Error handling notes:
- Legacy endpoints may return either RFC7807
application/problem+json,{ "error": "..." }, or structured{ "error": { ... } }depending on module age. - Always branch on HTTP status first, then parse payload shape.
- Respect
401/403as auth/scope failures and do not retry blindly.
Operational behavior
GET /realtime/configis consumed by clients before opening realtime channels.PUT /presenceupdates user availability/online state.- Both should be treated as low-latency support endpoints and monitored for elevated error rates.
Health Endpoint
- Endpoint:
GET /healthz - Mounted on the Flask app root (outside
/api/*blueprints). - Purpose: lightweight readiness/liveness signal for local/dev/prod checks.
GET /healthz
Purpose: Health check for API service availability.
Auth: None (public endpoint).
Responses:
200: Service is healthy.
{
"status": "ok",
"time": "2026-02-16T10:00:00Z",
"client_ip": "127.0.0.1"
}
cURL example:
curl -X GET 'https://api.minbil.no/healthz' \
-H 'Accept: application/json'
Operational notes:
statusshould beokfor healthy instances.timeis UTC timestamp from server.client_ipreflectsX-Forwarded-Foror remote address.