This commit is contained in:
2026-08-08 20:39:49 +08:00
parent 0558f7ae59
commit f239bb739b
6 changed files with 2767 additions and 24 deletions
@@ -0,0 +1,49 @@
openapi: 3.0.3
info:
title: Truck Appointment Attachments and History API
version: 1.0.0
paths:
/api/platform/v1/truck-appointments/{id}/history:
parameters: [{$ref: '#/components/parameters/AppointmentId'}]
get:
summary: Query immutable appointment status history
responses:
'200': {description: History entries including action, from/to status, operator, reason and time}
/api/platform/v1/truck-appointments/{id}/attachments:
parameters: [{$ref: '#/components/parameters/AppointmentId'}]
get:
summary: Query attachment references owned by the appointment
responses:
'200': {description: Attachment references}
post:
summary: Reference a file already owned by the appointment customer and business scope
responses:
'200': {description: Created attachment reference}
/api/platform/v1/truck-appointments/{id}/attachments/upload:
parameters: [{$ref: '#/components/parameters/AppointmentId'}]
post:
summary: Upload and reference a truck appointment attachment
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required: [file]
properties:
attachmentType: {type: string, maxLength: 32}
file: {type: string, format: binary}
responses:
'200': {description: Uploaded attachment reference}
/api/platform/v1/truck-appointments/{id}/attachments/{attachmentId}:
parameters:
- {$ref: '#/components/parameters/AppointmentId'}
- {$ref: '#/components/parameters/AttachmentId'}
delete:
summary: Delete an attachment reference owned by the appointment
responses:
'200': {description: Reference deleted}
components:
parameters:
AppointmentId: {name: id, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}
AttachmentId: {name: attachmentId, in: path, required: true, schema: {type: string, pattern: '^[1-9][0-9]*$'}}