This commit is contained in:
seb
2026-10-04 21:22:00 +02:00
parent 6777f423d8
commit 45369d11da
16 changed files with 133 additions and 61 deletions

View File

@@ -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 |
---