Files
dashback/docs/api/routes/article/_sku/children.put.md
2026-10-04 19:12:33 +02:00

1.5 KiB

PUT /article/{sku}/children

Protected. Requires a valid session cookie (credentials: 'include').

Attach an existing article as a child to a father article

Attaches an existing article to this father article. Idempotent if already a child. Returns 409 if the article already belongs to another father.

Path parameters

Param Required Type Description
sku yes string Father 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
{
  "sku": "…",
  "attributeValueId": 1,
  "value": "…",
  "reparent": true
}

Response 200

Attached child article and list of children

{
  "article": {
    "id": 1,
    "categoryId": 1,
    "name": "…",
    "sku": "…",
    "track_stock": true
  },
  "children": [
    {}
  ]
}

Errors

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

Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.