> ## 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 comprehensive dashboard metrics

> Use this endpoint to retrieve complete dashboard metrics including summary, trends, and breakdowns for the Command Center.



## OpenAPI

````yaml /pt/openapi/v3-current/matcher.yaml get /v1/reports/contexts/{contextId}/dashboard/metrics
openapi: 3.1.0
info:
  title: Matcher APIs
  description: >-
    Complete API reference for the Matcher reconciliation engine, providing
    automated transaction matching between Midaz Ledger and external systems.
  version: 6.1.0
  license:
    name: Lerian Studio General License
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/reports/contexts/{contextId}/dashboard/metrics:
    get:
      tags:
        - Reporting
      summary: Get comprehensive dashboard metrics
      description: >-
        Use this endpoint to retrieve complete dashboard metrics including
        summary, trends, and breakdowns for the Command Center.
      operationId: getMatcherDashboardMetrics
      parameters:
        - description: A unique identifier for tracing the request across services.
          in: header
          name: X-Request-Id
          schema:
            type: string
        - description: The unique identifier of the reconciliation context.
          in: path
          name: contextId
          required: true
          schema:
            description: Context ID
            format: uuid
            type: string
        - description: Start date (YYYY-MM-DD)
          explode: false
          in: query
          name: date_from
          schema:
            description: >-
              Start date (YYYY-MM-DD), inclusive. Optional: defaults to 30 days
              before date_to. Window may not exceed 90 days.
            format: date
            type: string
        - description: End date (YYYY-MM-DD)
          explode: false
          in: query
          name: date_to
          schema:
            description: >-
              End date (YYYY-MM-DD), inclusive. Optional: defaults to tomorrow
              (UTC). Window may not exceed 90 days.
            format: date
            type: string
        - description: Source ID filter
          explode: false
          in: query
          name: source_id
          schema:
            description: Source ID filter
            format: uuid
            type: string
      responses:
        '200':
          description: >-
            Indicates that the request was successful and the response contains
            the expected data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatcherDashboardMetricsResponse'
        '400':
          description: The request contains invalid parameters or payload.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                400-invalid-date-range:
                  $ref: '#/components/examples/400-invalid-date-range'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            You do not have permission to access this resource, or the context
            is not active.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                TenantClaimRequired:
                  summary: Tenant claim missing
                  value:
                    type: https://errors.lerian.studio/v1/MTCH-0004
                    title: Forbidden
                    status: 403
                    detail: tenant claim required
                    code: MTCH-0004
                mtch-0012-context-is-not-active:
                  $ref: '#/components/examples/mtch-0012-context-is-not-active'
        '404':
          description: The requested resource was not found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                mtch-0005-context-not-found:
                  $ref: '#/components/examples/mtch-0005-context-not-found'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    MatcherDashboardMetricsResponse:
      additionalProperties: false
      properties:
        breakdowns:
          $ref: '#/components/schemas/BreakdownMetricsResponse'
          description: Categorical aggregations of exceptions and matches.
        summary:
          $ref: '#/components/schemas/SummaryMetricsResponse'
          description: Executive summary metrics.
        trends:
          $ref: '#/components/schemas/TrendMetricsResponse'
          description: Time-series trend data across the window.
        updatedAt:
          description: Timestamp when these metrics were computed (RFC 3339, UTC).
          examples:
            - '2025-01-15T10:30:00Z'
          format: date-time
          type: string
      required:
        - summary
        - trends
        - breakdowns
        - updatedAt
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          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
          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
    BreakdownMetricsResponse:
      additionalProperties: false
      properties:
        agedBreaks:
          description: >-
            AGED_BREAK open-item exceptions grouped into a long-tail age scale
            (<7d, 7-30d, >30d).
          items:
            $ref: '#/components/schemas/AgeBucketDTO'
          maxItems: 20
          type:
            - array
            - 'null'
        byAge:
          description: Exception counts grouped into age buckets.
          items:
            $ref: '#/components/schemas/AgeBucketDTO'
          maxItems: 20
          type:
            - array
            - 'null'
        byReason:
          additionalProperties:
            format: int64
            type: integer
          description: Exception counts keyed by exception reason code.
          type: object
        byRule:
          description: Match counts broken down by the match rule that produced them.
          items:
            $ref: '#/components/schemas/RuleMatchCountDTO'
          maxItems: 100
          type:
            - array
            - 'null'
        bySeverity:
          additionalProperties:
            format: int64
            type: integer
          description: >-
            Exception counts keyed by severity level (e.g. LOW, MEDIUM, HIGH,
            CRITICAL).
          type: object
      required:
        - bySeverity
        - byReason
        - byRule
        - byAge
        - agedBreaks
      type: object
    SummaryMetricsResponse:
      additionalProperties: false
      properties:
        criticalExposure:
          description: >-
            Total monetary exposure from critical-severity exceptions, as a
            decimal string.
          examples:
            - '15000.00'
          type: string
        matchRate:
          description: Percentage of transactions matched (0-100).
          examples:
            - 94.4
          format: double
          type: number
        oldestExceptionAgeHours:
          description: Age of the oldest open exception, in hours.
          examples:
            - 72.5
          format: double
          type: number
        pendingExceptions:
          description: Number of exceptions still awaiting resolution.
          examples:
            - 4
          format: int64
          type: integer
        totalMatches:
          description: Total number of matched transactions in the window.
          examples:
            - 11800
          format: int64
          type: integer
        totalTransactions:
          description: Total number of transactions in the window.
          examples:
            - 12500
          format: int64
          type: integer
      required:
        - totalTransactions
        - totalMatches
        - matchRate
        - pendingExceptions
        - criticalExposure
        - oldestExceptionAgeHours
      type: object
    TrendMetricsResponse:
      additionalProperties: false
      properties:
        dates:
          description: >-
            Ordered list of dates (one per data point) labelling the parallel
            trend series.
          items:
            type: string
          maxItems: 366
          type:
            - array
            - 'null'
        exceptions:
          description: Per-date count of exceptions raised, aligned by index with dates.
          items:
            format: int64
            type: integer
          maxItems: 366
          type:
            - array
            - 'null'
        ingestion:
          description: >-
            Per-date count of ingested transactions, aligned by index with
            dates.
          items:
            format: int64
            type: integer
          maxItems: 366
          type:
            - array
            - 'null'
        matchRates:
          description: Per-date match rate percentage (0-100), aligned by index with dates.
          items:
            format: double
            type: number
          maxItems: 366
          type:
            - array
            - 'null'
        matches:
          description: Per-date count of matched transactions, aligned by index with dates.
          items:
            format: int64
            type: integer
          maxItems: 366
          type:
            - array
            - 'null'
      required:
        - dates
        - ingestion
        - matches
        - exceptions
        - matchRates
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      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
    RateLimitErrorResponse:
      description: >-
        Flat body that the rate limiter returns. `code` is the HTTP status as a
        number.
      type: object
      required:
        - code
        - title
        - message
      properties:
        code:
          type: integer
          description: HTTP status code.
          example: 429
        title:
          type: string
          description: Error type.
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message.
          example: rate limit exceeded
    AgeBucketDTO:
      additionalProperties: false
      properties:
        bucket:
          description: Age range label for the bucket (e.g. 0-24h, 24-48h, >7d).
          examples:
            - 0-24h
          type: string
        value:
          description: Number of items falling into this age bucket.
          examples:
            - 15
          format: int64
          type: integer
      required:
        - bucket
        - value
      type: object
    RuleMatchCountDTO:
      additionalProperties: false
      properties:
        count:
          description: Number of matches attributed to this rule.
          examples:
            - 1250
          format: int64
          type: integer
        id:
          description: Identifier of the match rule (UUID).
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        name:
          description: Human-readable name of the match rule.
          examples:
            - Exact Amount Match
          type: string
      required:
        - id
        - name
        - count
      type: object
  examples:
    400-invalid-date-range:
      summary: Invalid date range
      value:
        title: Bad Request
        status: 400
        detail: >-
          date_from and date_to must each be a valid YYYY-MM-DD date, and
          date_from must not be after date_to
    mtch-0012-context-is-not-active:
      summary: Context is not active
      value:
        type: https://errors.lerian.studio/v1/MTCH-0012
        title: Forbidden
        status: 403
        detail: context is not active
        code: MTCH-0012
    mtch-0005-context-not-found:
      summary: Context not found
      value:
        type: https://errors.lerian.studio/v1/MTCH-0005
        title: Not Found
        status: 404
        detail: >-
          No reconciliation context matches this id; check the context id and
          try again.
        code: MTCH-0005
  responses:
    Unauthorized:
      description: The request lacks valid authentication credentials.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          examples:
            MissingToken:
              summary: Missing token
              value:
                type: https://errors.lerian.studio/v1/AUT-0006
                title: Token Missing
                status: 401
                detail: >-
                  A valid token must be provided in the request header. Please
                  include a token and try again.
                code: AUT-0006
            InvalidToken:
              summary: Invalid token
              value:
                type: https://errors.lerian.studio/v1/AUT-0007
                title: Invalid Token
                status: 401
                detail: >-
                  The provided token is expired, invalid or malformed. Please
                  provide a valid token and try again.
                code: AUT-0007
    ValidationFailed:
      description: >-
        The request failed validation. The `errors` list names each value that
        failed.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          example:
            title: Unprocessable Entity
            status: 422
            detail: validation failed
            errors:
              - message: expected required property name to be present
                location: body
    TooManyRequests:
      description: >-
        The request exceeded the rate limit. Wait the number of seconds in
        `Retry-After`, then retry.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
          example:
            code: 429
            title: rate_limit_exceeded
            message: rate limit exceeded
    InternalServerError:
      description: An unexpected error occurred on the server.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          example:
            type: https://errors.lerian.studio/v1/MTCH-0002
            title: Internal Server Error
            status: 500
            detail: internal error
            code: MTCH-0002
        text/plain:
          schema:
            type: string
          example: Internal Server Error
  headers:
    RetryAfter:
      description: Seconds to wait before you retry.
      schema:
        type: integer
        example: 30
    XRateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
        example: 100
    XRateLimitRemaining:
      description: Requests left in the current window. Always `0` on a `429`.
      schema:
        type: integer
        example: 0
    XRateLimitReset:
      description: Unix time, in seconds, when the current window resets.
      schema:
        type: integer
        example: 1767225600
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'
      scheme: bearer
      type: http

````

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