Returns all documents of a given datatype from the active search index. Useful for browsing all available documents of a certain type without a search phrase.
Requires authentication.
Request
GET /documents/list/{dataType}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataType | string | Yes | The document type to list. Common values: product, category, manufacturer. |
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Example Request
GET /documents/list/category
Authorization: Bearer <token>
Response
Returns a JSON array of document objects from the default language index.
Response Body
Each object in the array contains:
| Field | Type | Description |
|---|---|---|
id | string | Document identifier. |
es_id | string | Elasticsearch document ID. |
title | string | Display title of the document. |
url | string | URL of the document. |
type | string | Document type. |
selfLinks | object | Self-referencing links for the document. |
manufacturer_title | string | Manufacturer name (for products). |
category_title | string | Category name (for products). |
ean | string | EAN/barcode (for products). |
Example Response
[
{
"id": "cat-123",
"es_id": "category_cat-123",
"title": "Men's Shoes",
"url": "/men/shoes",
"type": "category",
"selfLinks": {},
"manufacturer_title": null,
"category_title": null,
"ean": null
},
{
"id": "cat-456",
"es_id": "category_cat-456",
"title": "Women's Shoes",
"url": "/women/shoes",
"type": "category",
"selfLinks": {},
"manufacturer_title": null,
"category_title": null,
"ean": null
}
]
