---
title: Render the model page QR
description: "Render the QR code of a product's model page (/01/{gtin}) as SVG or PNG: the code for an online listing or a dealer. Black on a transparent background."
canonical: "https://www.tracepass.eu/docs/get-product-model-qr"
locale: en
source: "https://www.tracepass.eu/docs/get-product-model-qr"
---

# Render the model page QR

> Render the QR code of a product's model page (/01/{gtin}) as SVG or PNG: the code for an online listing or a dealer. Black on a transparent background.

```http
GET /api/v1/products/{id}/links/model-qr
```

Renders the QR code of the product's model page, the bare GS1 address `/01/{gtin}` listed in `GET /api/v1/products/{id}/links`. The model page shows only the public values identical across every published unit, so the code suits an online listing or a dealer; each unit keeps its own passport. Black on a transparent background. Counts as one v1 read.

Answers 404 `model_not_found` when the product has no published GS1 passport with that GTIN (so no model page), 400 `invalid_gtin` when `gtin` is not 14 digits, and 400 `gtin_required` when the product's published passports carry more than one GTIN and `gtin` is missing.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | header | string | yes | `Bearer <token>` — either a `tp_` API key (Developer → API Keys; simplest, for server-to-server) or an OAuth 2.0 access token (Developer → OAuth Apps; for user-authorized apps, scoped + revocable). The Authentication page has the full OAuth flow and scope list. |
| `id` | path | string (24 hex chars) | yes | Product ID. |
| `format` | query | string | no | `svg` (default) or `png`. |
| `gtin` | query | string (14 digits) | no | Needed only when the product's published passports carry more than one GTIN. |

## Examples

```bash
# SVG (default)
curl -sS https://app.tracepass.eu/api/v1/products/6650a1b2c3d4e5f6a7b8c9d0/links/model-qr \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" -o model-qr.svg

# PNG for one GTIN
curl -sS "https://app.tracepass.eu/api/v1/products/6650a1b2c3d4e5f6a7b8c9d0/links/model-qr?format=png&gtin=09506000134352" \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx" -o model-qr.png
```

```typescript
const url = new URL(
  `https://app.tracepass.eu/api/v1/products/${id}/links/model-qr`,
);
url.searchParams.set("format", "png");

const res = await fetch(url, {
  headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` },
});
if (!res.ok) throw new Error(`Model QR failed: ${res.status}`);
const pngBytes = new Uint8Array(await res.arrayBuffer());
```

```python
import os, requests
res = requests.get(
    f"https://app.tracepass.eu/api/v1/products/{product_id}/links/model-qr",
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
    params={"format": "png"},
)
res.raise_for_status()
open("model-qr.png", "wb").write(res.content)
```

## Responses

### 200 — SVG

```json
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 29 29">
  <!-- QR modules encoding https://id.tracepass.eu/01/<gtin> -->
</svg>
```

### 400 — GTIN required

```json
{ "error": "gtin_required", "message": "This product has published passports under more than one GTIN; pass ?gtin=.", "gtins": ["09506000134352", "09506000134369"] }
```

### 404 — No model page

```json
{ "error": "model_not_found", "message": "This product has no model page for that GTIN." }
```

## Related

- [Get the dealer link pack](https://www.tracepass.eu/docs/get-product-links.md)
- [Render the passport QR](https://www.tracepass.eu/docs/passport-qr.md)
