---
title: "Retrieve template by ID"
method: GET
path: "/fleetify/document_templates/{id}"
tags: ["Dispatches_Documents"]
---

# Retrieve template by ID

`GET /fleetify/document_templates/{id}`

## Query parameters

- `key` string, required

## Response `200`

- object
  - `status` integer — Returns the HTTP response code.
  - `msg` string — Returns the error message in case of a failed request. If the request is successful, this field is not present in the response.
  - `data` object — An object returning the details of the requested document template.
    - `id` string — Returns the unique identifier of the document template.
    - `name` string — Returns the name of the document template as specified at the time of creating the template.
    - `content` DocumentTemplateContentResponse[] — An array of objects returning the details of data structures and validation rules and other properties of all document fields. Each object represents one document field.
      - `label` string — Returns the label of the document field.
      - `name` string — Returns the name of the document field.
      - `type` string — Returns the data type of the document field. It will always belong to one of `string`, `number`, `date_time`, `photos`, `multi_choices`, `signature`, `barcode`, and `single_choice.`
      - `required` boolean — Indicates if the document field is mandatory or not.
      - `validation` object — Returns the validation rules for `number` , `multi_choices` , and `photos` document field types.
        - `min` integer — Returns the minimum allowed value for `number` type document item, as specified at the time of configuring the field. This parameter is not present in the response if it was not provided in the input.
        - `max` integer — Returns the maximum allowed value for `number` type document item, as specified at the time of configuring the field. This parameter is not present in the response if it was not provided in the input.
        - `min_items` string — Returns the minimum number of items required for `multi_choices`, `photos` type document items. This parameter will not be present in the response if it was not provided in the input.
        - `max_items` string — Returns the maximum number of items required for `multi_choices`, `photos` type document items. This parameter will not be present in the response if it was not provided in the input.
      - `meta` object — Returns the options configured for `single_choice` or `multi_choices` type document items.
        - `options` object[] — An array of objects returning the options for `multi_choices` or `single_choice` type document field. Each object represents one configured option.
          - `label` string — Returns the label for the option.
          - `value` string — Returns the value associated with the option. This value gets submitted when the option is checked in the Driver app.

---

[API](https://skmtc.dev/nextbillion-ai/apis/one-spec-service.md) · [All operations](https://skmtc.dev/nextbillion-ai/apis/one-spec-service/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nextbillion-ai/one-spec-service/revisions/dfd629b1301e/schema)
