u
This commit is contained in:
62
docs/api/routes/public/_companyId/articles.md
Normal file
62
docs/api/routes/public/_companyId/articles.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# `GET /public/{companyId}/articles`
|
||||
|
||||
Public. No cookie required.
|
||||
|
||||
List public articles
|
||||
|
||||
Returns a paginated list of catalog articles for the specified company, optionally filtered by category.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `companyId` | yes | integer | Company ID |
|
||||
|
||||
## Query parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `categoryId` | no | integer | Optional category ID to filter by |
|
||||
| `search` | no | string | Search query for name or SKU |
|
||||
| `limit` | no | integer | Number of articles to return (max 200) |
|
||||
| `offset` | no | integer | Number of articles to skip |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Articles list
|
||||
|
||||
```json
|
||||
{
|
||||
"articles": [
|
||||
{
|
||||
"id": 1,
|
||||
"sku": "…",
|
||||
"name": "…",
|
||||
"slug": "…",
|
||||
"net": 1,
|
||||
"taxRate": 1,
|
||||
"gross": 1,
|
||||
"trackStock": true,
|
||||
"brand": {
|
||||
"id": 1,
|
||||
"name": "…"
|
||||
},
|
||||
"fullHash": "…",
|
||||
"thumbW": 1,
|
||||
"thumbH": 1,
|
||||
"thumbHash": "…"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid parameters — `{"error":"…"}` |
|
||||
| 404 | Company not found — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
64
docs/api/routes/public/_companyId/articles/_sku.md
Normal file
64
docs/api/routes/public/_companyId/articles/_sku.md
Normal file
@@ -0,0 +1,64 @@
|
||||
# `GET /public/{companyId}/articles/{sku}`
|
||||
|
||||
Public. No cookie required.
|
||||
|
||||
Get public article detail
|
||||
|
||||
Returns detailed public catalog data for a single article identified by SKU.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `companyId` | yes | integer | Company ID |
|
||||
| `sku` | yes | string | Article SKU |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Article detail
|
||||
|
||||
```json
|
||||
{
|
||||
"article": {
|
||||
"id": 1,
|
||||
"sku": "…",
|
||||
"name": "…",
|
||||
"slug": "…",
|
||||
"description": "…",
|
||||
"unitamount": 1,
|
||||
"weight": 1,
|
||||
"trackStock": true,
|
||||
"unit": {},
|
||||
"brand": {},
|
||||
"price": {},
|
||||
"prices": [
|
||||
{}
|
||||
],
|
||||
"categories": [
|
||||
{}
|
||||
],
|
||||
"photos": [
|
||||
{}
|
||||
],
|
||||
"eans": [
|
||||
"…"
|
||||
],
|
||||
"isFather": true,
|
||||
"fatherSku": "…",
|
||||
"variants": [
|
||||
{}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid parameters — `{"error":"…"}` |
|
||||
| 404 | Article or Company not found — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
46
docs/api/routes/public/_companyId/categories.md
Normal file
46
docs/api/routes/public/_companyId/categories.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# `GET /public/{companyId}/categories`
|
||||
|
||||
Public. No cookie required.
|
||||
|
||||
List public categories
|
||||
|
||||
Returns the category tree for the specified company.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `companyId` | yes | integer | Company ID |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Category list
|
||||
|
||||
```json
|
||||
{
|
||||
"categories": [
|
||||
{
|
||||
"id": 1,
|
||||
"parentId": 1,
|
||||
"sort": 1,
|
||||
"name": "…",
|
||||
"slug": "…",
|
||||
"fullHash": "…",
|
||||
"thumbW": 1,
|
||||
"thumbH": 1,
|
||||
"thumbHash": "…"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid parameters — `{"error":"…"}` |
|
||||
| 404 | Company not found — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user