---
title: "Render one invoice as an HTML page or as its printed pages"
description: "Other routes API"
---

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

# Render one invoice as an HTML page or as its printed pages

{/* Generated by apps/docs/scripts/generate.ts from contracts/api/openapi.yaml. Do not edit. */}
<div class="cvo-op">
<div class="cvo-op-main">

<div class="cvo-op-header">
<div class="cvo-op-path-row">
<span class="cvo-method" data-method="post">POST</span>
<code class="cvo-op-path-code">/v1/previews</code>
</div>
</div>

Accepts one canonical JSON invoice, UBL or CII XML invoice, or ZUGFeRD PDF and returns a self-contained HTML visualization. The page contains no scripts and loads no external assets. It is not the original invoice, a validation report, a PDF, or an archival artefact.

With `format=pages` it returns the invoice's printed A4 pages instead, each page as a PNG image, in the order they print. They are the pages the invoice's PDF prints. No PDF is returned.

No retained invoice is created. The workspace plan must include conversion for canonical JSON or validation for XML and PDF. Its decoded-byte limit applies to the raw request, and the preview reserves one document from the plan assignment's quota. A preview that fails, for example because the document cannot be read, gives that document back.

The page is drawn in the organisation's saved layout. `template` draws it in the other template, and `side=received` draws an invoice the organisation received, in its template without its logo or texts.

## Query parameters

## Request body

`application/json`, required

`application/xml`, required: string

`application/pdf`, required: string (binary)

`application/octet-stream`, required: string (binary)

## Status codes

| Status | Meaning |
|---|---|
| `200` | A scriptless HTML visualization of the invoice, or with `format=pages` its printed pages. |
| `400` | The invoice was refused (`invalid_invoice`, `unreadable_document`, `empty_document`, or `operation_too_large`), or a query parameter is not one of its values (`invalid_query`). |
| `401` | No usable credential was sent (`invalid_credentials`). |
| `403` | No workspace plan is in force (`workspace_plan_unavailable`), the workspace is closed (`workspace_closed`), or the required validation or conversion feature is not included (`operation_not_included`). |
| `413` | The raw document exceeds 10 MB (`document_too_large`) or expands past the reader limit (`file_too_large_to_read`). |
| `429` | The current plan assignment has no remaining document quota (`document_quota_exceeded`). Nothing was accepted. |
| `502` | The document reader or the printer could not run (`engine_unavailable`). |

</div>
<div class="cvo-op-aside">

</div>
</div>

Source: https://docs.certinvo.com/reference/api/other/render-one-invoice-as-an-html-page-or-as-its-printed-pages/index.mdx
