This commit is contained in:
seb
2026-09-29 16:16:03 +02:00
parent b92e2deb41
commit 7f3558b4cb
34 changed files with 3112 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
# `GET /article/{sku}/attributevalue`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List article attribute values
Fetches all attribute values assigned to an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Response `200`
List of attribute values assigned to this article
```json
{
"attributevalues": [
{
"id": 1,
"articleId": 1,
"attributeId": 1,
"attributeName": "…",
"exclusive": true,
"attributeValueId": 1,
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,48 @@
# `PUT /article/{sku}/attributevalue`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Bulk set article attribute values
Replaces all attribute values for an article. Enforces exclusive constraint (max one value per exclusive attribute).
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Body (JSON)
```json
{
"attributevalues": [
"…"
]
}
```
## Response `200`
Updated article attribute values
```json
{
"attributevalues": [
{
"id": 1,
"articleId": 1,
"attributeId": 1,
"attributeName": "…",
"exclusive": true,
"attributeValueId": 1,
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,36 @@
# `GET /article/{sku}/property`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List article properties
Fetches all free-form properties set on an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Response `200`
List of properties for this article
```json
{
"properties": [
{
"id": 1,
"articleId": 1,
"propertyId": 1,
"name": "…",
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,50 @@
# `PUT /article/{sku}/property`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Bulk set article properties
Replaces all properties for an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Body (JSON)
```json
{
"properties": [
{
"propertyId": 1,
"value": "…",
"sort": 1
}
]
}
```
## Response `200`
Updated article properties
```json
{
"properties": [
{
"id": 1,
"articleId": 1,
"propertyId": 1,
"name": "…",
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,22 @@
# `DELETE /article/{sku}/property/{propertyId}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete article property
Removes a single property from an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | |
| `propertyId` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,36 @@
# `GET /attributename`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List attribute names
Lists all attribute names defined for the selected company, including nested values.
## Response `200`
List of attribute names
```json
{
"attributenames": [
{
"id": 1,
"name": "…",
"sort": 1,
"exclusive": true,
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,44 @@
# `POST /attributename`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create attribute name
Creates an attribute name for the selected company.
## Body (JSON)
```json
{
"name": "…",
"sort": 1,
"exclusive": true
}
```
## Response `201`
Created attribute name
```json
{
"attributename": {
"id": 1,
"name": "…",
"sort": 1,
"exclusive": true,
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,34 @@
# `GET /attributename/{attributeId}/value`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List values for an attribute
Lists all values for a specific attribute.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `attributeId` | yes | integer | |
## Response `200`
List of attribute values
```json
{
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,41 @@
# `POST /attributename/{attributeId}/value`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create value for an attribute
Adds a new predefined value to an attribute.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `attributeId` | yes | integer | |
## Body (JSON)
```json
{
"value": "…",
"sort": 1
}
```
## Response `201`
Created attribute value
```json
{
"attributevalue": {
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,31 @@
# `PUT /attributename/{attributeId}/value/order`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Reorder values of an attribute
Updates the display sort order of values belonging to an attribute.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `attributeId` | yes | integer | |
## Body (JSON)
```json
{
"attributevalueIds": [
1
]
}
```
## Response `200`
Reordered successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /attributename/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete attribute name
Deletes an attribute name and cascades to attribute values and article assignments.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,50 @@
# `PATCH /attributename/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update attribute name
Updates name, sort, and/or exclusive flag for an attribute name.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Body (JSON)
```json
{
"name": "…",
"sort": 1,
"exclusive": true
}
```
## Response `200`
Updated attribute name
```json
{
"attributename": {
"id": 1,
"name": "…",
"sort": 1,
"exclusive": true,
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,25 @@
# `PUT /attributename/order`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Reorder attribute names
Updates the display sort order of attribute names for the selected company.
## Body (JSON)
```json
{
"attributenameIds": [
1
]
}
```
## Response `200`
Reordered successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /attributevalue/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete attribute value
Deletes an attribute value and cascades to article assignments.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,41 @@
# `PATCH /attributevalue/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update attribute value
Updates value text and/or sort for an attribute value.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Body (JSON)
```json
{
"value": "…",
"sort": 1
}
```
## Response `200`
Updated attribute value
```json
{
"attributevalue": {
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,33 @@
# `GET /propertyname`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List property names
Lists all property names defined for the selected company, ordered by sort.
## Response `200`
List of property names
```json
{
"propertynames": [
{
"id": 1,
"name": "…",
"sort": 1
}
]
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | No company selected — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,40 @@
# `POST /propertyname`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create property name
Creates a new property name for the selected company.
## Body (JSON)
```json
{
"name": "…",
"sort": 1
}
```
## Response `201`
Created property name
```json
{
"propertyname": {
"id": 1,
"name": "…",
"sort": 1
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Bad request — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /propertyname/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete property name
Deletes a property name and cascades to article properties.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,40 @@
# `PATCH /propertyname/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update property name
Updates name and/or sort for a property name.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Body (JSON)
```json
{
"name": "…",
"sort": 1
}
```
## Response `200`
Updated property name
```json
{
"propertyname": {
"id": 1,
"name": "…",
"sort": 1
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,31 @@
# `PUT /propertyname/order`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Reorder property names
Updates the display sort order of property names for the selected company.
## Body (JSON)
```json
{
"propertynameIds": [
1
]
}
```
## Response `200`
Reordered successfully
## Errors
| Status | Description |
|--------|-------------|
| 400 | Bad request |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._