u
This commit is contained in:
42
docs/api/routes/article/_sku/articlelist.get.md
Normal file
42
docs/api/routes/article/_sku/articlelist.get.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# `GET /article/{sku}/articlelist`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Get Stückliste (bundle items) for an article
|
||||
|
||||
Returns the list of component items for a Stückliste article.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Article SKU |
|
||||
|
||||
## Response `200`
|
||||
|
||||
List of bundle items
|
||||
|
||||
```json
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"id": 1,
|
||||
"articleId": 1,
|
||||
"sku": "…",
|
||||
"name": "…",
|
||||
"count": 1,
|
||||
"sort": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 404 | Article not found |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
51
docs/api/routes/article/_sku/articlelist.put.md
Normal file
51
docs/api/routes/article/_sku/articlelist.put.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# `PUT /article/{sku}/articlelist`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Set Stückliste (bundle items) for an article
|
||||
|
||||
Configures the article as a Stückliste covering a list of count * article. An article that is a father or has options cannot be a Stückliste. Pass an empty array to remove the Stückliste.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Article SKU |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
```json
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"articleId": 1,
|
||||
"sku": "…",
|
||||
"count": 1,
|
||||
"sort": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
Updated Stückliste items
|
||||
|
||||
```json
|
||||
{
|
||||
"items": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Article is a father, has options, or contains itself |
|
||||
| 404 | Article or component article not found |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
43
docs/api/routes/article/_sku/optionslist.get.md
Normal file
43
docs/api/routes/article/_sku/optionslist.get.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# `GET /article/{sku}/optionslist`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Get options list for an article
|
||||
|
||||
Returns the available options for an article.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Article SKU |
|
||||
|
||||
## Response `200`
|
||||
|
||||
List of options
|
||||
|
||||
```json
|
||||
{
|
||||
"options": [
|
||||
{
|
||||
"id": 1,
|
||||
"articleId": 1,
|
||||
"sku": "…",
|
||||
"name": "…",
|
||||
"count": 1,
|
||||
"sort": 1,
|
||||
"mandated": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 404 | Article not found |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
52
docs/api/routes/article/_sku/optionslist.put.md
Normal file
52
docs/api/routes/article/_sku/optionslist.put.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# `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). An article that is a father or a Stückliste cannot have options. Pass an empty array to remove options.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Article SKU |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
```json
|
||||
{
|
||||
"options": [
|
||||
{
|
||||
"articleId": 1,
|
||||
"sku": "…",
|
||||
"count": 1,
|
||||
"sort": 1,
|
||||
"mandated": true
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
Updated options list
|
||||
|
||||
```json
|
||||
{
|
||||
"options": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Article is a father, 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`._
|
||||
Reference in New Issue
Block a user