---
title: "Render a report. Remaining query parameters (period, mode, …) are passed to the report's data provider; its descriptor documents which ones it understands."
method: GET
path: "/Reports/{key}/render"
tags: ["Reports"]
---

# Render a report. Remaining query parameters (period, mode, …) are passed to the report's data provider; its descriptor documents which ones it understands.

`GET /Reports/{key}/render`

## Request

- Base URL: `https://api.clinicos.vet/backend/business`
- URL: `https://api.clinicos.vet/backend/business/Reports/{key}/render`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/docs/Reports/:key/render/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `key` string, required

## Query parameters

- `format` string
- `table` string
- `actions` string

## Response `200`

OK

- ReportDocument: Renderer-neutral report document (ITE-219). Providers build one of these from metrics queries; the PDF/CSV renderers and the web viewer consume it. Values stay raw and typed — display formatting (whole dollars, "23 min", "No data yet") lives exclusively in ReportValueFormatter per the v4 export spec (docs/reporting-spec-v4/).
  - `header` ReportHeader
    - `title` string
    - `subtitle` string, nullable
    - `clinicName` string
    - `periodLabel` string: Human period label, e.g. "Month to Date".
    - `generatedAt` string: Pre-formatted generation timestamp, e.g. "July 5, 2026 at 8:14 PM".
  - `sections` ReportSection[]
    - `title` string, nullable
    - `accent` 'Blue' | 'Green' | 'Orange' | 'Teal' | 'Purple' | 'Grey': Section accent palette — fixed set so PDF and web stay consistent.
    - `pageBreakAfter` boolean: Start a new PDF page after this section (ignored by CSV/web).
    - `blocks` ReportBlock[]
      - union
        - object
          - `kind` 'statCards', required
          - `cards` ReportStatCard[]
            - `label` string
            - `value` ReportValue: A single typed cell/card value. Exactly one of decimal? ReportValue.Number / string? ReportValue.Text carries the payload depending on ReportValueType ReportValue.Type; ReportValueState ReportValue.State overrides both ("No data yet" / "Not configured" are states, never fake zeros).
              - …
            - `caption` string, nullable: Small line under the label, e.g. "+12.1%" or "$23 saved".
            - `captionTone` 'Neutral' | 'Positive' | 'Negative'
          - `targets` string: Which outputs a block appears in. Lets a provider ship e.g. a CSV-only KPI table alongside the stat cards that render the same data in PDF/web.
        - object
          - `kind` 'table', required
          - `key` string: Stable key used to address this table in CSV exports (?table=pnl).
          - `title` string, nullable
          - `subtitle` string, nullable
          - `columns` ReportColumn[]
            - `key` string
            - `label` string
            - `type` 'Text' | 'CurrencySummary' | 'CurrencyExact' | 'Percent' | 'Count' | 'Duration' | 'Status' | 'Date' | 'Trend'
            - `relativeWidth` union: Relative width weight (QuestPDF RelativeColumn). Ignored when FixedWidth set.
              - …
            - `fixedWidth` union
              - …
            - `align` unknown
            - `targets` string: Which outputs a block appears in. Lets a provider ship e.g. a CSV-only KPI table alongside the stat cards that render the same data in PDF/web.
          - `rows` ReportRow[]
            - `cells` object
            - `style` 'Normal' | 'Header' | 'Total'
            - `indent` union: Hierarchy depth for ledger-style tables; renders as left padding.
              - …
          - `pdfRowLimit` union: Cap rows in the PDF rendering only; CSV/JSON always carry all rows.
            - integer
            - string, int32
          - `dense` boolean: Smaller font / tighter padding in PDF (dense ledgers like transactions).
          - `csvIncludeStyleColumns` boolean: Append row style + indent as trailing CSV columns (hierarchical ledgers).
          - `targets` string: Which outputs a block appears in. Lets a provider ship e.g. a CSV-only KPI table alongside the stat cards that render the same data in PDF/web.
        - object
          - `kind` 'actions', required
          - `title` string
          - `actions` ReportAction[]
            - `action` string
            - `owner` string, nullable
            - `due` string, nullable
            - `rationale` string, nullable
          - `targets` string: Which outputs a block appears in. Lets a provider ship e.g. a CSV-only KPI table alongside the stat cards that render the same data in PDF/web.
        - object
          - `kind` 'note', required
          - `text` string
          - `tone` 'Info' | 'Warning' | 'Rule'
          - `targets` string: Which outputs a block appears in. Lets a provider ship e.g. a CSV-only KPI table alongside the stat cards that render the same data in PDF/web.

## Other responses

- `400`: Bad Request
- `404`: Not Found

## Changes

- **2026-08-07** `a905bde4e796`: 12 info
  - added the optional property `sections/items/blocks/items/anyOf[#/components/schemas/ReportBlockStatCardsBlock]/cards/items/value/entityId` to the response with the `200` status (media type: text/plain)
  - added the optional property `sections/items/blocks/items/anyOf[#/components/schemas/ReportBlockStatCardsBlock]/cards/items/value/entityId` to the response with the `200` status (media type: application/json)
  - added the optional property `sections/items/blocks/items/anyOf[#/components/schemas/ReportBlockStatCardsBlock]/cards/items/value/entityId` to the response with the `200` status (media type: text/json)
  - added the optional property `sections/items/blocks/items/anyOf[#/components/schemas/ReportBlockStatCardsBlock]/cards/items/value/entityKind` to the response with the `200` status (media type: text/plain)
  - …8 more

[Operation history](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/changes/Reports/:key/render/get.md)

---

[API](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1.md) - [All operations](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/clinicos/apis/pawthosx-business-api-v1/revisions/099cf36186e0?raw)
