u
This commit is contained in:
38
docs/api/routes/quote/_id/file/_fileId.md
Normal file
38
docs/api/routes/quote/_id/file/_fileId.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# `GET /quote/{id}/file/{fileId}`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Get quote attachment file content
|
||||
|
||||
Returns the full binary content of an attached file (e.g. quote PDF)
|
||||
for the specified quote. Supports HTTP caching via ETag (SHA-256 hash) and 304 Not Modified.
|
||||
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | Quote 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 | Quote or file not found — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user