This commit is contained in:
seb
2026-09-30 22:37:34 +02:00
parent 71c92e0718
commit 120e59631e
16 changed files with 137 additions and 35 deletions

View File

@@ -17,7 +17,7 @@ Unlinks the child from the father (or deletes if deleteArticle query/body is tru
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `deleteArticle` | no | boolean | If true, permanently deletes the child article instead of just unlinking |
| `deleteArticle` | no | boolean | If true, permanently deletes the child article (and cascades its entire descendant subtree if it is a father) instead of just unlinking |
## Response `200`

View File

@@ -15,6 +15,12 @@ Auth like GET by SKU.
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `cascade` | no | boolean | If true, recursively deletes all descendant child articles in the subtree |
## Signals
On success, emits SSE signal: `articles` (see [`GET /events`](../events.md)).

View File

@@ -75,6 +75,7 @@ Updated article detail
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Article not found — `{"error":"…"}` |
| 409 | EAN already in use — `{"error":"…"}` |
---

View File

@@ -83,7 +83,7 @@ Updated article detail
| Status | Description |
|--------|-------------|
| 400 | Invalid prices or POS customer group required — `{"error":"…"}` |
| 400 | Invalid prices, POS customer group required, or father article cannot have prices — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Article not found — `{"error":"…"}` |

View File

@@ -77,7 +77,7 @@ Stock adjusted successfully
| Status | Description |
|--------|-------------|
| 400 | Missing fields, invalid amount, or no company selected — `{"error":"…"}` |
| 400 | Missing fields, invalid amount, father article cannot have stock, or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Article or warehouse not found — `{"error":"…"}` |