u
This commit is contained in:
@@ -126,8 +126,8 @@ _none_
|
||||
- Params: `sku: str, body: { eans: str[] }`
|
||||
- Returns: `204 void`
|
||||
#### Get article history by SKU — `GET /article/{sku}/history`
|
||||
- Params: `sku: str, query: limit?: int`
|
||||
- Returns: `200 { history: { id: int, date: str, text: str }[], truncated: bool }`
|
||||
- Params: `sku: str, query: offset?: int, limit?: int, search?: str, seekMonths?: int`
|
||||
- Returns: `200 { history: { id: int, date: str, text: str }[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
||||
#### Add article image — `POST /article/{sku}/image`
|
||||
- Params: `sku: str, image/avif`
|
||||
- Returns: `201 { image: { picId: int, sort: int, full: { w: int, h: int, size: int }, thumb: { w: int, h: int }, hash: str, thumbHash: str } }`
|
||||
|
||||
@@ -92,8 +92,8 @@ Params: path values first, then `query:` and `body:` (`body?` = optional body).
|
||||
- Params: `sku: str, body: { eans: str[] }`
|
||||
- Returns: `204 void`
|
||||
#### Get article history by SKU — `GET /article/{sku}/history`
|
||||
- Params: `sku: str, query: limit?: int`
|
||||
- Returns: `200 { history: { id: int, date: str, text: str }[], truncated: bool }`
|
||||
- Params: `sku: str, query: offset?: int, limit?: int, search?: str, seekMonths?: int`
|
||||
- Returns: `200 { history: { id: int, date: str, text: str }[], total: int, unfilteredTotal: int, offset: int, limit: int }`
|
||||
#### Delete article image — `DELETE /article/{sku}/image/{fullHash}`
|
||||
- Params: `sku: str, fullHash: str`
|
||||
- Returns: `204 void`
|
||||
|
||||
@@ -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":"…"}` |
|
||||
|
||||
Reference in New Issue
Block a user