This commit is contained in:
seb
2026-10-14 20:50:07 +02:00
parent 9c54a8a1d3
commit d880273629
34 changed files with 4454 additions and 2695 deletions

View File

@@ -0,0 +1,38 @@
# `GET /order/{id}/file/{fileId}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get order attachment file content
Returns the full binary content of an attached file (e.g. order PDF)
for the specified order. Supports HTTP caching via ETag (SHA-256 hash) and 304 Not Modified.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | Order ID |
| `fileId` | yes | integer | File ID or attachment ID |
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `download` | no | boolean | When true, sets Content-Disposition to attachment instead of inline |
## Response `200`
Binary file content
## Errors
| Status | Description |
|--------|-------------|
| 304 | Not modified |
| 400 | Invalid ID or no company selected — `{"error":"…"}` |
| 404 | Order or file not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._