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

# Get a template

> Returns template information for the given ID, including the generation parameters the template declares.



## OpenAPI

````yaml /pt/openapi/v3-current/reporter.yaml get /v1/templates/{id}
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Reporter generates regulatory, accounting and operational reports from
    templates over your data sources.
  license:
    name: Lerian Studio General License
  title: Reporter API
  version: 4.0.0
servers:
  - url: https://reporter.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: Generated report instances and their lifecycle.
    name: Reports
  - description: Reusable report definitions.
    name: Templates
  - description: Interactive construction of report templates.
    name: Template Builder
  - description: Scheduled report due-date tracking.
    name: Deadlines
  - description: Configured inputs that feed report data.
    name: Data Sources
  - description: Aggregated reporting metrics.
    name: Metrics
  - description: Published business event catalog and delivery policies.
    name: Streaming
paths:
  /v1/templates/{id}:
    get:
      tags:
        - Templates
      summary: Get a template
      description: >-
        Returns template information for the given ID, including the generation
        parameters the template declares.
      operationId: getTemplate
      parameters:
        - description: Template ID
          example: 00000000-0000-0000-0000-000000000000
          in: path
          name: id
          required: true
          schema:
            description: Template ID
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Not Found
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
components:
  schemas:
    Template:
      properties:
        category:
          description: >-
            Report family this template belongs to, lower-case; empty on a
            template stored before categories existed
          examples:
            - cadoc
          type: string
        createdAt:
          description: Template creation timestamp in UTC
          examples:
            - '2021-01-01T00:00:00Z'
          format: date-time
          type: string
        description:
          description: Human-readable template description
          examples:
            - Monthly financial report
          type: string
        fileName:
          description: Stored template filename
          examples:
            - 0196159b-4f26-7300-b3d9-f4f68a7c85f3_1744119295.tpl
          type: string
        id:
          description: Unique template identifier
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        outputFormat:
          description: Format generated from this template
          examples:
            - HTML
          type: string
        parameters:
          description: >-
            Generation parameters this template declares; a report request must
            answer each required one. Empty when the template declares none
          items:
            $ref: '#/components/schemas/ParameterSpec'
          type:
            - array
            - 'null'
        updatedAt:
          description: Most recent template update timestamp in UTC
          examples:
            - '2021-01-01T00:00:00Z'
          format: date-time
          type: string
      type: object
    Detail:
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          examples:
            - - location: body.templateId
                message: expected string to match 'uuid' format
                value: not-a-uuid
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ParameterSpec:
      additionalProperties: false
      properties:
        allowedValues:
          description: Closed set of values this parameter accepts, when it has one
          examples:
            - - I
              - S
          items:
            type: string
          type:
            - array
            - 'null'
        appliesTo:
          description: >-
            Date/time field whose period this parameter closes, as
            <dataSource>.<table>.<field>
          examples:
            - midaz_transaction.operation.created_at
          type: string
        default:
          description: Value applied server-side when the request omits this parameter
          examples:
            - I
          type: string
        description:
          description: Human-readable description of the parameter
          type: string
        name:
          description: Parameter name as the request supplies it
          examples:
            - dataBase
          type: string
        required:
          description: Whether a request must supply this parameter
          examples:
            - true
          type: boolean
        type:
          description: One of string, integer, decimal, boolean, date, month
          examples:
            - month
          type: string
      required:
        - name
        - type
        - required
      type: object
    ErrorDetail:
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          examples:
            - body.templateId
          type: string
        message:
          description: Error message text
          examples:
            - expected string to match 'uuid' format
          type: string
        value:
          description: The value at the given location
          examples:
            - not-a-uuid
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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