50 lines
2.0 KiB
YAML
50 lines
2.0 KiB
YAML
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]*$'}}
|