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

# Get Available Metric Templates

> Retrieves a list of all available metric templates (e.g., GROSS_VOLUME, TRANSACTION_COUNT). Templates define the logic, supported parameters, and breakdown options available for building reports.



## OpenAPI

````yaml https://production.hifi.com/api/v2/openapi.json get /v2/reporting/templates
openapi: 3.0.0
info:
  title: Hifi API
  version: 2.0.0
  description: API documentation for Hifi
servers:
  - url: https://production.hifibridge.com
    description: Production server
  - url: https://sandbox.hifibridge.com
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Common
    description: Common endpoints
  - name: User
    description: User endpoints
  - name: Kyc
    description: Kyc endpoints
  - name: Wallet
    description: Wallet endpoints
  - name: Account
    description: Account endpoints
  - name: External Account
    description: External Account endpoints for managing beneficiary bank accounts
  - name: Fiat Account
    description: Fiat Account endpoints
  - name: Virtual Account
    description: Virtual Account endpoints
  - name: Onramp
    description: Onramp endpoints
  - name: Offramp
    description: Offramp endpoints
  - name: Orchestration Address
    description: >-
      Orchestration Address endpoints — persistent on-chain wallets that
      automatically off-ramp incoming stablecoin deposits to a USD bank account
  - name: Crypto Transfer
    description: Crypto Transfer endpoints
  - name: Cross-Chain Bridge
    description: Cross-Chain Bridge endpoints
  - name: Token Swap
    description: Token Swap endpoints
  - name: Canton Offers
    description: Canton Offers endpoints
  - name: Transfer Rules
    description: Transfer approval rules and configuration
  - name: Transfer Approvals
    description: Transfer approval workflow and admin actions
  - name: File
    description: File endpoints
  - name: Reporting
    description: Reporting and metrics endpoints
