---
title: "Get list of templates"
url: "https://developers.vzconnect.com/apis/fleet-inspections-api/versions/e4689b0c-c26d-40d6-b023-5303083c4a3f/operations/templates-get"
---

> Full API specification: https://developers.vzconnect.com/apis/fleet-inspections-api/versions/e4689b0c-c26d-40d6-b023-5303083c4a3f.md

# Get list of templates

`GET` `/inspections/templates`

Operation ID: `templates-get`

Returns a list of templates along with template identifier, name, status and template items.

## Query parameters

- `status` (array, optional) - Filter by the current status of a template.

## Responses

- `200` - Ok
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found
- `429` - Too Many Requests
- `default` - Internal Server Error

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Fleet Inspections API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /inspections/templates:
    get:
      tags:
        - Fleet Inspections API
      summary: Get list of templates
      description: Returns a list of templates along with template identifier, name,
        status and template items.
      operationId: templates-get
      parameters:
        - name: status
          in: query
          description: Filter by the current status of a template.
          required: false
          style: form
          explode: false
          schema:
            maxItems: 3
            minItems: 1
            uniqueItems: true
            type: array
            description: The status of a template.
            items:
              $ref: "#/components/schemas/TemplateStatus"
      responses:
        "200":
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    maxItems: 100
                    minItems: 0
                    uniqueItems: true
                    type: array
                    description: A list with the template identifier, name, status and template
                      items
                    items:
                      $ref: "#/components/schemas/Template"
                additionalProperties: false
              examples:
                Nothing found:
                  value:
                    items: []
                List of templates:
                  value:
                    items:
                      - templateItems:
                          - name: Odometer reading
                            templateItemId: X8mg1bE81gKHxaTe
                            valueType: METER
                          - comment: Where vehicle has been inspected
                            name: Where inspected
                            templateItemId: sLt5QVmBSdcRDmjz
                            valueType: LOCATION
                          - templateItemId: cQcGZfvHY2spcM88
                            name: Steering wheel play
                            comment: Confirm no backlash
                            tags:
                              - Steering Mechanism
                            valueType: CHECK
                          - name: Steering linkage
                            templateItemId: Xumn1qDssT4LjUEd
                            tags:
                              - Steering Mechanism
                            valueType: CHECK
                          - name: Air compressor last operator
                            templateItemId: TArcm8HVXF2nAEFN
                            requireValue: false
                            valueType: TEXT
                          - name: In Cabin
                            templateItemId: En0I5iQzgoiozLjk
                            requireValue: true
                            valueType: PHOTO
                        itemsSelectionType: SELECT_DEFECTS_ONLY
                        status: ACTIVE
                        comment: Inspection template for DVIR tippers
                        links:
                          - method: GET
                            rel: self
                            href: /templates/9BuVeS9ZykaJQT4x
                        name: DVIR tippers
                        templateId: 9BuVeS9ZykaJQT4x
                      - templateItems:
                          - name: Odometer reading
                            templateItemId: Qk43BGwJnkqy7msp
                            valueType: METER
                          - comment: Where vehicle has been inspected
                            name: Where inspected
                            templateItemId: IJbJDuYlDk22JFkT
                            valueType: LOCATION
                          - templateItemId: n5cbtwqEUGd6S86C
                            name: Steering wheel play
                            comment: Confirm no backlash
                            tags:
                              - Steering Mechanism
                            valueType: CHECK
                          - name: Steering linkage
                            templateItemId: rBEFrkQ7lEeSpbkO
                            tags:
                              - Steering Mechanism
                            valueType: CHECK
                          - name: Air compressor last operator
                            templateItemId: sQ38QBrncUC4Am0h
                            requireValue: false
                            valueType: TEXT
                          - name: In Cabin
                            templateItemId: sVggQT7h60IX5Cas
                            requireValue: true
                            valueType: PHOTO
                        itemsSelectionType: SELECT_DEFECTS_ONLY
                        status: DRAFT
                        comment: Inspection template for Semis post-shift DVIR
                        links:
                          - method: GET
                            rel: self
                            href: /templates/ULEwW1Vuds1GWAqQ
                        name: Semis post-shift DVIR
                        templateId: ULEwW1Vuds1GWAqQ
        "401":
          $ref: "#/components/responses/Unauthorized"
          description: Unauthorized. The authorization token is missing or not valid.
        "403":
          $ref: "#/components/responses/Forbidden"
          description: Forbidden. The caller is not allowed to access this resource.
        "404":
          $ref: "#/components/responses/NotFound"
          description: Not found.
        "429":
          $ref: "#/components/responses/TooManyRequests"
          description: Too many requests. The rate limit has been exceeded.
        default:
          $ref: "#/components/responses/InternalServerError"
          description: An unexpected error occurred.
      deprecated: false
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/inspections/templates/?$
components:
  schemas:
    TemplateStatus:
      type: string
      description: >
        Status of a template:
          - ACTIVE template is visible to drivers to inspect with,
          - INACTIVE templates are used only to display historical reports and for backward compatibility of mobile apps,
          - DRAFT is in the process of being edited by the admin and not available for inspections yet.
      enum:
        - ACTIVE
        - INACTIVE
        - DRAFT
    Template:
      title: Template
      required:
        - name
      type: object
      properties:
        templateItems:
          maxItems: 200
          minItems: 0
          uniqueItems: true
          type: array
          description: Items bound to a template
          items:
            $ref: "#/components/schemas/TemplateItem"
        itemsSelectionType:
          $ref: "#/components/schemas/ItemsSelectionType"
        status:
          $ref: "#/components/schemas/TemplateStatus"
        comment:
          maxLength: 120
          minLength: 0
          pattern: ^(?!\s)(?!.*\s$)[\S\s]+(?<!\s)$
          type: string
          description: Notes about the template
          nullable: true
        links:
          maxItems: 100
          minItems: 0
          uniqueItems: true
          type: array
          description: Related resources
          readOnly: true
          items:
            $ref: "#/components/schemas/Link"
        name:
          maxLength: 60
          minLength: 3
          pattern: ^\S[^\n]+\S$
          type: string
          description: Unique name of the template.
        templateId:
          maxLength: 120
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,120}$
          type: string
          description: Unique identifier for a template.
          readOnly: true
      additionalProperties: false
      description: A name will identify the template.
    TemplateItem:
      title: Template Item
      required:
        - name
        - valueType
      type: object
      properties:
        templateItemId:
          maxLength: 120
          minLength: 1
          pattern: ^[A-Za-z0-9-]{1,120}$
          type: string
          description: Unique identifier for a template item.
          readOnly: true
        valueType:
          $ref: "#/components/schemas/TemplateItemValueType"
        name:
          maxLength: 120
          minLength: 3
          pattern: ^\S[^\n]+\S$
          type: string
          description: Unique name of the template item.
        comment:
          maxLength: 2000
          minLength: 0
          pattern: ^(?!\s)(?!.*\s$)[\S\s]+(?<!\s)$
          type: string
          description: Additional information on the item
          nullable: true
        requireValue:
          type: boolean
          description: Marks template item as mandatory to fill in on every report based
            on the template
        tags:
          maxItems: 1
          minItems: 0
          uniqueItems: true
          type: array
          description: Labels and attributes of an item. If it is present, then the tag
            text is rendered as a group title for items in Reveal UI.
          items:
            maxLength: 80
            minLength: 1
            pattern: ^\S[^\n]*\S$
            type: string
            description: Individual label or attribute of an item
            readOnly: true
      additionalProperties: false
      description: An item can be of a valueType and is uniquely identified by the name
    ItemsSelectionType:
      type: string
      description: >
        Determines how inspection items will be presented to the drivers on the
        user interface. Specifies whether drivers need to confirm only defective
        items or must verify all inspection items regardless of condition before
        submitting the report.


        Types of template:
          - `SELECT_DEFECTS_ONLY` Requires driver to selects only the defective inspection items from the user interface during the creation of an inspection report,
          - `SELECT_ALL_ITEMS` Requires driver to check and selects all inspection items from the user interface during the creation of an inspection report
      enum:
        - SELECT_DEFECTS_ONLY
        - SELECT_ALL_ITEMS
    Link:
      title: Link
      required:
        - href
        - rel
      type: object
      properties:
        rel:
          maxLength: 10
          minLength: 4
          pattern: ^(appendix|next|prev|self)$
          type: string
          description: |
            Meaning of the values [described at IANA](https://www.iana.org/assignments/link-relations/link-relations.xhtml)
              - *appendix* - refers to documents serving as an appendix to the current resource
              - *next* - context is a part of a series, and that the next in the series is the link target
              - *prev* - context is a part of a series, and that the previous in the series is the link target
              - *self* - URI of a resource or current page of the collection
        method:
          type: string
          description: HTTP method to interact with linked resource
          enum:
            - GET
            - PUT
        title:
          maxLength: 120
          minLength: 1
          pattern: ^[^\n]+$
          type: string
          description: Relation type with the target resource as human-readable text
        href:
          maxLength: 2000
          minLength: 1
          pattern: ^[^\n]+$
          type: string
          description: URL of linked resource
          format: uri-reference
      additionalProperties: false
      description: Reference to another resource
    ProblemJson:
      title: ProblemJson
      type: object
      properties:
        type:
          maxLength: 2000
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: A URI reference that identifies the problem type.
          format: uri
        detail:
          maxLength: 2000
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: A human-readable explanation specific to this occurrence of the
            problem.
        status:
          maximum: 599
          minimum: 300
          type: integer
          description: The HTTP status code generated by the origin server for this
            occurrence of the problem.
          format: int32
        errors:
          maxItems: 120
          minItems: 1
          uniqueItems: true
          type: array
          description: An extension that contains a list of individual error occurrences
            found, with details and a pointer to the location of each. Use this
            extension to convey more than one errors of the same type.
          items:
            type: object
            properties:
              debugId:
                maxLength: 120
                minLength: 0
                pattern: ^[^\n]*$
                type: string
                description: A unique error identifier string generated on the service-side and
                  logged for correlation purposes.
              pointer:
                maxLength: 120
                minLength: 0
                pattern: ^(\/[^\n]+)*$
                type: string
                description: A pointer to locate the problem within the request's content using
                  a [JSON Pointer](https://www.rfc-editor.org/info/rfc6901).
                  This extension is only applicable in case of 4xx range of
                  errors.
              detail:
                maxLength: 2000
                minLength: 0
                pattern: ^[^\n]*$
                type: string
                description: A human-readable explanation specific to this occurrence of the
                  problem.
            additionalProperties: false
        instance:
          maxLength: 2000
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: A URI reference that identifies the specific occurrence of the
            problem. It may or may not yield further information if
            dereferenced.
          format: uri
        debugId:
          maxLength: 120
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: A unique error identifier string generated on the service-side and
            logged for correlation purposes.
        pointer:
          maxLength: 120
          minLength: 0
          pattern: ^(\/[^\n]+)*$
          type: string
          description: A pointer to locate the problem within the request's content using
            a [JSON Pointer](https://www.rfc-editor.org/info/rfc6901). This
            extension is only applicable in case of 4xx range of errors.
        title:
          maxLength: 2000
          minLength: 0
          pattern: ^[^\n]*$
          type: string
          description: A short, human-readable summary of the problem type.
      additionalProperties: false
      description: JSON Schema for HTTP Problems as defined by RFC 9457
    TemplateItemValueType:
      type: string
      description: Defines the type of data element within a template
      enum:
        - CHECK
        - METER
        - TEXT
        - LOCATION
        - PHOTO
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    NotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    TooManyRequests:
      description: Too Many Requests
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
    InternalServerError:
      description: Internal Server Error
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemJson"
```
