u
This commit is contained in:
43
docs/api/routes/article/_sku/father.md
Normal file
43
docs/api/routes/article/_sku/father.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# `POST /article/{sku}/father`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Toggle father mode for an article
|
||||
|
||||
Enables or disables father article status. Enabling requires specifying an attributeNameId; disabling requires the article to have zero children.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `sku` | yes | string | Article SKU |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
```json
|
||||
{
|
||||
"isFather": true,
|
||||
"attributeNameId": 1
|
||||
}
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
Updated article
|
||||
|
||||
```json
|
||||
{
|
||||
"article": {}
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid input or article still has children |
|
||||
| 404 | Article or attribute name not found |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user