# Store API

PremsManufacturer provides three store-api routes for retrieving manufacturer data from composable storefronts or custom frontends.

## Load Manufacturer List

Returns a paginated list of manufacturers, optionally filtered by starting letter or search term.

**Endpoint:** `POST /store-api/prems-manufacturer/list`\
**Login required:** No

| Parameter | Type   | Required | Description                                                 |
| --------- | ------ | -------- | ----------------------------------------------------------- |
| `page`    | int    | No       | Page number (starting at 1). Default: 1.                    |
| `limit`   | int    | No       | Number of manufacturers per page. Default: 24.              |
| `letter`  | string | No       | Starting letter (A–Z) or "0-9" for numeric manufacturers.   |
| `search`  | string | No       | Search term inside the manufacturer name (contains filter). |

**Response:** Returns a manufacturer collection with total count and — if the Advanced version is active — a list of letters that have at least one manufacturer for the A-Z navigation.

**Errors:**

* The free version returns at most 5 manufacturers; the A-Z letter list is empty.

## Load Manufacturer Detail

Returns a single manufacturer including a fully-featured product listing.

**Endpoint:** `POST /store-api/prems-manufacturer/detail/{manufacturerId}`\
**Login required:** No

| Parameter                                                                                         | Type   | Required | Description                                                                                 |
| ------------------------------------------------------------------------------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------- |
| `manufacturerId`                                                                                  | string | Yes      | Manufacturer ID, taken from the URL path.                                                   |
| `order`                                                                                           | string | No       | Sorting key (see `core.listing.defaultSorting`).                                            |
| `p`                                                                                               | int    | No       | Product list page.                                                                          |
| `limit`                                                                                           | int    | No       | Products per page.                                                                          |
| `manufacturer-filter`, `rating-filter`, `price-filter`, `shipping-free-filter`, `property-filter` | bool   | No       | Toggles individual listing filters (same semantics as Shopware's standard listing filters). |

**Response:** Returns the manufacturer entity and the product listing with available sortings, aggregations, applied filters, and the current filter state.

**Errors:**

* `404` – No manufacturer exists with the given ID.

## Manufacturer Suggest

Returns a reduced manufacturer list for the search suggest dropdown in the header.

**Endpoint:** `POST /store-api/prems-manufacturer/suggest`\
**Login required:** No

| Parameter | Type   | Required | Description                                             |
| --------- | ------ | -------- | ------------------------------------------------------- |
| `search`  | string | No       | Search term (contains filter on the manufacturer name). |
| `limit`   | int    | No       | Maximum number of results (1–20). Default: 5.           |

**Response:** Returns a small manufacturer collection including the logo media association.

**Errors:**

* This route is only available in the Advanced version; the free version always returns an empty collection.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.premsoft.de/en/plugins/manufacturer-list-and-detailpage/store-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
