Page Introduction

Ratings 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

Ratings

Namespace details with request/response examples and code snippets.

3Endpoint methods

Endpoint Quick Index

Detailed Endpoints

GET/api/co/profile/check-username?username=string_value

Endpoint operation.

Checks whether a username is available for the authenticated user. Rules - 3–30 chars - Letters, numbers, `.`, `_`, `-`

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

Request Example

{}

Response Example

{
  "username": "string_value",
  "available": true,
  "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: "get",
    url: BASE_URL + "/api/co/profile/check-username?username=string_value",
    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/profile/check-username?username=string_value'\
  -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/profile/check-username?username=string_value", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
GET/api/co/rating

Endpoint operation.

Returns all ratings submitted by the authenticated car owner.

Auth: None (public endpoint).Source: CAROWNER-API-COMPLETE.md

Request Example

{}

Response Example

{
  "total": 1,
  "items": [
    {
      "booking_id": 1,
      "workshop_org_nr": "921460929",
      "workshop_name": "string_value",
      "service_id": 1,
      "service_title": "string_value",
      "registration_number": "BT57225",
      "status": "string_value",
      "service_start_time": "2026-02-12T10:00:00Z",
      "service_estimated_end_time": "2026-02-12T10:00:00Z",
      "service_actual_end_time": "2026-02-12T10:00:00Z",
      "service_rating": 499.0,
      "service_rating_message": "string_value",
      "private_service_rating": true,
      "rated_at": "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: "get",
    url: BASE_URL + "/api/co/rating",
    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/rating'\
  -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/rating", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
  },
});
const data = await response.json();
console.log(response.status, data);
POST/api/co/rating/rate/123

Endpoint operation.

Alias endpoint for submitting a booking rating.

Auth: None (public endpoint).Source: CAROWNER-API-COMPLETE.md

Request Example

{
  "service_rating": 499.0,
  "service_rating_message": "string_value",
  "private_service_rating": true
}

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: "post",
    url: BASE_URL + "/api/co/rating/rate/123",
    headers: {
      "Content-Type": "application/json",
    },
    data: {
        "service_rating": 499,
        "service_rating_message": "string_value",
        "private_service_rating": true
    },
    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 POST 'https://api.minbil.no/api/co/rating/rate/123'\
  -H 'Accept: application/json'\
  -H 'Content-Type: application/json'\
  -d '{"service_rating": 499.0, "service_rating_message": "string_value", "private_service_rating": true}'
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/rating/rate/123", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "service_rating": 499,
    "service_rating_message": "string_value",
    "private_service_rating": true
  }),
});
const data = await response.json();
console.log(response.status, data);