Get workshop data
Returns workshop data for the authenticated owner. Views - Default (compact): basic workshop data and category names. - Full: pass ?full=true to include nested resources (address, contacts, services, ratings, etc.). Response shap...
Auth: BearerSource: API-DOC/workshop-rules/workshopcore.md
Request Example
This endpoint does not use a JSON body. Send path/query parameters and required headers.
Response Example
{
"data": {
"id": 123
}
}
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_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
async function run() {
const response = await axios({
method: "get",
url: `${BASE_URL}/api/ws/shop`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
params: {
"full": true
},
timeout: 20000,
});
console.log(response.data);
}
run().catch((error) => {
console.error(error.response?.data ?? error.message);
});
cURL example
BASE_URL="${MINBIL_API_BASE_URL:-http://localhost:5000}"
API_KEY="${MINBIL_API_KEY:-YOUR_API_KEY}"
ACCESS_TOKEN="${MINBIL_WS_ACCESS_TOKEN:-YOUR_BEARER_TOKEN}"
curl -X GET "${BASE_URL}/api/ws/shop" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}"
# Suggested query params:
# {
# "full": 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_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
const response = await fetch(`${BASE_URL}/api/ws/shop`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
// Suggested query params:
// {
// "full": true
// }
Update workshop profile
Updates workshop details after ownership is verified. Required at least once - category_ids must contain at least one category ID the first time a new workshop is updated. Supported fields - name, description, employees -...
Auth: BearerSource: API-DOC/workshop-rules/workshopcore.md
Request Example
{
"body": {
"name": "MinBil Workshop Oslo",
"description": "Authorized workshop with inspection and service capabilities.",
"category_ids": [
1,
4
]
}
}
Response Example
{
"success": true,
"message": "Operation completed"
}
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_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
async function run() {
const response = await axios({
method: "put",
url: `${BASE_URL}/api/ws/shop`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"name": "MinBil Workshop Oslo",
"description": "Authorized workshop with inspection and service capabilities.",
"category_ids": [
1,
4
]
},
timeout: 20000,
});
console.log(response.data);
}
run().catch((error) => {
console.error(error.response?.data ?? error.message);
});
cURL example
BASE_URL="${MINBIL_API_BASE_URL:-http://localhost:5000}"
API_KEY="${MINBIL_API_KEY:-YOUR_API_KEY}"
ACCESS_TOKEN="${MINBIL_WS_ACCESS_TOKEN:-YOUR_BEARER_TOKEN}"
curl -X PUT "${BASE_URL}/api/ws/shop" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"name": "MinBil Workshop Oslo",
"description": "Authorized workshop with inspection and service capabilities.",
"category_ids": [
1,
4
]
}'
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_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
const response = await fetch(`${BASE_URL}/api/ws/shop`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"name": "MinBil Workshop Oslo",
"description": "Authorized workshop with inspection and service capabilities.",
"category_ids": [
1,
4
]
}),
});
const data = await response.json();
console.log(data);
Remove workshop ownership
Two-step ownership removal. Step 1 – Request removal code - Call DELETE /shop with org_nr (body or query). - A verification code is emailed to the owner. Step 2 – Confirm removal - Call DELETE /shop again with org_nr and ...
Auth: BearerSource: API-DOC/workshop-rules/workshopcore.md
Request Example
{
"body": {
"example_field": "example_value"
}
}
Response Example
{
"success": true,
"message": "Operation completed"
}
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_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
async function run() {
const response = await axios({
method: "delete",
url: `${BASE_URL}/api/ws/shop`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"example_field": "example_value"
},
timeout: 20000,
});
console.log(response.data);
}
run().catch((error) => {
console.error(error.response?.data ?? error.message);
});
cURL example
BASE_URL="${MINBIL_API_BASE_URL:-http://localhost:5000}"
API_KEY="${MINBIL_API_KEY:-YOUR_API_KEY}"
ACCESS_TOKEN="${MINBIL_WS_ACCESS_TOKEN:-YOUR_BEARER_TOKEN}"
curl -X DELETE "${BASE_URL}/api/ws/shop" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"example_field": "example_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_WS_ACCESS_TOKEN ?? "YOUR_BEARER_TOKEN";
const response = await fetch(`${BASE_URL}/api/ws/shop`, {
method: "DELETE",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"example_field": "example_value"
}),
});
const data = await response.json();
console.log(data);