Page Introduction

Notifications 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

Notifications

Namespace details with request/response examples and code snippets.

6Endpoint methods

Endpoint Quick Index

Detailed Endpoints

POST/api/co/messages/123/messages/read-up-to

Endpoint operation.

Marks workshop→car owner messages as read up to and including the given message ID. Notes - Optional `last_read_at` applies to JSON thread messages.

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

Request Example

{
  "last_read_id": 1,
  "last_read_at": "string_value"
}

Response Example

{
  "updated": 1,
  "json_updated": 1,
  "unread_count": 1,
  "read_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: "post",
    url: BASE_URL + "/api/co/messages/123/messages/read-up-to",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "last_read_id": 1,
        "last_read_at": "string_value"
    },
    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/messages/123/messages/read-up-to'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"last_read_id": 1, "last_read_at": "string_value"}'
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/messages/123/messages/read-up-to", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "last_read_id": 1,
    "last_read_at": "string_value"
  }),
});
const data = await response.json();
console.log(response.status, data);
GET/api/co/notifications?status=string_value&type=string_value&since=string_value&page=string_value

Endpoint operation.

Lists notifications for the authenticated car owner. Sorted newest first.

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

Request Example

{}

Response Example

{
  "data": [
    {
      "id": 1,
      "type": "string_value",
      "title": "string_value",
      "body": "string_value",
      "data": {},
      "is_read": true,
      "created_at": "string_value",
      "read_at": "string_value"
    }
  ],
  "meta": {
    "page": 1,
    "page_size": 1,
    "total": 1,
    "total_pages": 1,
    "has_next": true,
    "has_prev": true,
    "unread_total": 1
  },
  "links": {
    "self": "string_value",
    "first": "string_value",
    "prev": "string_value",
    "next": "string_value",
    "last": "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/notifications?status=string_value&type=string_value&since=string_value&page=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/notifications?status=string_value&type=string_value&since=string_value&page=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/notifications?status=string_value&type=string_value&since=string_value&page=string_value", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
POST/api/co/notifications/mark-read

Endpoint operation.

Marks specified notifications as read. Best‑effort: also marks linked messages as read when applicable.

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

Request Example

{
  "ids": [
    1
  ]
}

Response Example

{
  "updated": 1,
  "messages_marked": 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: "post",
    url: BASE_URL + "/api/co/notifications/mark-read",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "ids": [
            1
        ]
    },
    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/notifications/mark-read'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"ids": [1]}'
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/notifications/mark-read", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "ids": [
      1
    ]
  }),
});
const data = await response.json();
console.log(response.status, data);
POST/api/co/notifications/read-all

Endpoint operation.

Marks all notifications as read for the authenticated car owner.

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

Request Example

{}

Response Example

{
  "updated": 1,
  "messages_marked": 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: "post",
    url: BASE_URL + "/api/co/notifications/read-all",
    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 POST 'https://api.minbil.no/api/co/notifications/read-all'\
  -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/notifications/read-all", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
GET/api/co/notifications/unread-count

Endpoint operation.

Returns the number of unread notifications for the authenticated car owner.

Auth: Bearer token (`Authorization: Bearer <token>`)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/notifications/unread-count",
    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/notifications/unread-count'\
  -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/notifications/unread-count", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
GET/api/co/notifications/1

Endpoint operation.

Fetches a single notification by ID.

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

Request Example

{}

Response Example

{
  "id": 1,
  "type": "string_value",
  "title": "string_value",
  "body": "string_value",
  "data": {},
  "is_read": true,
  "created_at": "string_value",
  "read_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/notifications/1",
    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/notifications/1'\
  -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/notifications/1", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);