Files
dashback/docs/api/routes/article/export.zip.md
2026-08-04 01:24:19 +02:00

38 lines
1.1 KiB
Markdown

# `GET /article/export.zip`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Export articles as ZIP
Builds an `artikel.zip` for the authenticated user's selected company.
`categoryId` (optional) restricts the export to that category and below;
it must be reachable via the company's root category. Defaults to the
whole company root tree.
The ZIP contains `artikel.csv` (semicolon-separated, Windows-1252)
plus one AVIF entry per article image, named `<fullHash>.avif`
(content-addressed, so shared hashes are deduplicated).
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `categoryId` | no | integer | Restrict export to this category subtree |
## Response `200`
ZIP archive
## Errors
| Status | Description |
|--------|-------------|
| 400 | No company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Company not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._