---
title: "Render the QR artifact (PNG / SVG / PDF)"
method: GET
path: "/api/v1/codes/{id}/qr"
tags: ["artifacts"]
---

# Render the QR artifact (PNG / SVG / PDF)

`GET /api/v1/codes/{id}/qr`

## Request

- Base URL: `https://app.qrtap.kg`
- URL: `https://app.qrtap.kg/api/v1/codes/{id}/qr`
- Auth: HTTP bearer

Renders the code's QR artifact. The QR always encodes the stable short URL, never the destination. PNG output is decode-verified before return; when the code has a design template, the branded render is rasterised and re-decoded, and the logo is scaled back or dropped if it hurts scannability. The `X-QRTap-QA` response header reports the outcome: `branded` (logo at requested size), `downgraded` (logo shrunk/dropped to keep the code scannable) or `plain` (no template). Captions are drawn into SVG output only. Caption text is screened against Kyrgyz advertising law (Article 17, Law No. 121 'On advertising'): promo wording (discounts, bonuses, gifts, promo codes) is refused with 422 before any render.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `format` 'png' | 'svg' | 'pdf'
- `size` integer
- `caption` string
- `errorCorrection` 'M' | 'Q' | 'H'

## Response `200`

The rendered artifact. `Cache-Control: public, max-age=86400`.

## Other responses

- `400`: `invalid_id` or `invalid_request` (bad format/size/errorCorrection).
- `401`: Missing, invalid or revoked API key.
- `404`: No such object in your organization.
- `422`: The caption contains promo wording prohibited by Article 17 of the Kyrgyz advertising law (stocks, discounts, bonuses, gifts, promo codes). The artifact is not rendered.
- `429`: Limit exceeded — the request had no effect. `error` is `rate_limited` with `scope: "minute"` (a burst brake: wait `retry_after` seconds and continue) or `quota_exceeded` with `scope: "day"` (the workspace's daily quota, counted in UTC; it returns at `reset_at`, the next UTC midnight, and only a higher plan raises it before then).
- `500`: Decode verification of the rendered PNG failed (`qa_failed`). Safe to retry.

---

[API](https://skmtc.dev/qrtap/apis/qrtap-rest-api.md) · [All operations](https://skmtc.dev/qrtap/apis/qrtap-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qrtap/apis/qrtap-rest-api/revisions/8af17ac525bd?raw)
