925 B
925 B
PUT /article/{sku}/track_stock
Protected. Requires a valid session cookie (credentials: 'include').
Set article track_stock flag by SKU
Enables or disables inventory stock tracking for this article.
Path parameters
| Param | Required | Type | Description |
|---|---|---|---|
sku |
yes | string | Article SKU |
Body (JSON)
{
"track_stock": true
}
Signals
On success, emits SSE signal: article-<sku> (see GET /events).
Response 200
Updated article detail
{
"article": {}
}
Errors
| Status | Description |
|---|---|
| 400 | Invalid track_stock — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
| 404 | Article not found — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.