# Store API

The FAQ Manager plugin provides a Store API endpoint that can be used for headless projects or custom storefront implementations.

## Load FAQs for a Product

Returns the resolved FAQ groups (with their entries), the active plugin configuration and the `FAQPage` rich snippet for the given product. The payload mirrors what the regular Storefront uses to render the product detail page, so a headless app can render the same view without a second round-trip for metadata.

**Endpoint:** `GET /store-api/prems-faq/product/{productId}`

(`POST` is also accepted on the same path.)

**Login required:** No

**Parameters:**

| Parameter   | Type   | Required | Description                              |
| ----------- | ------ | -------- | ---------------------------------------- |
| `productId` | string | Yes      | The UUID of the product (URL parameter). |

**Response:** `200 OK` with a JSON body containing:

| Field         | Type   | Description                                                                                                                                                                                                                                                                             |
| ------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `groups`      | array  | The matching FAQ groups, ordered by priority. Each group includes its translated `name`, `description`, the `descriptionVisibility` override and an `entries` array with the active entries. Subscription limits (group count, entry count, blocked content types) are already applied. |
| `config`      | object | The active plugin configuration: `active` (bool), `placement` (string) and `descriptionVisibility` (string, the plugin-wide default).                                                                                                                                                   |
| `richSnippet` | object | The `FAQPage` JSON-LD payload for the resolved entries. Empty when no entries match.                                                                                                                                                                                                    |

When the plugin is not active for the current sales channel, an empty payload is returned (empty `groups`, the current `config`, an empty `richSnippet`).

**Errors:**

* `404 Not Found` – The product does not exist or is not accessible in the current sales channel context.


---

# 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/faq-products-+-shopping-experiences/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.
