TracePass
Templates

Get a category template

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.

GET/api/v1/templates/{category}
Download OpenAPI 3.1
GET/api/v1/templates/{category}

Get a category template

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`.

Path parameters

  • categoryrequired

    string

    One of the 12 category keys, e.g. `battery`, `textile`, `electronics`.

    e.g. battery

Headers

  • Authorizationrequired

    string

    `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.

    e.g. Bearer tp_REDACTED_xxxxxxxxxxxx

Request

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

Response

{
  "category": "battery",
  "categoryLabel": "Battery",
  "version": 1,
  "regulation": "EU Battery Regulation 2023/1542",
  "fieldCount": 117,
  "requiredFieldCount": 59,
  "requiredFieldCountByCategory": {
    "EV": 85,
    "LMT": 88,
    "industrial_gt_2kwh": 70
  },
  "fields": [
    {
      "key": "batteryChemistry",
      "label": "Battery Chemistry",
      "dataType": "string",
      "required": true,
      "accessLevel": "public",
      "category": "materials_composition",
      "validation": { "required": true },
      "regulationRef": { "article": "Art. 77", "annex": "Annex VI" }
    }
  ]
}