Expand openapi.yaml with new endpoints for department lanes, worker operations, license plate scanning, invoicing, and configuration management.

This commit is contained in:
Jeppe Bundgaard
2026-01-05 11:50:36 +01:00
parent 7f6ab7ec18
commit 756a8eca1a
+757
View File
@@ -58,6 +58,12 @@ tags:
description: File upload and attachment management
- name: Forms
description: Form submissions and management
- name: Worker
description: System worker status and maintenance
- name: Plate Scans
description: License plate scanning operations
- name: Config
description: Module configuration management
paths:
# Authentication Endpoints
@@ -815,6 +821,90 @@ paths:
'201':
description: Category added to department successfully
/department/lanes:
get:
tags:
- Departments
summary: List department lanes
description: Retrieve a list of all department lanes
operationId: listDepartmentLanes
parameters:
- $ref: '#/components/parameters/PageParam'
- $ref: '#/components/parameters/PerPageParam'
- $ref: '#/components/parameters/SearchParam'
responses:
'200':
description: Department lanes retrieved successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/DepartmentLane'
'401':
$ref: '#/components/responses/Unauthorized'
post:
tags:
- Departments
summary: Create department lane
description: Create a new department lane
operationId: createDepartmentLane
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DepartmentLaneCreate'
responses:
'201':
description: Department lane created successfully
'400':
$ref: '#/components/responses/BadRequest'
put:
tags:
- Departments
summary: Update department lane
description: Update an existing department lane
operationId: updateDepartmentLane
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DepartmentLaneUpdate'
responses:
'200':
description: Department lane updated successfully
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
/guest/validation/customer-number:
post:
tags:
- Users
summary: Validate customer number
description: Check if a customer number is valid and exists
operationId: validateCustomerNumber
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- customer_number
properties:
customer_number:
type: integer
responses:
'200':
description: Customer number validation successful
'400':
$ref: '#/components/responses/BadRequest'
/guest/departments:
get:
tags:
@@ -1123,6 +1213,39 @@ paths:
'200':
description: Ready invoices retrieved successfully
/superuser/invoicing/period:
get:
tags:
- Invoices
summary: Get invoicing periods
description: Retrieve invoicing periods for superusers
operationId: getInvoicingPeriods
responses:
'200':
description: Invoicing periods retrieved successfully
/superuser/invoicing/period/distribution/fixed-pricing:
get:
tags:
- Invoices
summary: Get fixed pricing distribution
description: Get invoicing distribution for fixed pricing items
operationId: getInvoicingFixedPricingDistribution
responses:
'200':
description: Fixed pricing distribution retrieved successfully
/superuser/invoicing/period/distribution/wash-subscriptions:
get:
tags:
- Invoices
summary: Get wash subscriptions distribution
description: Get invoicing distribution for wash subscriptions
operationId: getInvoicingWashSubscriptionsDistribution
responses:
'200':
description: Wash subscriptions distribution retrieved successfully
# Vehicles Endpoints
/vehicles:
get:
@@ -1313,6 +1436,292 @@ paths:
'200':
description: This year's income statistics retrieved successfully
# Worker Endpoints
/worker/version:
get:
tags:
- Worker
summary: Get worker version
description: Get the current version of the system worker
operationId: getWorkerVersion
responses:
'200':
description: Worker version retrieved successfully
/worker/update-version:
get:
tags:
- Worker
summary: Update worker version
description: Set the target version for the worker update
operationId: updateWorkerVersion
parameters:
- name: version
in: query
required: true
schema:
type: string
responses:
'200':
description: Version update target set successfully
/worker/status:
get:
tags:
- Worker
summary: Get worker status
description: Get detailed status of the system worker
operationId: getWorkerStatus
responses:
'200':
description: Worker status retrieved successfully
/worker/debug:
get:
tags:
- Worker
summary: Debug worker
description: Execute debug commands on the worker (often restricted)
operationId: debugWorker
responses:
'200':
description: Debug information retrieved successfully
'403':
$ref: '#/components/responses/Forbidden'
/worker/debug/on:
get:
tags:
- Worker
summary: Enable worker debug
operationId: enableWorkerDebug
responses:
'200':
description: Worker debug enabled
'403':
$ref: '#/components/responses/Forbidden'
/worker/debug/off:
get:
tags:
- Worker
summary: Disable worker debug
operationId: disableWorkerDebug
responses:
'200':
description: Worker debug disabled
'403':
$ref: '#/components/responses/Forbidden'
/worker/licenseplates:
get:
tags:
- Worker
summary: Get unique license plates
description: Fetch all unique license plates from various database tables
operationId: getWorkerLicensePlates
responses:
'200':
description: License plates retrieved successfully
'403':
$ref: '#/components/responses/Forbidden'
/economic/doesCustomerExist:
get:
tags:
- Modules
summary: Check if customer exists in e-conomic
operationId: checkEconomicCustomerExists
parameters:
- name: cvr
in: query
required: true
schema:
type: string
responses:
'200':
description: Customer check completed
'404':
$ref: '#/components/responses/NotFound'
/cvr/lookup:
get:
tags:
- Modules
summary: Lookup CVR information
description: Get detailed information for a CVR number
operationId: lookupCvr
parameters:
- name: cvr
in: query
required: true
schema:
type: string
responses:
'200':
description: CVR information retrieved successfully
/cvr/search:
get:
tags:
- Modules
summary: Search CVR
description: Search for companies by name or CVR
operationId: searchCvr
parameters:
- name: query
in: query
required: true
schema:
type: string
minLength: 2
responses:
'200':
description: Search results retrieved successfully
# Plate Scans Endpoints
/numberplatescans:
get:
tags:
- Plate Scans
summary: List plate scans
description: Get a list of license plate scans
operationId: listPlateScans
parameters:
- $ref: '#/components/parameters/PageParam'
- $ref: '#/components/parameters/PerPageParam'
- $ref: '#/components/parameters/SearchParam'
responses:
'200':
description: Plate scans retrieved successfully
post:
tags:
- Plate Scans
summary: Record plate scan
description: Record a new license plate scan
operationId: recordPlateScan
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- plate
- lane_id
properties:
plate:
type: string
lane_id:
type: integer
responses:
'201':
description: Plate scan recorded successfully
/numberplatescans/department:
post:
tags:
- Plate Scans
summary: Record plate scan for department
operationId: recordDepartmentPlateScan
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- plate
- department_id
properties:
plate:
type: string
department_id:
type: integer
responses:
'201':
description: Plate scan recorded successfully
/numberplatescans/post:
get:
tags:
- Plate Scans
summary: Get post-scan results
operationId: getPlateScanPostResults
responses:
'200':
description: Post-scan results retrieved successfully
/numberplatescanners:
get:
tags:
- Plate Scans
summary: List plate scanners
description: Get a list of all number plate scanners
operationId: listPlateScanners
parameters:
- $ref: '#/components/parameters/PageParam'
- $ref: '#/components/parameters/PerPageParam'
- $ref: '#/components/parameters/SearchParam'
responses:
'200':
description: Plate scanners retrieved successfully
post:
tags:
- Plate Scans
summary: Add plate scanner
operationId: addPlateScanner
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [department_id, name, notes]
properties:
department_id: {type: integer}
name: {type: string}
notes: {type: string}
responses:
'201':
description: Plate scanner added successfully
put:
tags:
- Plate Scans
summary: Update plate scanner
operationId: updatePlateScanner
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [id, department_id, name, notes]
properties:
id: {type: integer}
department_id: {type: integer}
name: {type: string}
notes: {type: string}
responses:
'200':
description: Plate scanner updated successfully
/department/numberplatescanners:
get:
tags:
- Plate Scans
summary: List department plate scanners
operationId: listDepartmentPlateScanners
parameters:
- name: id
in: query
required: true
schema:
type: integer
responses:
'200':
description: Department plate scanners retrieved successfully
# Module - e-conomic Endpoints
/economic/customers/import:
post:
@@ -1451,6 +1860,50 @@ paths:
'200':
description: XLVask customers retrieved successfully
# Module - Self-Serve Endpoints
/modules/self-serve/lane/status:
get:
tags:
- Modules
summary: Get self-serve lane status
description: Retrieve the current status of a self-serve lane
operationId: getSelfServeLaneStatus
parameters:
- name: lane_id
in: query
required: true
schema:
type: integer
responses:
'200':
description: Lane status retrieved successfully
/modules/self-serve/lane/command:
post:
tags:
- Modules
summary: Send self-serve lane command
description: Send a command (e.g., start, stop, reset) to a self-serve lane
operationId: sendSelfServeLaneCommand
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- lane_id
- command
properties:
lane_id:
type: integer
command:
type: string
enum: [start, stop, reset]
responses:
'200':
description: Command sent successfully
# Module - Other Integration Endpoints
/modules/motorapi/lookup:
get:
@@ -1759,6 +2212,253 @@ paths:
'200':
description: Customers found successfully
# Configuration Endpoints
/economic/config:
get:
tags: [Config]
summary: Get e-conomic config
operationId: getEconomicConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update e-conomic config
operationId: updateEconomicConfig
responses:
'200': {description: Success}
/reCAPTCHA/config:
get:
tags: [Config]
summary: Get reCAPTCHA config
operationId: getRecaptchaConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update reCAPTCHA config
operationId: updateRecaptchaConfig
responses:
'200': {description: Success}
/email/config:
get:
tags: [Config]
summary: Get email config
operationId: getEmailConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update email config
operationId: updateEmailConfig
responses:
'200': {description: Success}
/email/config/test:
post:
tags: [Config]
summary: Test email config
operationId: testEmailConfig
responses:
'200': {description: Success}
/backups/config:
get:
tags: [Config]
summary: Get backups config
operationId: getBackupsConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update backups config
operationId: updateBackupsConfig
responses:
'200': {description: Success}
/motorapi/config:
get:
tags: [Config]
summary: Get MotorAPI config
operationId: getMotorApiConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update MotorAPI config
operationId: updateMotorApiConfig
responses:
'200': {description: Success}
/stripe/config:
get:
tags: [Config]
summary: Get Stripe config
operationId: getStripeConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update Stripe config
operationId: updateStripeConfig
responses:
'200': {description: Success}
/fxratesapi/config:
get:
tags: [Config]
summary: Get FXRatesAPI config
operationId: getFxRatesApiConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update FXRatesAPI config
operationId: updateFxRatesApiConfig
responses:
'200': {description: Success}
/gatewayapi/config:
get:
tags: [Config]
summary: Get GatewayAPI config
operationId: getGatewayApiConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update GatewayAPI config
operationId: updateGatewayApiConfig
responses:
'200': {description: Success}
/xlvask/config:
get:
tags: [Config]
summary: Get XLVask config
operationId: getXlvaskConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update XLVask config
operationId: updateXlvaskConfig
responses:
'200': {description: Success}
/entra/config:
get:
tags: [Config]
summary: Get Entra config
operationId: getEntraConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update Entra config
operationId: updateEntraConfig
responses:
'200': {description: Success}
/limble/config:
get:
tags: [Config]
summary: Get Limble config
operationId: getLimbleConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update Limble config
operationId: updateLimbleConfig
responses:
'200': {description: Success}
/ocrspace/config:
get:
tags: [Config]
summary: Get OcrSpace config
operationId: getOcrSpaceConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update OcrSpace config
operationId: updateOcrSpaceConfig
responses:
'200': {description: Success}
/openai/config:
get:
tags: [Config]
summary: Get OpenAI config
operationId: getOpenAiConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update OpenAI config
operationId: updateOpenAiConfig
responses:
'200': {description: Success}
/licenseplaterecognizer/config:
get:
tags: [Config]
summary: Get LicensePlateRecognizer config
operationId: getLicensePlateRecognizerConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update LicensePlateRecognizer config
operationId: updateLicensePlateRecognizerConfig
responses:
'200': {description: Success}
/virkdata/config:
get:
tags: [Config]
summary: Get Virkdata config
operationId: getVirkdataConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update Virkdata config
operationId: updateVirkdataConfig
responses:
'200': {description: Success}
/shelly/config:
get:
tags: [Config]
summary: Get Shelly config
operationId: getShellyConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update Shelly config
operationId: updateShellyConfig
responses:
'200': {description: Success}
/selfserve/config:
get:
tags: [Config]
summary: Get Self-Serve config
operationId: getSelfServeConfig
responses:
'200': {description: Success}
post:
tags: [Config]
summary: Update Self-Serve config
operationId: updateSelfServeConfig
responses:
'200': {description: Success}
components:
securitySchemes:
BearerAuth:
@@ -2118,6 +2818,63 @@ components:
type: number
format: float
DepartmentLane:
type: object
properties:
id:
type: integer
department:
type: integer
name:
type: string
relay_in_id:
type: string
relay_out_id:
type: string
relay_machine_id:
type: string
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
DepartmentLaneCreate:
type: object
required:
- department
- name
properties:
department:
type: integer
name:
type: string
relay_in_id:
type: string
relay_out_id:
type: string
relay_machine_id:
type: string
DepartmentLaneUpdate:
type: object
required:
- id
properties:
id:
type: integer
department:
type: integer
name:
type: string
relay_in_id:
type: string
relay_out_id:
type: string
relay_machine_id:
type: string
Product:
type: object
properties: