This commit is contained in:
seb
2026-10-23 22:22:30 +02:00
parent e83116c83d
commit 1a5e3f23e2
6 changed files with 141 additions and 69 deletions

View File

@@ -5,6 +5,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Get article history by SKU
Returns `articlehistory` rows for the article, newest first (`date` DESC, `id` DESC).
Supports pagination, search filter, and date cutoff via `seekMonths`.
Auth like GET by SKU.
@@ -18,11 +19,14 @@ Auth like GET by SKU.
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `limit` | no | integer | Maximum number of entries to return (newest first). Omit for all entries. |
| `offset` | no | integer | Paging offset |
| `limit` | no | integer | Page size |
| `search` | no | string | Optional search filter for history text |
| `seekMonths` | no | integer | Negative integer cutoff months ago (e.g. -13) |
## Response `200`
Article history (newest first)
Paged article history list
```json
{
@@ -37,7 +41,11 @@ Article history (newest first)
"date": "2026-08-01T09:00:00.000Z",
"text": "Name geändert von \"\" auf \"Tee\""
}
]
],
"total": 2,
"unfilteredTotal": 2,
"offset": 0,
"limit": 50
}
```
@@ -45,7 +53,7 @@ Article history (newest first)
| Status | Description |
|--------|-------------|
| 400 | Missing sku — `{"error":"…"}` |
| 400 | Missing sku or invalid query parameters — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Article not found — `{"error":"…"}` |