Expand openapi.yaml with endpoints for order bookings, department daily reports, and related management operations.

This commit is contained in:
Jeppe Bundgaard
2026-01-05 13:08:58 +01:00
parent c58e385cfd
commit f91b855545
+317 -4
View File
@@ -1420,6 +1420,250 @@ paths:
items:
$ref: '#/components/schemas/Booking'
/order-bookings:
get:
tags:
- Bookings
summary: List order bookings
operationId: listOrderBookings
parameters:
- name: id
in: query
required: false
schema: {type: integer}
responses:
'200':
description: Success
post:
tags:
- Bookings
summary: Create order booking
operationId: createOrderBooking
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [department, reg_1, datetime, items]
properties:
customer_number: {type: integer}
department: {type: integer}
reg_1: {type: string}
reg_2: {type: string}
reg_3: {type: string}
datetime: {type: string, format: date-time}
note: {type: string}
reference: {type: string}
po: {type: string}
pickup: {type: boolean}
items:
type: array
items:
type: object
required: [id, quantity]
properties:
id: {type: integer}
quantity: {type: integer}
responses:
'200':
description: Success
put:
tags:
- Bookings
summary: Update order booking
operationId: updateOrderBooking
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: {type: integer}
customer_number: {type: integer}
department: {type: integer}
reg_1: {type: string}
reg_2: {type: string}
reg_3: {type: string}
datetime: {type: string, format: date-time}
note: {type: string}
reference: {type: string}
po: {type: string}
pickup: {type: boolean}
order_id: {type: integer}
items:
type: array
items:
type: object
required: [id, quantity]
properties:
id: {type: integer}
quantity: {type: integer}
responses:
'200':
description: Success
delete:
tags:
- Bookings
summary: Delete order booking
operationId: deleteOrderBooking
parameters:
- name: id
in: query
required: true
schema: {type: integer}
responses:
'200':
description: Success
/order-bookings/complete:
post:
tags:
- Bookings
summary: Complete order booking
operationId: completeOrderBooking
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: {type: integer}
safety_seal: {type: integer}
responses:
'200':
description: Success
/admin/bookings/sync:
post:
tags:
- Bookings
summary: Sync booking from external system
operationId: syncBooking
responses:
'200':
description: Success
/admin/bookings/department/count:
get:
tags:
- Bookings
summary: Get department unfulfilled bookings count
operationId: getDepartmentBookingCount
parameters:
- name: department_id
in: query
required: true
schema: {type: integer}
responses:
'200':
description: Success
/user/bookings/washcertificate/download:
post:
tags:
- Bookings
summary: Get download link for own wash certificate
operationId: downloadOwnWashCertificate
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: {type: integer}
responses:
'200':
description: Success
/bookings/download_pdf:
get:
tags:
- Bookings
summary: Download booking PDF
operationId: downloadBookingPdf
parameters:
- name: id
in: query
required: true
schema: {type: integer}
responses:
'200':
description: Success
/admin/bookings/delete:
post:
tags:
- Bookings
summary: Delete booking (admin)
operationId: adminDeleteBooking
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: {type: integer}
responses:
'200':
description: Success
/superuser/bookings/sync/all:
post:
tags:
- Bookings
summary: Sync all bookings from external system
operationId: syncAllBookings
responses:
'200':
description: Success
/admin/bookings/completeWashWithoutWashCertificate:
post:
tags:
- Bookings
summary: Complete wash without wash certificate
operationId: completeWashWithoutWashCertificate
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: {type: integer}
responses:
'200':
description: Success
/user/bookings/delete:
post:
tags:
- Bookings
summary: Delete own booking
operationId: deleteOwnBooking
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id]
properties:
id: {type: integer}
responses:
'200':
description: Success
# Invoices Endpoints
/invoices/draft:
get:
@@ -3415,10 +3659,10 @@ paths:
application/json:
schema:
type: object
required: [department_id, category_id, price]
required: [department_id, product_id, price]
properties:
department_id: {type: integer}
category_id: {type: string}
product_id: {type: integer}
price: {type: integer}
responses:
'200':
@@ -3449,10 +3693,10 @@ paths:
application/json:
schema:
type: object
required: [department_id, key, value]
required: [department_id, variable, value]
properties:
department_id: {type: integer}
key: {type: string}
variable: {type: string}
value: {type: string}
responses:
'200':
@@ -3524,6 +3768,75 @@ paths:
'200':
description: Success
/departments/daily-reports/product-count:
get:
tags:
- Departments
summary: Get product count for daily reports
operationId: getDailyReportProductCount
parameters:
- name: date
in: query
required: true
schema: {type: string}
- name: date_to
in: query
required: false
schema: {type: string}
- name: department_id
in: query
required: true
schema: {type: integer}
- name: product_id
in: query
required: true
schema: {type: integer}
responses:
'200':
description: Success
/departments/daily-reports/transaction-count:
get:
tags:
- Departments
summary: Get transaction count for daily reports
operationId: getDailyReportTransactionCount
parameters:
- name: date
in: query
required: true
schema: {type: string}
- name: date_to
in: query
required: false
schema: {type: string}
- name: department_id
in: query
required: true
schema: {type: integer}
responses:
'200':
description: Success
/departments/daily-reports/bookings-count:
get:
tags:
- Departments
summary: Get bookings count for daily reports
operationId: getDailyReportBookingsCount
parameters:
- name: date
in: query
required: true
schema: {type: string}
- name: department_id
in: query
required: true
schema: {type: integer}
responses:
'200':
description: Success
components:
securitySchemes:
BearerAuth: