List bookings (grouped)
Returns bookings for the workshop grouped by group_id. Filtering & pagination - status filters by booking status code - page and page_size control pagination
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
This endpoint does not use a JSON body. Send path/query parameters and required headers.
Response Example
{
"items": [
{
"id": 701,
"status": "PENDING",
"start_time": "2026-02-20T10:00:00Z"
}
],
"meta": {
"total": 1,
"page": 1,
"page_size": 20
}
}
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/bookings`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
params: {
"status": "PENDING",
"page": 1,
"page_size": 20
},
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/bookings" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}"
# Suggested query params:
# {
# "status": "PENDING",
# "page": 1,
# "page_size": 20
# }
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/bookings`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
// Suggested query params:
// {
// "status": "PENDING",
// "page": 1,
// "page_size": 20
// }
Create booking
Creates a booking for a workshop service. Supports JSON or multipart/form-data.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"body": {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}
}
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: "post",
url: `${BASE_URL}/api/ws/bookings`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
},
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 POST "${BASE_URL}/api/ws/bookings" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}'
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/bookings`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}),
});
const data = await response.json();
console.log(data);
GET/api/ws/bookings/group/:group_idGet booking group
Fetches all bookings within a group. Useful for multi-service bookings.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
This endpoint does not use a JSON body. Send path/query parameters and required headers.
Response Example
{
"items": [
{
"id": 701,
"status": "PENDING",
"start_time": "2026-02-20T10:00:00Z"
}
],
"meta": {
"total": 1,
"page": 1,
"page_size": 20
}
}
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() {
// Replace path params before calling endpoint: group_id
const response = await axios({
method: "get",
url: `${BASE_URL}/api/ws/bookings/group/:group_id`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
params: {
"status": "PENDING",
"page": 1,
"page_size": 20
},
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/bookings/group/:group_id" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}"
# Suggested query params:
# {
# "status": "PENDING",
# "page": 1,
# "page_size": 20
# }
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/bookings/group/:group_id`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
// Suggested query params:
// {
// "status": "PENDING",
// "page": 1,
// "page_size": 20
// }
POST/api/ws/bookings/message/:booking_idSend booking message
Adds a message (and optional attachments) to a booking thread. Optionally notifies the car owner if to_carowner=true. Deprecated: Prefer v2 booking detail/read models and status transitions.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"path_params": {
"booking_id": 123
},
"body": {
"message": "Can we move the appointment by 30 minutes?",
"to_carowner": true
}
}
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() {
// Replace path params before calling endpoint: booking_id
const response = await axios({
method: "post",
url: `${BASE_URL}/api/ws/bookings/message/:booking_id`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"message": "Can we move the appointment by 30 minutes?",
"to_carowner": 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 POST "${BASE_URL}/api/ws/bookings/message/:booking_id" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"message": "Can we move the appointment by 30 minutes?",
"to_carowner": 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/bookings/message/:booking_id`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"message": "Can we move the appointment by 30 minutes?",
"to_carowner": true
}),
});
const data = await response.json();
console.log(data);
POST/api/ws/bookings/confirm/:booking_idConfirm booking
Confirms a booking and optionally overrides the estimated duration. Deprecated: Prefer POST /api/ws/v2/bookings/status-transitions.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"path_params": {
"booking_id": 123
},
"body": {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}
}
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() {
// Replace path params before calling endpoint: booking_id
const response = await axios({
method: "post",
url: `${BASE_URL}/api/ws/bookings/confirm/:booking_id`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
},
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 POST "${BASE_URL}/api/ws/bookings/confirm/:booking_id" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}'
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/bookings/confirm/:booking_id`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}),
});
const data = await response.json();
console.log(data);
POST/api/ws/bookings/cancel/:booking_idCancel booking
Cancels a booking and optionally sends a message to the car owner. Deprecated: Prefer POST /api/ws/v2/bookings/status-transitions.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"path_params": {
"booking_id": 123
},
"body": {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}
}
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() {
// Replace path params before calling endpoint: booking_id
const response = await axios({
method: "post",
url: `${BASE_URL}/api/ws/bookings/cancel/:booking_id`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
},
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 POST "${BASE_URL}/api/ws/bookings/cancel/:booking_id" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}'
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/bookings/cancel/:booking_id`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}),
});
const data = await response.json();
console.log(data);
POST/api/ws/bookings/complete/:booking_idComplete booking
Marks a booking as completed and writes service history. Optionally sends a final message. Note: Prefer POST /api/ws/v2/bookings/status-transitions for canonical status mutations.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"path_params": {
"booking_id": 123
},
"body": {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}
}
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() {
// Replace path params before calling endpoint: booking_id
const response = await axios({
method: "post",
url: `${BASE_URL}/api/ws/bookings/complete/:booking_id`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
},
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 POST "${BASE_URL}/api/ws/bookings/complete/:booking_id" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}'
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/bookings/complete/:booking_id`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}),
});
const data = await response.json();
console.log(data);
POST/api/ws/bookings/statusUpdate booking status
Updates the status for one booking or a group of bookings. Examples - {"booking_id": 123, "target_status": "IN_PROGRESS"} - {"group_id": "8d7f...", "apply_to": "all", "target_status": "CANCELLED"} - {"group_id": "8d7f...", "appl...
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"body": {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}
}
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: "post",
url: `${BASE_URL}/api/ws/bookings/status`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
},
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 POST "${BASE_URL}/api/ws/bookings/status" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}'
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/bookings/status`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}),
});
const data = await response.json();
console.log(data);
GET/api/ws/bookings/change-requestsList booking change requests
Lists change requests for the authenticated workshop.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
This endpoint does not use a JSON body. Send path/query parameters and required headers.
Response Example
{
"items": [
{
"id": 701,
"status": "PENDING",
"start_time": "2026-02-20T10:00:00Z"
}
],
"meta": {
"total": 1,
"page": 1,
"page_size": 20
}
}
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/bookings/change-requests`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
params: {
"status": "PENDING",
"page": 1,
"page_size": 20
},
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/bookings/change-requests" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}"
# Suggested query params:
# {
# "status": "PENDING",
# "page": 1,
# "page_size": 20
# }
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/bookings/change-requests`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
// Suggested query params:
// {
// "status": "PENDING",
// "page": 1,
// "page_size": 20
// }
POST/api/ws/bookings/change-requests/:request_id/decisionApprove or reject change request
Resolves a pending change request and applies audited mutation when approved.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"path_params": {
"request_id": 123
},
"body": {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}
}
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() {
// Replace path params before calling endpoint: request_id
const response = await axios({
method: "post",
url: `${BASE_URL}/api/ws/bookings/change-requests/:request_id/decision`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
data: {
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
},
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 POST "${BASE_URL}/api/ws/bookings/change-requests/:request_id/decision" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}" \\
-d '{
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}'
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/bookings/change-requests/:request_id/decision`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
body: JSON.stringify({
"workshop_id": 123,
"vehicle_id": 456,
"service_ids": [
1,
2
],
"preferred_start_time": "2026-02-20T10:00:00Z",
"note": "Need a quick service appointment."
}),
});
const data = await response.json();
console.log(data);
GET/api/ws/bookings/:booking_idGet single booking
Fetches a single booking by id.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
This endpoint does not use a JSON body. Send path/query parameters and required headers.
Response Example
{
"items": [
{
"id": 701,
"status": "PENDING",
"start_time": "2026-02-20T10:00:00Z"
}
],
"meta": {
"total": 1,
"page": 1,
"page_size": 20
}
}
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() {
// Replace path params before calling endpoint: booking_id
const response = await axios({
method: "get",
url: `${BASE_URL}/api/ws/bookings/:booking_id`,
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
params: {
"status": "PENDING",
"page": 1,
"page_size": 20
},
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/bookings/:booking_id" \\
-H "Content-Type: application/json" \\
-H "Authorization: Bearer ${ACCESS_TOKEN}"
# Suggested query params:
# {
# "status": "PENDING",
# "page": 1,
# "page_size": 20
# }
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/bookings/:booking_id`, {
method: "GET",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${ACCESS_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
// Suggested query params:
// {
// "status": "PENDING",
// "page": 1,
// "page_size": 20
// }
DELETE/api/ws/bookings/:booking_idDelete booking (not allowed)
Deletion is not allowed. Use POST /bookings/cancel/{id} or POST /bookings/status with target_status=CANCELLED.
Auth: BearerSource: API-DOC/workshop-rules/bookings.md
Request Example
{
"path_params": {
"booking_id": 123
},
"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() {
// Replace path params before calling endpoint: booking_id
const response = await axios({
method: "delete",
url: `${BASE_URL}/api/ws/bookings/:booking_id`,
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/bookings/:booking_id" \\
-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/bookings/:booking_id`, {
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);