Page Introduction

Vehicles 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

Vehicles

Namespace details with request/response examples and code snippets.

7Endpoint methods

Endpoint Quick Index

Detailed Endpoints

PUT/api/co/settings/notifications

Partial update of preferences

Partially updates notification preferences. Provide only the events you want to change. Example { "booking.accepted": { "email": true, "push": false }, "message.new": { "push": true } } Body is an object with the shape: { "booking.accepted": {"email": true, "push": false}, "message.new": {"push": true} } Unknown events or channels are rejected.

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

Request Example

{
  "booking.requested": {
    "email": true,
    "push": true
  },
  "booking.accepted": {
    "email": true,
    "push": true
  },
  "booking.declined": {
    "email": true,
    "push": true
  },
  "booking.updated": {
    "email": true,
    "push": true
  },
  "booking.completed": {
    "email": true,
    "push": true
  },
  "message.new": {
    "email": true,
    "push": true
  },
  "rating.reminder": {
    "email": true,
    "push": true
  }
}

Response Example

{
  "preferences": {
    "booking.requested": {},
    "booking.accepted": {},
    "booking.declined": {},
    "booking.updated": {},
    "booking.completed": {},
    "message.new": {},
    "rating.reminder": {}
  }
}
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/co/settings/notifications",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "booking.requested": {
            "email": true,
            "push": true
        },
        "booking.accepted": {
            "email": true,
            "push": true
        },
        "booking.declined": {
            "email": true,
            "push": true
        },
        "booking.updated": {
            "email": true,
            "push": true
        },
        "booking.completed": {
            "email": true,
            "push": true
        },
        "message.new": {
            "email": true,
            "push": true
        },
        "rating.reminder": {
            "email": true,
            "push": 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 PUT 'https://api.minbil.no/api/co/settings/notifications'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"booking.requested": {"email": true, "push": true}, "booking.accepted": {"email": true, "push": true}, "booking.declined": {"email": true, "push": true}, "booking.updated": {"email": true, "push": true}, "booking.completed": {"email": true, "push": true}, "message.new": {"email": true, "push": true}, "rating.reminder": {"email": true, "push": 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/settings/notifications", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "booking.requested": {
      "email": true,
      "push": true
    },
    "booking.accepted": {
      "email": true,
      "push": true
    },
    "booking.declined": {
      "email": true,
      "push": true
    },
    "booking.updated": {
      "email": true,
      "push": true
    },
    "booking.completed": {
      "email": true,
      "push": true
    },
    "message.new": {
      "email": true,
      "push": true
    },
    "rating.reminder": {
      "email": true,
      "push": true
    }
  }),
});
const data = await response.json();
console.log(response.status, data);
DELETE/api/co/vehicles?registration_number=BT57225&reg=BT57225

Unlink a vehicle from the authenticated user (does not delete the vehicle)

Unlinks a vehicle from the authenticated user (does not delete the vehicle record). Notes - If the primary vehicle is removed and others remain, the newest updated vehicle becomes primary. Request: DELETE /api/co/vehicles?reg=BT57225 (or ?registration_number=BT57225) If the primary vehicle is removed and others remain, the newest updated vehicle becomes primary.

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: "delete",
    url: BASE_URL + "/api/co/vehicles?registration_number=BT57225&reg=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 DELETE 'https://api.minbil.no/api/co/vehicles?registration_number=BT57225&reg=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/co/vehicles?registration_number=BT57225&reg=BT57225", {
  method: "DELETE",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
GET/api/co/vehicles?registration_number=BT57225&reg=BT57225

Fetch vehicles linked to the authenticated user

Returns vehicles linked to the authenticated user. Modes - Without params: returns a list of vehicles. - With `registration_number` or `reg`: returns full details for that vehicle. - Without params: returns a list of vehicles. - With ?registration_number=<REG> (or ?reg=<REG>): returns full details for that vehicle.

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/vehicles?registration_number=BT57225&reg=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/co/vehicles?registration_number=BT57225&reg=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/co/vehicles?registration_number=BT57225&reg=BT57225", {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
POST/api/co/vehicles

Create a vehicle (from Vegvesen) if missing and link it to the authenticated user

Creates a vehicle from Vegvesen data if missing and links it to the authenticated user. Idempotent: returns `200` if already linked. Notes - Accepts JSON or multipart/form-data. - Use `file` or `image` to upload a vehicle photo. Idempotent: returns 200 if already linked.

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

Request Example

{
  "registration_number": "BT57225",
  "nickname": "string_value",
  "image": "string_value"
}

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/vehicles",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "registration_number": "BT57225",
        "nickname": "string_value",
        "image": "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/vehicles'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"registration_number": "BT57225", "nickname": "string_value", "image": "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/vehicles", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "registration_number": "BT57225",
    "nickname": "string_value",
    "image": "string_value"
  }),
});
const data = await response.json();
console.log(response.status, data);
POST/api/co/vehicles/refresh/BT57225

Endpoint operation.

Refreshes stored vehicle data from Vegvesen for a linked vehicle. Notes - Vehicle data is fetched from an external source and may include Norwegian text.

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: "post",
    url: BASE_URL + "/api/co/vehicles/refresh/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 POST 'https://api.minbil.no/api/co/vehicles/refresh/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/co/vehicles/refresh/BT57225", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
});
const data = await response.json();
console.log(response.status, data);
POST/api/co/vehicles/set-primary

Endpoint operation.

Sets the primary vehicle for the authenticated user.

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

Request Example

{
  "registration_number": "BT57225"
}

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/vehicles/set-primary",
    headers: {
      "Content-Type": "application/json",
      Authorization: "Bearer " + ACCESS_TOKEN,
    },
    data: {
        "registration_number": "BT57225"
    },
    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/vehicles/set-primary'\
  -H 'Accept: application/json'\
  -H 'Authorization: Bearer <access-token>'\
  -H 'Content-Type: application/json'\
  -d '{"registration_number": "BT57225"}'
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/vehicles/set-primary", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer " + ACCESS_TOKEN,
  },
  body: JSON.stringify({
    "registration_number": "BT57225"
  }),
});
const data = await response.json();
console.log(response.status, data);
PUT/api/co/vehicles/BT57225

Endpoint operation.

Updates nickname or image for a linked vehicle. Notes - Accepts JSON or multipart/form-data. - Use `file` or `image` to upload a new vehicle image.

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

Request Example

{
  "nickname": "string_value",
  "image": "string_value"
}

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