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

# Get Bank Account Metrics

> Get settled and failed totals for collecting and payment documents



## OpenAPI

````yaml api-reference/banking-api/openapi.json GET /banking/metric
openapi: 3.0.0
info:
  title: Banking API
  version: 1.0.0
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security: []
tags: []
paths:
  /banking/metric:
    get:
      tags:
        - metrics
      summary: Get bank account metrics
      description: Get settled and failed totals for collecting and payment documents
      operationId: TrioFoundationWeb.Banking.MetricController.index
      parameters:
        - description: Bank account ID
          in: query
          name: bank_account_id
          required: true
          schema:
            $ref: '#/components/schemas/UUID'
        - description: From datetime
          in: query
          name: from_datetime
          required: true
          schema:
            $ref: '#/components/schemas/DATETIME'
        - description: To datetime
          in: query
          name: to_datetime
          required: true
          schema:
            $ref: '#/components/schemas/DATETIME'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Metric_response'
          description: Metrics
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
          description: Unauthorized
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
          description: Internal server error
      callbacks: {}
components:
  schemas:
    '401':
      example:
        error:
          error_code: UNAUTHORIZED
          error_message: Invalid credentials
      properties:
        error:
          properties:
            error_code:
              description: Error code
              type: string
            error_message:
              description: Error message
              type: string
          type: object
      title: '401'
      type: object
    '500':
      example:
        error:
          error_code: INTEGRATION_ERROR
          error_message: An unexpected issue occurred
      properties:
        error:
          properties:
            error_code:
              description: Error code
              type: string
            error_message:
              description: Error message
              type: string
          type: object
      title: '500'
      type: object
    UUID:
      description: Unique identifier
      format: uuid
      title: UUID
      type: string
    DATETIME:
      description: Datetime schema
      format: date-time
      title: DATETIME
      type: string
    Metric_response:
      description: Metric response
      example:
        data:
          collecting_document:
            failed: 2
            settled: 12
          payment_document:
            failed: 1
            settled: 8
      properties:
        data:
          $ref: '#/components/schemas/Metric_data'
      title: Metric response
      type: object
    Metric_data:
      description: Collected metric totals
      example:
        collecting_document:
          failed: 2
          settled: 12
        payment_document:
          failed: 1
          settled: 8
      properties:
        collecting_document:
          $ref: '#/components/schemas/Collecting_document_metrics'
        payment_document:
          $ref: '#/components/schemas/Payment_document_metrics'
      title: Metric data
      type: object
    Collecting_document_metrics:
      description: Collecting document grouped metrics
      example:
        failed: 2
        settled: 12
      properties:
        failed:
          description: Failed count
          minimum: 0
          type: integer
        settled:
          description: Settled count
          minimum: 0
          type: integer
      title: Collecting document metrics
      type: object
    Payment_document_metrics:
      description: Payment document grouped metrics
      example:
        failed: 1
        settled: 8
      properties:
        failed:
          description: Failed count
          minimum: 0
          type: integer
        settled:
          description: Settled count
          minimum: 0
          type: integer
      title: Payment document metrics
      type: object

````