List documents by type

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

ParameterTypeRequiredDescription
dataTypestringYesThe document type to list. Common values: product, category, manufacturer.

Headers

HeaderValue
AuthorizationBearer <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:

FieldTypeDescription
idstringDocument identifier.
es_idstringElasticsearch document ID.
titlestringDisplay title of the document.
urlstringURL of the document.
typestringDocument type.
selfLinksobjectSelf-referencing links for the document.
manufacturer_titlestringManufacturer name (for products).
category_titlestringCategory name (for products).
eanstringEAN/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
  }
]