This commit is contained in:
seb
2026-10-01 10:19:16 +02:00
parent 956fadcc8d
commit 8a7500cb5a
11 changed files with 59 additions and 19 deletions

View File

@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Add a child article to a father article
Automatically generates SKU as fatherSku-attributeValueId and assigns the variant attribute.
Automatically generates SKU as fatherSku-nextFreeIndex (or accepts custom sku) and assigns the variant attribute.
## Path parameters
@@ -19,12 +19,14 @@ Automatically generates SKU as fatherSku-attributeValueId and assigns the varian
| `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 |
| `name` | no | string | Optional custom variant name |
| `sku` | no | string | Optional custom SKU for the child article |
```json
{
"attributeValueId": 1,
"value": "…",
"name": "…"
"name": "…",
"sku": "…"
}
```
@@ -48,8 +50,7 @@ Created child article
| Status | Description |
|--------|-------------|
| 400 | Father not configured as father or missing value |
| 409 | Child SKU already exists |
| 400 | Father not configured as father, missing value, duplicate variant, or child SKU already exists |
---