---
title: Get a category template
description: Get the full regulatory schema for one DPP category — every field with its key, type, required flag, access level, and governing regulation reference.
canonical: "https://www.tracepass.eu/docs/get-template"
locale: en
source: "https://www.tracepass.eu/docs/get-template"
---

# Get a category template

> Get the full regulatory schema for one DPP category — every field with its key, type, required flag, access level, and governing regulation reference.

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

Returns the full regulatory field schema for one DPP category — every field with its key, English label, data type, required flag, access level, validation bounds, enum options (where applicable), and the governing regulation article/annex (`regulationRef`). This is the lookup that powers compliance-aware integrations and the MCP server's compliance copilot.

The projection is lean for API/AI consumers: it drops internal AI hints, the multilingual placeholder maps, and per-field sort bookkeeping, keeping the regulatory substance. Labels are returned in canonical English; the full localized label maps stay on the dashboard template API.

`{category}` is one of the 12 category keys (battery, textile, electronics, construction, steel, chemicals, packaging, furniture, tyres, jewelry, toys, fmcg). An unknown category returns 404 with a `TEMPLATE_NOT_FOUND` code — list valid keys with `GET /api/v1/templates`.

## 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. |
| `category` | path | string | yes | One of the 12 category keys, e.g. `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 — Success

```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 — Unknown category

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

## Related

- [List category templates](https://www.tracepass.eu/docs/list-templates.md)
- [Update a passport field](https://www.tracepass.eu/docs/update-field.md)
