Files
dashback/docs/api/routes/public/_companyId/articles.md
2026-10-03 23:13:36 +02:00

63 lines
1.3 KiB
Markdown

# `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`._