1.4 KiB
1.4 KiB
PUT /article/{sku}/optionslist
Protected. Requires a valid session cookie (credentials: 'include').
Set options list for an article
Configures options for an article. Some options can be mandated (come with the article in any case). A parent article cannot have options. Can be combined with a Stückliste. Pass an empty array to remove options.
Path parameters
| Param | Required | Type | Description |
|---|---|---|---|
sku |
yes | string | Article SKU |
Body (JSON)
| Field | Required | Type | Description |
|---|---|---|---|
options |
yes | object[] | |
options[].articleId |
no | integer | |
options[].sku |
no | string | |
options[].count |
no | integer | |
options[].sort |
no | integer | |
options[].mandated |
no | boolean |
{
"options": [
{
"articleId": 1,
"sku": "…",
"count": 1,
"sort": 1,
"mandated": true
}
]
}
Response 200
Updated options list
{
"options": [
{
"id": 1,
"articleId": 1,
"sku": "…",
"name": "…",
"count": 1,
"sort": 1,
"mandated": true
}
]
}
Errors
| Status | Description |
|---|---|
| 400 | Article is a parent, a Stückliste, or contains itself |
| 404 | Article or option article not found |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.