This commit is contained in:
seb
2026-09-19 06:34:11 +02:00
parent 96d35bcf6d
commit 37a676bb50
6 changed files with 334 additions and 2 deletions

View File

@@ -4884,6 +4884,143 @@
}
}
},
"/delivery/{id}/file/{fileId}": {
"get": {
"tags": [
"Delivery"
],
"summary": "Get delivery attachment file content",
"description": "Returns the full binary content of an attached file (e.g. PDF or text document)\nfor the specified delivery. Supports HTTP caching via ETag (SHA-256 hash) and 304 Not Modified.\n",
"security": [
{
"cookieAuth": []
}
],
"x-markdown": "delivery/file.md",
"parameters": [
{
"in": "path",
"name": "id",
"required": true,
"schema": {
"type": "integer"
},
"description": "Delivery (manifest) ID"
},
{
"in": "path",
"name": "fileId",
"required": true,
"schema": {
"type": "integer"
},
"description": "File ID or attachment ID"
},
{
"in": "query",
"name": "download",
"required": false,
"schema": {
"type": "boolean"
},
"description": "When true, sets Content-Disposition to attachment instead of inline"
}
],
"responses": {
"200": {
"description": "Full binary file content",
"headers": {
"Content-Type": {
"schema": {
"type": "string",
"example": "application/pdf"
}
},
"Content-Disposition": {
"schema": {
"type": "string",
"example": "inline; filename=\"document.pdf\""
}
},
"ETag": {
"schema": {
"type": "string"
}
},
"Cache-Control": {
"schema": {
"type": "string",
"example": "private, max-age=86400"
}
}
},
"content": {
"application/pdf": {
"schema": {
"type": "string",
"format": "binary"
}
},
"text/plain": {
"schema": {
"type": "string",
"format": "binary"
}
},
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"304": {
"description": "Not modified (If-None-Match matched ETag)"
},
"400": {
"description": "Invalid id, invalid fileId, or no company selected",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Not authorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Delivery or file not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
},
"/customergroup": {
"get": {
"tags": [
@@ -10088,7 +10225,7 @@
},
"DeliveryFile": {
"type": "object",
"description": "Attachment metadata (binary content is served via the attachment content endpoints). Thumbnails (AVIF) are generated server-side.",
"description": "Attachment metadata (full binary content is served via `GET /delivery/{id}/file/{fileId}`). Thumbnails (AVIF) are generated server-side.",
"required": [
"id",
"manifestId",