---
title: "Get a template file by ID"
method: GET
path: "/templates/{template_id}/files/{file_id}"
tags: ["Templates"]
---

# Get a template file by ID

`GET /templates/{template_id}/files/{file_id}`

Use this endpoint to retrieve a specific template file by its ID.

## Path parameters

- `template_id` integer, required
- `file_id` integer, required

## Query parameters

- `download` boolean

## Headers

- `x-oneflow-api-token` string, required

## Response `200`

Returns the requested template file.

- object — Contract file.
  - `_links` object — Links to related endpoints.
    - `comments` object
      - `href` string, nullable
    - `contracts` object
      - `href` string, nullable
    - `contract` object
      - `href` string, nullable
    - `create` object
      - `href` string, nullable
    - `data_field` object
      - `href` string, nullable
    - `data_fields` object
      - `href` string, nullable
    - `events` object
      - `href` string, nullable
    - `event` object
      - `href` string, nullable
    - `files` object
      - `href` string, nullable
    - `file` object
      - `href` string, nullable
    - `next` object
      - `href` string, nullable
    - `parties` object
      - `href` string, nullable
    - `party` object
      - `href` string, nullable
    - `previous` object
      - `href` string, nullable
    - `publish` object
      - `href` string, nullable
    - `self` object
      - `href` string, nullable
    - `template_types` object
      - `href` string, nullable
    - `template_type` object
      - `href` string, nullable
    - `template` object
      - `href` string, nullable
    - `templates` object
      - `href` string, nullable
    - `workspaces` object
      - `href` string, nullable
    - `workspace` object
      - `href` string, nullable
    - `playbooks` object
      - `href` string, nullable
  - `_private_ownerside` object, nullable — File data that is private to the ownerside.
    - `created_time` string, datetime, nullable, required
  - `extension` string, nullable, required — The file extension
  - `id` integer, required
  - `name` string, nullable, required — The name of the file.
  - `type` 'contract' | 'verification' | 'attachment' | 'pdf' | 'unknown', required — One of the contract [file types](https://developer.oneflow.com/docs/contract-file#contract-file-types).

## Other responses

- `302` — A redirect to the requested pdf template file.
- `400` — Invalid format or content of the request.
- `401` — The API token or the user email is invalid.
- `404` — A required entity is missing.

---

[API](https://skmtc.net/oneflow/apis/public-api-for-oneflow.md) · [All operations](https://skmtc.net/oneflow/apis/public-api-for-oneflow/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneflow/public-api-for-oneflow/versions/0e73a45dec15/schema)
