> ## 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.

# List templates

> Returns templates using the existing filter and pagination semantics.



## OpenAPI

````yaml /pt/openapi/v3-current/reporter.yaml get /v1/templates
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: Use this API to manage the data sources, templates, and reports of Reporter.
  license:
    name: Lerian Studio General License
  title: Midaz 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:
    get:
      tags:
        - Templates
      summary: List templates
      description: Returns templates using the existing filter and pagination semantics.
      operationId: listTemplates
      parameters:
        - description: Template output format; outputFormat is also accepted
          example: HTML
          in: query
          name: output_format
          schema:
            type: string
        - description: Case-insensitive substring match on the template description
          example: payroll
          in: query
          name: description
          schema:
            type: string
        - description: Creation date in YYYY-MM-DD format; createdAt is also accepted
          example: '2026-01-31'
          in: query
          name: created_at
          schema:
            format: date
            type: string
        - description: >-
            Returns only templates whose mapped fields reference this data
            source name; dataSourceName is also accepted. Held to the same
            grammar every registrable data source name is held to,
            ^[a-zA-Z0-9_-]{1,100}$ — letters, digits, underscores and hyphens
            only, at most 100 characters. A dotted, operator-shaped, empty, or
            over-long value is refused as an invalid query parameter.
          example: midaz_onboarding
          in: query
          name: data_source_name
          schema:
            type: string
        - description: >-
            Returns only templates filed under this report family. The value is
            normalised the same way it is on write, so the case you type does
            not matter: category=CADOC and category=cadoc return the same
            templates. A blank value is no filter at all; the words 'null' and
            'nil' are family names like any other.
          example: cadoc
          in: query
          name: category
          schema:
            type: string
        - description: >-
            Tri-state. Omit it to narrow by nothing. has_category=false returns
            only templates with NO family — both those stored before the field
            existed and those carrying an empty one — which is how the templates
            still needing a family are found; combine it with limit=1 and read
            `total` to count them. has_category=true is the exact complement.
            The only accepted values are true and false; anything else is
            refused as an invalid query parameter.
          example: 'false'
          in: query
          name: has_category
          schema:
            type: string
        - description: Sort order by creation time; sortOrder is also accepted
          example: desc
          in: query
          name: sort_order
          schema:
            default: desc
            enum:
              - asc
              - desc
            type: string
        - description: Page size; parsed by the domain query validator
          example: 10
          in: query
          name: limit
          schema:
            default: 10
            type: integer
        - description: Page number; parsed by the domain query validator
          example: 1
          in: query
          name: page
          schema:
            default: 1
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTemplatesHumaOutputBody'
          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
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
components:
  schemas:
    ListTemplatesHumaOutputBody:
      properties:
        items:
          description: Templates in the current page
          examples:
            - - createdAt: '2026-01-01T00:00:00Z'
                description: Monthly financial report
                fileName: monthly-report.tpl
                id: 00000000-0000-0000-0000-000000000000
                outputFormat: HTML
                updatedAt: '2026-01-01T00:00:00Z'
          items:
            $ref: '#/components/schemas/Template'
          type:
            - array
            - 'null'
        limit:
          description: Maximum number of templates in the page
          examples:
            - 10
          format: int64
          type: integer
        page:
          description: Current page number
          examples:
            - 1
          format: int64
          type: integer
        total:
          description: Total number of matching templates
          examples:
            - 10
          format: int64
          type: integer
      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
    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
    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
    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
  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.