u
This commit is contained in:
@@ -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 |
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user