> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tapace.lk/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a template

> Returns one template with its full definition.

Use this to find the field keys a pass needs, or to copy a dashboard design as a starting point for [creating a template](/api-reference/templates/create).

<ParamField path="id" type="string" required>
  The template ID, for example `tmpl_Q4vN8xT2mLr7KpZs3Wd1`.
</ParamField>

## The template object

<ResponseField name="id" type="string">
  Unique ID, starting with `tmpl_`.
</ResponseField>

<ResponseField name="type" type="string">
  `generic` or `event_ticket`.
</ResponseField>

<ResponseField name="name" type="string">
  The template's name, up to 100 characters.
</ResponseField>

<ResponseField name="revision" type="integer">
  Goes up by one each time the design changes. Send it as `expectedRevision` when you update the template.
</ResponseField>

<ResponseField name="archived" type="boolean">
  Archived templates can't issue new passes.
</ResponseField>

<ResponseField name="requiredFields" type="string[]">
  Keys of the per-pass fields every new pass must include in `fieldValues`.
</ResponseField>

<ResponseField name="definition" type="object">
  The full design: colours, images, barcode, platforms and fields. Each field has a `key`, a `label`, a `binding` (`shared` or `perPass`) and a `required` flag.
</ResponseField>

<ResponseField name="createdAt" type="string">
  When the template was created.
</ResponseField>

<ResponseField name="updatedAt" type="string">
  When the template last changed.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.tapace.lk/v1/templates/tmpl_Q4vN8xT2mLr7KpZs3Wd1 \
    -H "Authorization: Bearer $TAPACE_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "object": "template",
    "id": "tmpl_Q4vN8xT2mLr7KpZs3Wd1",
    "type": "generic",
    "name": "Gold membership",
    "revision": 3,
    "archived": false,
    "requiredFields": ["memberName"],
    "createdAt": "2026-10-01T09:00:00.000Z",
    "updatedAt": "2026-10-12T15:20:00.000Z",
    "definition": {
      "schemaVersion": 1,
      "type": "generic",
      "description": "Gold membership card",
      "organizationName": "FORM Fitness",
      "colors": { "background": "#111827", "foreground": "#ffffff" },
      "platforms": { "apple": true, "google": true },
      "images": { "icon": "asset_Xr9Lm2Qv7Tn4Kp8Zs1Wd" },
      "config": {
        "fields": {
          "header": [],
          "primary": [
            { "key": "memberName", "label": "Member", "binding": "perPass", "required": true }
          ],
          "secondary": [
            { "key": "points", "label": "Points", "binding": "perPass", "required": false }
          ],
          "auxiliary": [],
          "back": []
        }
      }
    }
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.