# Preview API

Presentation Preview plugin depends on a frontend API to render a close to truth and very production-like HTML preview. Each web site (or product) needs to present the API as described in this documentation.

Naviga Web provides this API as part of the product, but with this documentation it should be possible to create a similar API with other Web presentations also.

![](/files/JC7TdfjFlO2oBj1OhlUV)

## API docs

## Article preview

<mark style="color:green;">`POST`</mark> `example.com/preview-api/v1/article`

Responds with html page representing similar to how that article would look like on this site/product.

#### Query Parameters

| Name                                   | Type   | Description           |
| -------------------------------------- | ------ | --------------------- |
| body<mark style="color:red;">\*</mark> | String | Json as example below |

{% tabs %}
{% tab title="200: OK Rendered article response application json" %}
{% code title="Response" %}

```json
{
  "success": true,
  "content": "article page as html here"
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request Not a valid API request" %}
{% code title="Response" %}

```javascript
{
    "success": false
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% code title="Request body" %}

```json
{
  "data": {
    "uuid": "article uuid here!" // Optional
    "meta": {
      "imengine" : "https://yes.hello", // The url of the editorial Imengine
      "concepts":  // Related concepts here
      [
        "13e5896f-e9c7-4481-8bb4-bd48bb69943d",
        "90a0891b-2804-4c89-9515-d042c2f23e18"
      ],
      "articles": // Related articles here
      [
        "13e5896f-e9c7-4481-8bb4-bd48bb69943d",
        "90a0891b-2804-4c89-9515-d042c2f23e18"
      ]
    },
    "content" : "NewsML idf xml here! Kan be found on the property 'BodyRaw' in public OC."
  }
}
```

{% endcode %}

{% hint style="info" %}
**Hint:** Presentation preview API response needs to be HTML, but it's not limited to Web sites only. You could in theory build your own renderer to simulate newsletters, mobile apps or other products if you like, as long as they provide this API.
{% endhint %}


---

# 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.navigaglobal.com/presentation-preview/developer-guide/preview-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.
