1.4 KiB
1.4 KiB
GET /articleIndex
Protected. Requires a valid session cookie (credentials: 'include').
List article search index
Returns every article reachable via the company's category tree. Designed for client-side search / autocomplete preload. Auth via company access.
REQUIRES windowSize. Without it the response is always an empty list — the full
index can be very large and is not useful to a caller that did not ask for a
specific window. Pass the number of entries the client actually intends to preload.
Query parameters
| Param | Required | Type | Description |
|---|---|---|---|
windowSize |
yes | integer | Number of articles to return (window size). Required; omitting it returns an |
empty articles array. truncated is true when more entries exist than were |
|||
| returned, signalling the client should request a larger window or narrow its | |||
| query. | |||
Response 200
Search index
{
"articles": [
{
"id": 1,
"sku": "…",
"name": "…",
"eans": [
"…"
],
"categoryIds": [
1
]
}
],
"truncated": true
}
Errors
| Status | Description |
|---|---|
| 400 | No company selected — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
| 404 | Company not found — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.