Page Introduction

Favorites namespace

This namespace page is optimized for frontend implementation with endpoint index, request/response examples, and code snippets.

  • Use auth and summary fields to configure your API client.
  • Use code snippets as starter references, not production-ready final code.
  • Validate critical mutations in interactive console before release.

CarOwner Namespace

Favorites

Namespace details with request/response examples and code snippets.

3Endpoint methods

Endpoint Quick Index

Detailed Endpoints

GET/api/co/categories/shops?id=123&include_inactive=string_value&include_counts=string_value&q=string_value

Endpoint operation.

Read-only list of workshop categories (ws_workshop_categories).

Auth: None (public endpoint).Source: CAROWNER-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/co/categories/shops?id=123&include_inactive=string_value&include_counts=string_value&q=string_value",
    headers: {
      "Content-Type": "application/json",
    },
    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/co/categories/shops?id=123&include_inactive=string_value&include_counts=string_value&q=string_value'\
  -H 'Accept: application/json'
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/co/categories/shops?id=123&include_inactive=string_value&include_counts=string_value&q=string_value", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
  },
});
const data = await response.json();
console.log(response.status, data);
DELETE/api/co/favorits

Endpoint operation.

Removes a workshop from the authenticated user's favorites (idempotent).

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

Request Example

{
  "org_nr": "999999999"
}

Response Example

{
  "data": {
    "message": "string_value"
  }
}
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: "delete",
    url: BASE_URL + "/api/co/favorits",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "org_nr": "999999999"
    },
    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 DELETE 'https://api.minbil.no/api/co/favorits'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"org_nr": "999999999"}'
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/co/favorits", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "org_nr": "999999999"
  }),
});
const data = await response.json();
console.log(response.status, data);
GET/api/co/favorits

Endpoint operation.

Returns all workshops marked as favorites by the authenticated user.

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

Request Example

{}

Response Example

{
  "data": {
    "total": 1,
    "items": [
      {}
    ]
  }
}
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/co/favorits",
    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/co/favorits'\
  -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/co/favorits", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);