> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yourhomie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PDP-Fragenset abrufen

> Rufe das öffentliche Set vorgeschlagener Produktfragen für eine Produktseite ab.

Rufe die vorgeschlagenen Fragen für eine bestimmte Produktdetailseite (PDP) ab. Dieser Endpunkt ist öffentlich und CORS-fähig, sodass du ihn direkt aus dem Browser eines Storefronts aufrufen kannst.

<Info>
  Dies ist der einzige öffentliche Endpunkt der REST API. Er benötigt **keinen** `x-api-key`-Header.
</Info>

## Request

<ParamField path="organizationId" type="string" required>
  ID der Organisation, der das Fragenset gehört.
</ParamField>

<ParamField query="url" type="string" required>
  Die URL der Produktdetailseite. Der Server kanonisiert die URL vor dem Abgleich.
</ParamField>

## Response

Die Response ist ein `PdpQuestionsSetDto`.

<ResponseField name="id" type="string" required>
  ID des Fragensets.
</ResponseField>

<ResponseField name="organizationId" type="string" required>
  ID der Organisation, der das Fragenset gehört.
</ResponseField>

<ResponseField name="url" type="string" required>
  Die kanonisierte PDP-URL, zu der das Fragenset gehört.
</ResponseField>

<ResponseField name="productTitle" type="string">
  Titel des Produkts oder `null`, wenn unbekannt.
</ResponseField>

<ResponseField name="requests" type="integer">
  Anzahl, wie oft das Fragenset angefragt wurde.
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  ISO-8601-Zeitstempel, wann das Fragenset erstellt wurde.
</ResponseField>

<ResponseField name="questions" type="object[]" required>
  Die vorgeschlagenen Fragen, sortiert nach Rang.

  <Expandable title="PdpQuestionDto">
    <ResponseField name="id" type="string" required>
      ID der Frage.
    </ResponseField>

    <ResponseField name="text" type="string" required>
      Der Fragetext.
    </ResponseField>

    <ResponseField name="rank" type="integer" required>
      Priorität der Frage. `1` ist die höchste Priorität.
    </ResponseField>
  </Expandable>
</ResponseField>

## Beispiele

<CodeGroup>
  ```bash cURL theme={null}
  curl -G https://api.yourhomie.ai/v1/knowledge/pdp-questions/11111111-2222-3333-4444-555555555555/public \
    --data-urlencode "url=https://shop.example.com/p/produkt-abc-12345"
  ```

  ```javascript JavaScript (fetch) theme={null}
  const organizationId = "11111111-2222-3333-4444-555555555555";
  const pdpUrl = "https://shop.example.com/p/produkt-abc-12345";

  const res = await fetch(
    `https://api.yourhomie.ai/v1/knowledge/pdp-questions/${organizationId}/public?url=${encodeURIComponent(pdpUrl)}`,
  );

  const questionSet = await res.json();
  ```
</CodeGroup>

### Erfolgreiche Response

```json theme={null}
{
  "id": "49113e90-6e30-42d1-8c02-a697c6b47f01",
  "organizationId": "11111111-2222-3333-4444-555555555555",
  "productTitle": null,
  "url": "https://shop.example.com/p/produkt-abc-12345",
  "requests": 12,
  "createdAt": "2025-10-16T11:44:41.140Z",
  "questions": [
    {
      "id": "f5ae1f7e-9680-497a-b2d6-afbbb1203408",
      "text": "What are the dimensions of the product?",
      "rank": 1
    },
    {
      "id": "8e0ab7fe-0e23-4efe-835b-8106f9cca314",
      "text": "What material is it made of?",
      "rank": 2
    }
  ]
}
```

### Fehler-Response

```json theme={null}
{
  "message": "No question set found for this URL"
}
```


## OpenAPI

````yaml api-reference/openapi.json GET /v1/knowledge/pdp-questions/{organizationId}/public
openapi: 3.0.0
info:
  title: homie AI API
  description: The homie AI API description
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.yourhomie.ai
    description: Production server
security: []
tags:
  - name: Chat
    description: ''
  - name: Knowledge
    description: Public, CORS-enabled endpoints for PDP question sets
paths:
  /v1/knowledge/pdp-questions/{organizationId}/public:
    get:
      tags:
        - PDP Questions
      summary: Get PDP Question Set
      operationId: KnowledgePdpQuestionsController_publicGetQuestions_v1
      parameters:
        - name: organizationId
          required: true
          in: path
          schema:
            type: string
        - name: url
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object

````