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

# Get dashboard home metric values

> Computes current values for the requested metric ids (comma-separated `ids`). Omit `ids` to fetch every metric available to the caller. Optional `date` (`YYYY-MM-DD`, ART) applies to FX pairs and the day-P&L trio. Same availability rules as `GET /api/home-metrics`. Unavailable requested ids are returned with `available: false` and `unavailable_reason` instead of failing the whole request. The legacy `fx-rates` id expands to one `fx-rate:{CURRENCY}` value per company pair.



## OpenAPI

````yaml /docs/openapi.json get /api/home-metrics/values
openapi: 3.0.0
info:
  title: FinSync API Documentation
  version: 1.0.0
  description: API documentation for FinSync application
  contact:
    name: FinSync Support
    email: support@finsync.com
servers:
  - url: https://api.finsync.ar
    description: Direct Fly API (preferred for API keys and webhooks)
  - url: https://finsync.ar
    description: Same-origin via finsync.ar (Vercel rewrite)
security:
  - apiKey: []
tags:
  - name: Clients
    description: Operations related to clients and their accounts
  - name: Tags
    description: >-
      Company-scoped client labels (Configuración > Etiquetas). Distinct from
      the special Centro de resultados / Centro de costos tag used for budget
      clients.
  - name: Accounts
    description: Operations related to account balances
  - name: Cost Centers
    description: Company centros de resultados (cost_center_id) and their budgets
  - name: Operations
    description: Operations for creating and managing financial operations
  - name: Operation Types
    description: Company operation types management
  - name: Transaction Types
    description: Company transaction types management
  - name: WhatsApp Tools
    description: >-
      Company-scoped WhatsApp bot operation tools (Configuración > WhatsApp >
      Tools). Same WhatsAppOperationTool rows as the dashboard. Authenticate
      with x-api-key.
  - name: External client
    description: >-
      Exports for external (portal-linked) clients. Authenticate with
      `x-api-key` (company-owned client ID) or `Authorization: Bearer` (Auth.js
      session for an ExternalAccessGrant).
  - name: Mesas
    description: >-
      Company FX trading desks (mesas). Same records and paths as the dashboard
      Mesas module. Integrators authenticate with x-api-key; the dashboard uses
      an employee session. Superadmin must set mesas_enabled first; there is no
      public PATCH for that flag. created_by / opened_by / closed_by are null
      for API-key callers.
  - name: Home metrics
    description: >-
      Named dashboard home metrics (list + values). API keys receive the
      Métricas-group cards (day P&L, commissions, cost centers) without the
      metrics-password cookie. Employee sessions need the matching view
      permission; they still skip the UI password gate on this surface.
paths:
  /api/home-metrics/values:
    get:
      tags:
        - Home metrics
      summary: Get dashboard home metric values
      description: >-
        Computes current values for the requested metric ids (comma-separated
        `ids`). Omit `ids` to fetch every metric available to the caller.
        Optional `date` (`YYYY-MM-DD`, ART) applies to FX pairs and the day-P&L
        trio. Same availability rules as `GET /api/home-metrics`. Unavailable
        requested ids are returned with `available: false` and
        `unavailable_reason` instead of failing the whole request. The legacy
        `fx-rates` id expands to one `fx-rate:{CURRENCY}` value per company
        pair.
      parameters:
        - in: query
          name: ids
          required: false
          schema:
            type: string
          description: >-
            Comma-separated metric ids (`fx-rate:ARS`, `mesa-volumes`, …).
            Legacy `fx-rates` expands to every company pair. Omit to return
            every available metric.
          example: fx-rate:ARS,mesa-volumes,ops-month,day-pnl-usd
        - in: query
          name: date
          required: false
          schema:
            type: string
            format: date
          description: >-
            ART calendar day for day-P&L / commissions / cost-center cards.
            Defaults to today ART.
      responses:
        '200':
          description: >-
            Metric values in request order (or catalog order when `ids` is
            omitted)
          content:
            application/json:
              schema:
                type: object
                required:
                  - values
                properties:
                  values:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - available
                      properties:
                        id:
                          type: string
                        available:
                          type: boolean
                        unavailable_reason:
                          type: string
                          nullable: true
                      additionalProperties: true
        '400':
          description: Unknown metric id or invalid date
        '401':
          description: Authentication required
        '500':
          description: Server error
      security:
        - apiKey: []
        - bearerAuth: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Auth.js session / access token for logged-in users (employees for most
        dashboard APIs; external portal users with an ExternalAccessGrant for
        `/api/external-client/history` and `/api/external-client/history/pdf`).

````

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