u
This commit is contained in:
44
docs/api/routes/article/_sku/children.post.md
Normal file
44
docs/api/routes/article/_sku/children.post.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# `POST /article/{sku}/children`
|
||||
|
||||
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.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Father article SKU |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
```json
|
||||
{
|
||||
"attributeValueId": 1,
|
||||
"value": "…",
|
||||
"name": "…"
|
||||
}
|
||||
```
|
||||
|
||||
## Response `201`
|
||||
|
||||
Created child article
|
||||
|
||||
```json
|
||||
{
|
||||
"article": {}
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Father not configured as father or missing value |
|
||||
| 409 | Child SKU already exists |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user