Files
dashback/docs/api/routes/article/_sku/track_stock.md
2026-10-20 23:21:48 +02:00

1.0 KiB

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)

Field Required Type Description
track_stock yes boolean Whether to track inventory stock for this article
{
  "track_stock": true
}

Signals

On success, emits SSE signal: article-<sku> (see GET /events).

Response 204

Updated

No content

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.