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

# Get Roadmap Result (HTML)

> Retrieve a fully rendered HTML cognitive roadmap report for embedding, printing, or PDF generation from a completed multi-test package.

Use this endpoint to retrieve a fully rendered HTML report for a completed cognitive roadmap. The response contains the complete HTML document inside the standard JSON envelope, making it easy to embed directly in your portal, print, or convert to PDF.

## Prerequisites

The roadmap must be finished (`is_finished: true`). If the roadmap is not yet complete, the endpoint returns a 409 error. Confirm completion by polling `/roadmap/{token}/generate/status/` first.

## Endpoint

```http theme={"dark"}
GET https://braintest.ir/api/v2/roadmap/{token}/result/html/
```

## Path Parameters

<ParamField path="token" type="string" required>
  The unique cognitive roadmap instance UUID.
</ParamField>

## Response

<ResponseField name="data.html" type="string">
  The fully rendered HTML report as a string. Wrap this content in an iframe or render it directly in your application.
</ResponseField>

## Example Request

```bash theme={"dark"}
curl -X GET "https://braintest.ir/api/v2/roadmap/b2c3d4e5-f6a7-8901-bcde-f12345678901/result/html/" \
  -H "API-KEY: YOUR_API_KEY"
```

## Example Response

```json theme={"dark"}
{
  "data": {
    "html": "<html><body><h1>Cognitive Roadmap Report</h1>...</body></html>"
  },
  "successful": true,
  "messages": []
}
```

## Use Cases

<CardGroup cols={2}>
  <Card title="Portal Embedding" icon="window">
    Inject the HTML into an iframe or render it directly inside your participant dashboard for immediate viewing.
  </Card>

  <Card title="Print & PDF" icon="file-pdf">
    Use browser print-to-PDF or a headless rendering tool to generate a downloadable PDF report from the HTML content.
  </Card>
</CardGroup>

## Error Responses

| HTTP | Cause                    |
| ---- | ------------------------ |
| 404  | Roadmap not found        |
| 409  | Roadmap not yet finished |
