1.2 KiB
1.2 KiB
PUT /article/{sku}/supplier/order
Protected. Requires a valid session cookie (credentials: 'include').
Reorder article suppliers
Sets the display sort order of supplier assignments for an article.
Expects an array of all assigned articlesupplier IDs in the desired order.
Path parameters
| Param | Required | Type | Description |
|---|---|---|---|
sku |
yes | string | Article SKU |
Body (JSON)
| Field | Required | Type | Description |
|---|---|---|---|
ids |
yes | integer[] | Full list of articlesupplier ids in their new order |
{
"ids": [
12,
10,
15
]
}
Signals
On success, emits SSE signal: article-<sku> (see GET /events).
Response 200
New order applied
{
"ids": [
1
]
}
Errors
| Status | Description |
|---|---|
| 400 | Invalid supplier order, ids is required, or no company selected — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
| 404 | Article or company not found — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.