Page Introduction

WorkshopCommon namespace

This namespace page documents shared/core contracts used across domains, with examples for direct frontend and service integration.

  • Review auth and method details before service integration.
  • Use endpoint cards for request/response contract checks.
  • Validate behavior against selected runtime environment.

Core/Common Namespace

WorkshopCommon

Namespace details with request/response examples and code snippets.

2Endpoint methods

Endpoint Quick Index

Detailed Endpoints

GET/api/core/vehicle-service-history/BT57225

Endpoint operation.

Auth: Bearer token (`Authorization: Bearer <token>`)Source: CORE-COMMON-API-COMPLETE.md

Request Example

{}

Response Example

{
  "data": {},
  "meta": {
    "request_id": "f59ee325-0445-4bd0-9bf1-73edcd7da151",
    "generated_at": "2026-02-12T10:00:00Z"
  }
}
Node.js Axios example
import axios from "axios";

const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";

async function run() {
  const response = await axios({
    method: "get",
    url: BASE_URL + "/api/core/vehicle-service-history/BT57225",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    timeout: 20000,
  });
  console.log(response.status, response.data);
}

run().catch((error) => {
  console.error(error.response?.status, error.response?.data ?? error.message);
});
cURL example
curl -X GET 'https://api.minbil.no/api/core/vehicle-service-history/BT57225'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'
Fetch example
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";

const response = await fetch(BASE_URL + "/api/core/vehicle-service-history/BT57225", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
PUT/api/ws/presence

Endpoint operation.

Update user presence status. When going 'online', queued offline events are delivered.

Auth: Bearer token (`Authorization: Bearer <token>`)Source: CORE-COMMON-API-COMPLETE.md

Request Example

{
  "status": "online"
}

Response Example

{
  "status": "string_value",
  "queued_delivered": 1
}
Node.js Axios example
import axios from "axios";

const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";

async function run() {
  const response = await axios({
    method: "put",
    url: BASE_URL + "/api/ws/presence",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "status": "online"
    },
    timeout: 20000,
  });
  console.log(response.status, response.data);
}

run().catch((error) => {
  console.error(error.response?.status, error.response?.data ?? error.message);
});
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"}'
Fetch example
const BASE_URL = process.env.MINBIL_API_BASE_URL ?? "http://localhost:5000";
const API_KEY = process.env.MINBIL_API_KEY ?? "YOUR_API_KEY";
const ACCESS_TOKEN = process.env.MINBIL_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";

const response = await fetch(BASE_URL + "/api/ws/presence", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "status": "online"
  }),
});
const data = await response.json();
console.log(response.status, data);