paths:
  /v2/reporting/templates:
    get:
      tags:
        - Reporting
      summary: Get Available Metric Templates
      description: >-
        Retrieves a list of all available metric templates (e.g., GROSS_VOLUME,
        TRANSACTION_COUNT). Templates define the logic, supported parameters,
        and breakdown options available for building reports.
      responses:
        '200':
          $ref: '#/components/responses/TemplateListResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  responses:
    TemplateListResponse:
      description: Success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TemplateListResponse'
          examples:
            TemplateListExample:
              $ref: '#/components/examples/TemplateListExample'
    BadRequestResponse:
      description: Bad request - validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details:
                    type: object
                    description: Field-specific validation errors
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                enum:
                  - error
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  schemas:
    TemplateListResponse:
      type: object
      description: List of templates response
      properties:
        status:
          type: string
          enum:
            - success
        data:
          type: array
          items:
            $ref: '#/components/schemas/MetricTemplate'
        metadata:
          type: object
          properties:
            count:
              type: integer
    Unauthorized:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        error:
          type: string
          description: Error type
        errorDetails:
          type: string
          description: Detailed error message
    InternalServerError:
      type: object
      properties:
        code:
          type: integer
          description: Error code
        error:
          type: string
          description: Error type
        errorDetails:
          type: string
          description: Detailed error message
    MetricTemplate:
      type: object
      description: A metric template definition
      properties:
        name:
          type: string
          description: Template identifier
        displayName:
          type: string
          description: Human-readable template name
        description:
          type: string
          description: Template description
        supportedParams:
          type: array
          items:
            $ref: '#/components/schemas/MetricParamDefinition'
          description: Available parameters for this template
        rules:
          type: array
          items:
            type: string
          description: Cross-field validation rules
        breakdownOptions:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            Available breakdown dimensions for this template (null if no
            breakdowns supported)
    MetricParamDefinition:
      type: object
      description: Definition of a metric parameter
      properties:
        name:
          type: string
          description: Parameter name
        type:
          type: string
          enum:
            - date
            - string
            - array
            - enum
            - integer
          description: Parameter data type
        required:
          type: boolean
          description: Whether this parameter is required
        description:
          type: string
          description: Parameter description
        options:
          type: array
          description: Available options (for enum/array types)
        constraints:
          type: object
          description: Validation constraints (e.g., min, max, maxItems)
  examples:
    TemplateListExample:
      summary: List of all metric templates
      value:
        status: success
        data:
          - template: GROSS_VOLUME
            displayName: Gross Volume
            description: >-
              Total combined USD-equivalent value of completed Onramp and
              Offramp transactions.
            supportedParams:
              - name: createdAfter
                type: date
                required: true
                multiple: false
                constraints:
                  minDate: '2024-07-01'
                  maxDate: '2025-12-08'
              - name: createdBefore
                type: date
                required: true
                multiple: false
                constraints:
                  maxDate: '2025-12-08'
              - name: calculationInterval
                type: enum
                required: true
                multiple: false
                options:
                  - day
                  - week
                  - month
              - name: transactionTypes
                type: enum
                required: false
                multiple: true
                options:
                  - onramp
                  - offramp
                  - transfer
              - name: userIds
                type: uuid
                required: false
                multiple: true
                optionsCount: 1000
                optionsTruncated: true
                optionsEndpoint: /reporting/params/userIds/options
              - name: breakdowns
                type: enum
                required: false
                multiple: true
                constraints:
                  maxCount: 2
              - name: limit
                type: number
                required: false
                multiple: false
                constraints:
                  min: 1
                  max: 10000
            rules:
              - createdBefore must be after createdAfter
            breakdownOptions:
              - transactionType
              - transactionStatus
              - userId
          - template: TRANSACTION_COUNT
            displayName: Transaction Count
            description: >-
              Aggregated count of transactions grouped by status and type over
              time.
            supportedParams:
              - name: createdAfter
                type: date
                required: true
                multiple: false
                constraints:
                  minDate: '2024-07-01'
                  maxDate: '2025-12-08'
              - name: createdBefore
                type: date
                required: true
                multiple: false
                constraints:
                  maxDate: '2025-12-08'
              - name: calculationInterval
                type: enum
                required: true
                multiple: false
                options:
                  - day
                  - week
                  - month
              - name: transactionTypes
                type: enum
                required: false
                multiple: true
                options:
                  - onramp
                  - offramp
                  - transfer
              - name: transactionStatuses
                type: enum
                required: false
                multiple: true
                options:
                  - AWAITING_FUNDS
                  - COMPLETED
                  - CRYPTO_FAILED
                  - CRYPTO_INITIATED
                  - CRYPTO_PENDING
                  - FAILED
                  - FIAT_FAILED
                  - FIAT_INITIATED
                  - FIAT_PENDING
                  - FIAT_PROCESSED
                  - FIAT_RETURNED
                  - INITIATED
                  - NOT_INITIATED
                  - PENDING
                  - QUOTE_FAILED
                  - REJECTED
              - name: userIds
                type: uuid
                required: false
                multiple: true
                optionsCount: 1000
                optionsTruncated: true
                optionsEndpoint: /reporting/params/userIds/options
              - name: breakdowns
                type: enum
                required: false
                multiple: true
                constraints:
                  maxCount: 2
              - name: limit
                type: number
                required: false
                multiple: false
                constraints:
                  min: 1
                  max: 10000
            rules:
              - createdBefore must be after createdAfter
            breakdownOptions:
              - transactionType
              - transactionStatus
              - userId
          - template: NEW_USERS
            displayName: New Users
            description: Count of new unique end-users onboarded within the time period.
            supportedParams:
              - name: createdAfter
                type: date
                required: true
                multiple: false
                constraints:
                  minDate: '2024-07-01'
                  maxDate: '2025-12-08'
              - name: createdBefore
                type: date
                required: true
                multiple: false
                constraints:
                  maxDate: '2025-12-08'
              - name: calculationInterval
                type: enum
                required: true
                multiple: false
                options:
                  - day
                  - week
                  - month
              - name: limit
                type: number
                required: false
                multiple: false
                constraints:
                  min: 1
                  max: 10000
            rules:
              - createdBefore must be after createdAfter
            breakdownOptions: null
        metadata:
          count: 3
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````