---
title: Leggere un template di categoria
description: Leggere lo schema normativo completo di una categoria DPP — ogni campo con chiave, tipo, flag obbligatorio, livello di accesso e riferimento normativo.
canonical: "https://www.tracepass.eu/it/docs/get-template"
locale: it
source: "https://www.tracepass.eu/it/docs/get-template"
---

# Leggere un template di categoria

> Leggere lo schema normativo completo di una categoria DPP — ogni campo con chiave, tipo, flag obbligatorio, livello di accesso e riferimento normativo.

```http
GET /api/v1/templates/{category}
```

Restituisce lo schema normativo completo dei campi di una categoria DPP — ogni campo con la sua chiave, etichetta inglese, tipo di dato, flag obbligatorio, livello di accesso, limiti di validazione, opzioni enum (ove applicabile) e l'articolo/allegato del regolamento applicabile (`regulationRef`). È la ricerca che alimenta le integrazioni conformi e il compliance copilot del server MCP.

La proiezione è snella per i consumer API/IA: rimuove i suggerimenti IA interni, le mappe segnaposto multilingua e la gestione dell'ordinamento per campo, mantenendo la sostanza normativa. Le etichette sono restituite in inglese canonico; le mappe localizzate complete restano nell'API template del cruscotto.

`{category}` è una delle 12 chiavi di categoria (battery, textile, electronics, construction, steel, chemicals, packaging, furniture, tyres, jewelry, toys, fmcg). Una categoria sconosciuta restituisce 404 con codice `TEMPLATE_NOT_FOUND` — elencate le chiavi valide con `GET /api/v1/templates`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | header | string | yes | `Bearer <token>` — una chiave API `tp_` (Developer → API Keys; più semplice, per server-to-server) oppure un access token OAuth 2.0 (Developer → OAuth Apps; per app autorizzate dall'utente, scoped e revocabili). La pagina Authentication contiene il flusso OAuth completo e l'elenco degli scopes. |
| `category` | path | string | yes | Una delle 12 chiavi di categoria, ad es. `battery`, `textile`, `electronics`. |

## Examples

```bash
curl -sS https://app.tracepass.eu/api/v1/templates/battery \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"
```

```typescript
const res = await fetch(
  "https://app.tracepass.eu/api/v1/templates/battery",
  { headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` } },
);
if (res.status === 404) throw new Error("Unknown category");
const template = await res.json();
```

```python
import os, requests
res = requests.get(
    "https://app.tracepass.eu/api/v1/templates/battery",
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
)
res.raise_for_status()
template = res.json()
```

## Responses

### 200 — Successo

```json
{
  "category": "battery",
  "categoryLabel": "Battery",
  "version": 3,
  "regulation": "EU Battery Regulation 2023/1542",
  "fieldCount": 93,
  "requiredFieldCount": 64,
  "fields": [
    {
      "key": "battery_chemistry",
      "label": "Battery chemistry",
      "dataType": "enum",
      "required": true,
      "accessLevel": "public",
      "category": "Battery characteristics",
      "enumOptions": [
        { "value": "lithium-ion", "label": "Lithium-ion" },
        { "value": "lead-acid", "label": "Lead-acid" }
      ],
      "validation": {},
      "regulationRef": "Annex VI, Part A"
    }
  ]
}
```

### 404 — Categoria sconosciuta

```json
{
  "error": "No template for category \"widgets\". Use GET /api/v1/templates to list valid categories.",
  "code": "TEMPLATE_NOT_FOUND"
}
```

## Related

- [Elencare i template](https://www.tracepass.eu/it/docs/list-templates.md)
- [Aggiornare un campo](https://www.tracepass.eu/it/docs/update-field.md)
