u
This commit is contained in:
@@ -4,7 +4,7 @@ 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. A father article cannot be a Stückliste. Can be combined with options. Pass an empty array to remove the Stückliste.
|
||||
Configures the article as a Stückliste covering a list of count * article. A parent article cannot be a Stückliste. Can be combined with options. Pass an empty array to remove the Stückliste.
|
||||
|
||||
## Path parameters
|
||||
|
||||
@@ -51,7 +51,7 @@ Updated Stückliste items
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Article is a father, has options, or contains itself |
|
||||
| 400 | Article is a parent, has options, or contains itself |
|
||||
| 404 | Article or component article not found |
|
||||
|
||||
---
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
List child articles of a father article
|
||||
List child articles of a parent article
|
||||
|
||||
Returns variants/children linked to this father article.
|
||||
Returns variants/children linked to this parent article.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Father article SKU |
|
||||
| `sku` | yes | string | Parent article SKU |
|
||||
|
||||
## Response `200`
|
||||
|
||||
@@ -23,7 +23,7 @@ List of children
|
||||
"id": 1,
|
||||
"sku": "…",
|
||||
"name": "…",
|
||||
"fathersort": 1,
|
||||
"parentsort": 1,
|
||||
"attributeValueId": 1,
|
||||
"attributeValue": "…"
|
||||
}
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Create and attach a new child article to a father article
|
||||
Create and attach a new child article to a parent article
|
||||
|
||||
Automatically generates SKU as fatherSku-nextFreeIndex and name from father name + value. Rejects a caller-supplied sku.
|
||||
Automatically generates SKU as parentSku-nextFreeIndex and name from parent name + value. Rejects a caller-supplied sku.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Father article SKU |
|
||||
| `sku` | yes | string | Parent article SKU |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `attributeValueId` | no | integer | ID of existing attribute value for the father's attribute |
|
||||
| `value` | no | string | String value to find or create under the father's attribute |
|
||||
| `attributeValueId` | no | integer | ID of existing attribute value for the parent's attribute |
|
||||
| `value` | no | string | String value to find or create under the parent's attribute |
|
||||
| `name` | no | string | Optional custom variant name |
|
||||
|
||||
```json
|
||||
@@ -48,7 +48,7 @@ Created child article
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Father not configured as father, missing value, duplicate variant, or sku was provided in body |
|
||||
| 400 | Parent not configured as parent, missing value, duplicate variant, or sku was provided in body |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Attach an existing article as a child to a father article
|
||||
Attach an existing article as a child to a parent article
|
||||
|
||||
Attaches an existing article to this father article. Idempotent if already a child. Returns 409 if the article already belongs to another father.
|
||||
Attaches an existing article to this parent article. Idempotent if already a child. Returns 409 if the article already belongs to another parent.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Father article SKU |
|
||||
| `sku` | yes | string | Parent article SKU |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | SKU of the existing article to attach as child |
|
||||
| `attributeValueId` | no | integer | ID of existing attribute value for the father's attribute |
|
||||
| `value` | no | string | String value to find or create under the father's attribute |
|
||||
| `reparent` | no | boolean | Whether to allow re-parenting if child already belongs to another father |
|
||||
| `attributeValueId` | no | integer | ID of existing attribute value for the parent's attribute |
|
||||
| `value` | no | string | String value to find or create under the parent's attribute |
|
||||
| `reparent` | no | boolean | Whether to allow re-parenting if child already belongs to another parent |
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -54,8 +54,8 @@ Attached child article and list of children
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Missing sku or attribute value, or invalid input |
|
||||
| 404 | Father or child article not found |
|
||||
| 409 | Article already belongs to another father, or variant value already exists |
|
||||
| 404 | Parent or child article not found |
|
||||
| 409 | Article already belongs to another parent, or variant value already exists |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Remove a child article from a father article
|
||||
Remove a child article from a parent article
|
||||
|
||||
Unlinks the child from the father (or deletes if deleteArticle query/body is true).
|
||||
Unlinks the child from the parent (or deletes if deleteArticle query/body is true).
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Father article SKU |
|
||||
| `sku` | yes | string | Parent article SKU |
|
||||
| `childSku` | yes | string | Child article SKU |
|
||||
|
||||
## Query parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `deleteArticle` | no | boolean | If true, permanently deletes the child article (and cascades its entire descendant subtree if it is a father) instead of just unlinking |
|
||||
| `deleteArticle` | no | boolean | If true, permanently deletes the child article (and cascades its entire descendant subtree if it is a parent) instead of just unlinking |
|
||||
|
||||
## Response `200`
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ 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 father article cannot have options. Can be combined with a Stückliste. Pass an empty array to remove options.
|
||||
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
|
||||
|
||||
@@ -53,7 +53,7 @@ Updated options list
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Article is a father, a Stückliste, or contains itself |
|
||||
| 400 | Article is a parent, a Stückliste, or contains itself |
|
||||
| 404 | Article or option article not found |
|
||||
|
||||
---
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
# `POST /article/{sku}/father`
|
||||
# `POST /article/{sku}/parent`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Toggle father mode for an article
|
||||
Toggle parent mode for an article
|
||||
|
||||
Enables or disables father article status. Enabling requires specifying an
|
||||
Enables or disables parent article status. Enabling requires specifying an
|
||||
attributeNameId; disabling requires the article to have zero children.
|
||||
|
||||
`attributeNameId` is **conditionally required**: it is optional in the schema
|
||||
because it is only required when `isFather` is `true`. Omitting it (or passing
|
||||
`0`/a negative value) together with `isFather: true` returns `400`
|
||||
`attributeNameId is required to become a father article`. It must not be sent
|
||||
when `isFather` is `false`.
|
||||
because it is only required when `isParent` is `true`. Omitting it (or passing
|
||||
`0`/a negative value) together with `isParent: true` returns `400`
|
||||
`attributeNameId is required to become a parent article`. It must not be sent
|
||||
when `isParent` is `false`.
|
||||
|
||||
|
||||
## Path parameters
|
||||
@@ -24,12 +24,12 @@ when `isFather` is `false`.
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `isFather` | yes | boolean | True to make article a father, false to revert to regular article |
|
||||
| `attributeNameId` | no | integer | **Conditionally required when `isFather` is `true`** (required iff isFather=true). The attributename id used for the article's variants. Omitting it while enabling father mode returns 400. Must be omitted when `isFather` is `false`. |
|
||||
| `isParent` | yes | boolean | True to make article a parent, false to revert to regular article |
|
||||
| `attributeNameId` | no | integer | **Conditionally required when `isParent` is `true`** (required iff isParent=true). The attributename id used for the article's variants. Omitting it while enabling parent mode returns 400. Must be omitted when `isParent` is `false`. |
|
||||
|
||||
```json
|
||||
{
|
||||
"isFather": true,
|
||||
"isParent": true,
|
||||
"attributeNameId": 1
|
||||
}
|
||||
```
|
||||
@@ -54,9 +54,9 @@ Updated article
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid input, `attributeNameId` missing while `isFather` is true, article still
|
||||
| 400 | Invalid input, `attributeNameId` missing while `isParent` is true, article still
|
||||
has children, article has stock/suppliers/a Stückliste/options, or the attribute is
|
||||
already used by an ancestor father article.
|
||||
already used by an ancestor parent article.
|
||||
|
|
||||
| 404 | Article or attribute name not found |
|
||||
|
||||
@@ -112,7 +112,7 @@ Updated article detail
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid prices, POS customer group required, or father article cannot have prices — `{"error":"…"}` |
|
||||
| 400 | Invalid prices, POS customer group required, or parent article cannot have prices — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Not authorized — `{"error":"…"}` |
|
||||
| 404 | Article not found — `{"error":"…"}` |
|
||||
|
||||
@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Articles in category
|
||||
|
||||
Returns articles in a category the user is authorized for (omits child articles of a father article). Each article includes `childCount` (the number of its child articles).
|
||||
Returns articles in a category the user is authorized for (omits child articles of a parent article). Each article includes `childCount` (the number of its child articles).
|
||||
|
||||
## Path parameters
|
||||
|
||||
|
||||
@@ -43,8 +43,8 @@ Article detail
|
||||
"eans": [
|
||||
"…"
|
||||
],
|
||||
"isFather": true,
|
||||
"fatherSku": "…",
|
||||
"isParent": true,
|
||||
"parentSku": "…",
|
||||
"variants": [
|
||||
{}
|
||||
]
|
||||
|
||||
@@ -77,7 +77,7 @@ Stock adjusted successfully
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Missing fields, invalid amount, father article cannot have stock, or no company selected — `{"error":"…"}` |
|
||||
| 400 | Missing fields, invalid amount, parent article cannot have stock, or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Not authorized — `{"error":"…"}` |
|
||||
| 404 | Article or warehouse not found — `{"error":"…"}` |
|
||||
|
||||
Reference in New Issue
Block a user