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

# List fillable document templates and their fields



## OpenAPI

````yaml /openapi.json get /api/v1/documents/contracts/templates
openapi: 3.1.0
info:
  title: HEVN API
  description: Backend API for HEVN mobile neobank
  version: 0.1.2
servers:
  - url: https://api.hevn.finance
    description: Production
security: []
paths:
  /api/v1/documents/contracts/templates:
    get:
      tags:
        - contracts
      summary: List fillable document templates and their fields
      operationId: list_templates_api_v1_documents_contracts_templates_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateListResponse'
components:
  schemas:
    TemplateListResponse:
      properties:
        templates:
          items:
            $ref: '#/components/schemas/TemplateDescriptor'
          type: array
          title: Templates
      type: object
      required:
        - templates
      title: TemplateListResponse
      description: List of fillable document templates.
    TemplateDescriptor:
      properties:
        type:
          $ref: '#/components/schemas/ContractDocumentTemplateType'
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        requiresDocument:
          type: boolean
          title: Requiresdocument
          default: false
        supportsContractGeneration:
          type: boolean
          title: Supportscontractgeneration
          default: false
        supportsInvoicing:
          type: boolean
          title: Supportsinvoicing
          default: false
        fields:
          items:
            $ref: '#/components/schemas/TemplateField'
          type: array
          title: Fields
      type: object
      required:
        - type
        - title
        - description
      title: TemplateDescriptor
      description: Describes a document template and the fields a client must fill.
    ContractDocumentTemplateType:
      type: string
      enum:
        - employer
        - employment
        - service
        - contractor
        - default_contractor
        - custom
        - nda
        - vendor
        - milestone
        - msa
      title: ContractDocumentTemplateType
      description: Markdown contract template type.
    TemplateField:
      properties:
        key:
          type: string
          title: Key
        label:
          type: string
          title: Label
        type:
          $ref: '#/components/schemas/TemplateFieldType'
          default: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        required:
          type: boolean
          title: Required
          default: false
        multiline:
          type: boolean
          title: Multiline
          default: false
        source:
          $ref: '#/components/schemas/TemplateFieldSource'
          default: user
        party:
          anyOf:
            - type: string
              enum:
                - client
                - contractor
            - type: 'null'
          title: Party
        options:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Options
        fields:
          anyOf:
            - items:
                $ref: '#/components/schemas/TemplateField'
              type: array
            - type: 'null'
          title: Fields
        item:
          anyOf:
            - $ref: '#/components/schemas/TemplateField'
            - type: 'null'
      type: object
      required:
        - key
        - label
      title: TemplateField
      description: >-
        Single field of a document template, for dynamic discovery.


        Clients should prompt the user for ``USER`` fields, and for ``PROFILE``
        fields only

        when the referenced party's value is not already available. ``required``
        means the

        final document needs a non-empty value, regardless of who provides it.


        Descriptors are built from a template's annotated input model by

        ``TemplateFieldBuilder``; composite fields nest their shape in
        :attr:`fields`

        (objects), :attr:`item` (arrays) or :attr:`options` (enums).
    TemplateFieldType:
      type: string
      enum:
        - string
        - text
        - number
        - decimal
        - date
        - datetime
        - boolean
        - enum
        - object
        - array
      title: TemplateFieldType
      description: >-
        Structural type of a template field, so clients can render the right
        input.


        Composite types carry their shape: ``OBJECT`` populates
        :attr:`TemplateField.fields`,

        ``ARRAY`` populates :attr:`TemplateField.item`, and ``ENUM`` populates

        :attr:`TemplateField.options`.
    TemplateFieldSource:
      type: string
      enum:
        - user
        - profile
        - computed
        - default
      title: TemplateFieldSource
      description: >-
        Where a template field's value comes from.


        * ``USER`` — must be entered by the user.

        * ``PROFILE`` — taken from a party's profile when available; if the
        profile is
          incomplete or the party is not registered yet, it must be collected from the user.
        * ``COMPUTED`` — generated server-side (current date, reference, derived
        legal terms).

        * ``DEFAULT`` — filled with a boilerplate default; no input required.

````